Search Results

Search found 11 results on 1 pages for 'gb2312'.

Page 1/1 | 1 

  • Encoding GBK2312 Condundrum

    - by user792271
    I am an amateur coder and I have a small problem. My goal is to have one text input with two buttons. The first button uses a bit of Javascript called SundayMorning to translate the text (to Chinese) The second button submits the text to a URL. The URl requires that Chinese text be encoded it in GBK2312 character set. I have duct taped together various found code to the result I have now. Due to the finicky behavior of the SundayMorning Javascript, my solution is to have two input boxes, the second of which I will hide. Right now, this doesn't work: I am unable to encode the Chinese in GBK2312, no matter what I try. BONUS CONUNDRUM: The second box copies my input letter by letter as I type, but does not copy the Chinese translation that the Javascript returns. Sorry for my janky amateur code. I defer to those more clever, if you have any kind suggestions. <head> <meta http-equiv="Content-Type" content="text/html; charset=GB2312" /> <script type='text/javascript' Src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js'> </script> ///THIS JS TRANSLATES THE TEXT INLINE <script type="text/javascript" src="jquery.sundaymorning.js"> </script> <script type="text/javascript"> $(function() { $('#example3').sundayMorningReset(); $('#example3 input[type=image]').click(function(evt) { $.sundayMorning( $('#example3 input[type=text]').val(),{source:'en', destination:'ZH', menuLeft:evt.pageX, menuTop:evt.pageY},function(response) {$('#example3 input[type=text]').val(response.translation);});});}); </script> /// ///THIS PUTS THE CONTENT OF THE TRANSLATION BOX INTO THE SUBMISSION BOX <script type="text/javascript"> $(document).ready(function(){ var $url = $("#url"); $("#track").keyup(function() { $url.val(this.value);}); $("#track").blur(function() { $url.val(this.value);});}); </script> ///THIS PUTS THE CONTENT OF THE SUBMISSION INSIDE A URL <SCRIPT type="text/javascript"> function goToPage(url) { var initial = "http://example.com/"; var extension = ".html"; document.something.action=initial+url+extension; } </SCRIPT> </head> <body> <div id="featured"> <div id="example3"> <input type="text" name="track" id="track" value="" class="box"onkeydown="javascript:if (event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('mama').click();}};"/> <input type="image" src="http://taobaofieldguide.com/images/orange-translate-button.png" id="searchsubmit" value="Translate" class="btn" /> </div> <FORM name="something" method="post" onsubmit="goToPage(this.url.value);"> <input type="text" id="url";> <INPUT type="submit" id="mama" value="GO" > </FORM> </div> </body>

    Read the article

  • Can I send a POST form in an encoding other than of its body?

    - by Daziplqa
    Hi gang, I've Html page that looks like: <HTML> <meta http-equiv='Content-Type' content='text/html; charset=gb2312'> <BODY onload='document.forms[0].submit();'> <form name="form" method="post" action="/path/to/some/servlet"> <input type="hidden" name="username" value="??"> <!-- UTF-8 characters --> </form> </BODY> </HTML> As you can see, the content of this page is UTF-8, but I need to send it with GB2312 character encoding, as the servlet that I am sending this page to expects from me GB2312. Is this a valid scenario? Because in the servlet, I couldn't retive these chines characters back using a filter that sets the character encoding to GB2312!! Please help

    Read the article

  • Is there any need for me to use wstring in the following case

    - by Yan Cheng CHEOK
    Currently, I am developing an app for a China customer. China customer are mostly switch to GB2312 language in their OS encoding. I need to write a text file, which will be encoded using GB2312. I use std::ofstream file I compile my application under MBCS mode, not unicode. I use the following code, to convert CString to std::string, and write it to file using ofstream std::string Utils::ToString(CString& cString) { /* Will not work correctly, if we are compiled under unicode mode. */ return (LPCTSTR)cString; } To my surprise. It just works. I thought I need to at least make use of wstring. I try to do some investigation. Here is the MBCS.txt generated. I try to print a single character named ? (its value is 0xBDC5) When I use CString to carry this character, its length is 2. When I use Utils::ToString to perform conversion to std::string, the returned string length is 2. I write to file using std::ofstream My question is : When I exam MBCS.txt using a hex editor, the value is displayed as BD (LSB) and C5 (MSB). But I am using little endian machine. Isn't hex editor should show me C5 (LSB) and BD (MSB)? I check from wikipedia. GB2312 seems doesn't specific endianness. It seems that using std::string + CString just work fine for my case. May I know in what case, the above methodology will not work? and when I should start to use wstring?

    Read the article

  • why my code show messy code ..

    - by zjm1126
    class sss(webapp.RequestHandler): def get(self): url = "http://www.google.com/" result = urlfetch.fetch(url) if result.status_code == 200: self.response.out.write(result.content) and this view show : when i change code to this: if result.status_code == 200: self.response.out.write(result.content.decode('utf-8').encode('gb2312')) it show : so ,what i should do ? thanks

    Read the article

  • How to enable Chinese on Debian lenny?

    - by Computist
    I have already installed Chinese fonts $ sudo apt-cache search chinese $ sudo apt-get install ttf-arphic-bkai00mp ttf-arphic-bsmi00lp ttf-arphic-gbsn00lp ttf-arphic-gbsn00lp ... added locales $ sudo dpkg-reconfigure locales, and chose the following en_US.UTF-8 UTF-8 zh_CN GB2312 zh_CN.GBK GBK zh_CN.UTF-8 UTF-8 zh_TW BIG5 zh_TW.UTF-8 UTF-8 However when I try to create a file with Chinese characters in file name by touch <some chinese characters ...>.txt, it fails and substituted Chinese characters with --------- at terminal. How to fix this? [Edit, Aug. 15, 2011, 21:42] After rebooting, everything is working.

    Read the article

  • CodePlex Daily Summary for Sunday, October 23, 2011

    CodePlex Daily Summary for Sunday, October 23, 2011Popular ReleasesView Layout Replicator for Microsoft Dynamics CRM 2011: View Layout Replicator (1.0.921.51): Added CodePlex and PayPal links New iconSiteMap Editor for Microsoft Dynamics CRM 2011: SiteMap Editor (1.0.921.340): Added CodePlex and PayPal links New iconRibbon Browser for Microsoft Dynamics CRM 2011: Ribbon Browser (1.0.922.41): Added CodePlex and PayPal links New iconMVCQuick: MVCQuick 0.3.1: Features??NHibernate 3.2??Repository(ORuM) ??Spring.Net 1.3.2??Container(IoC) ??Common.Logging 1.2??Logging ASP.NET Security Provider?? ??MVCQuick.Framework??MusicStoreElysium: Elysium Theme 1.1 (CTP 1): === Version history === Elysium Theme: Version 1.1 This is pre-release Community Technology Preview version. We recommended use it only for testing and studying project's possibilities. This version included: styles for: ContextMenu MenuItem (partially) bug fixes for: CommandButton: bug #598 ComboBox: bug #599 Window: bug #605 Elysium Theme: Version 1.0 This version included: classes: ThemeManager (with standart Windows Phone colors) CommandButton, RepeatCommandButton, ToggleC...DotNet.Framework.Common: DotNet.Framework.Common 4.0: ??????????,????????????XML Explorer: XML Explorer 4.0.5: Changes in 4.0.5: Added 'Copy Attribute XPath to Address Bar' feature. Added methods for decoding node text and value from Base64 encoded strings, and copying them to the clipboard. Added 'ChildNodeDefinitions' to the options, which allows for easier navigation of parent-child and ID-IDREF relationships. Discovery happens on-demand, as nodes are expanded and child nodes are added. Nodes can now have 'virtual' child nodes, defined by an xpath to select an identifier (usually relative to ...Media Companion: MC 3.419b Weekly: A couple of minor bug fixes, but the important fix in this release is to tackle the extremely long load times for users with large TV collections (issue #130). A note has been provided by developer Playos: "One final note, you will have to suffer one final long load and then it should be fixed... alternatively you can delete the TvCache.xml and rebuild your library... The fix was to include the file extension so it doesn't have to look for the video file (checking to see if a file exists is a...CODE Framework: 4.0.11021.0: This build adds a lot of our WPF components, including our MVVC and MVC components as well as a "Metro" and "Battleship" style.GridLibre para Visual FoxPro: GridLibre para Visual FoxPro v3.5: GridLibre Para Visual FoxPro: esta herramienta ayudara a los usuarios y programadores en los manejos de los datos, como Filtrar, multiseleccion y el autoformato a las columnas como la asignacion del controlsource.Self-Tracking Entity Generator for WPF and Silverlight: Self-Tracking Entity Generator v 0.9.9: Self-Tracking Entity Generator v 0.9.9 for Entity Framework 4.0Umbraco CMS: Umbraco 5.0 CMS Alpha 3: Umbraco 5 Alpha 3Umbraco 5 (aka Jupiter) will be the next version of everyone's favourite, friendly ASP.NET CMS that already powers over 100,000 websites worldwide. Try out the Alpha of v5 today! If you're new to Umbraco and would like to get a low-down on our popular and easy-to-learn approach to content management, check out our intro video. What's Alpha 3?This is our third Alpha release. It's intended for developers looking to become familiar with the codebase & architecture, or for thos...Vkontakte WP: Vkontakte: source codeWay2Sms Applications for Android, Desktop/Laptop & Java enabled phones: Way2SMS Desktop App v2.0: 1. Fixed issue with sending messages due to changes to Way2Sms site 2. Updated the character limit to 160 from 140GART - Geo Augmented Reality Toolkit: 1.0.1: About Release 1.0.1 Release 1.0.1 is a service release that addresses several issues and improves performance. As always, check the Documentation tab for instructions on how to get started. If you don't have the Windows Phone SDK yet, grab it here. Breaking Change Please note: There is a breaking change in this release. As noted below, the WorldCalculationMode property of ARItem has been replaced by a user-definable function. ARItem is now automatically wired up with a function that perform...Microsoft Ajax Minifier: Microsoft Ajax Minifier 4.32: Fix for issue #16710 - string literals in "constant literal operations" which contain ASP.NET substitutions should not be considered "constant." Move the JS1284 error (Misplaced Function Declaration) so it only fires when in strict mode. I got a couple complaints that people didn't like that error popping up in their existing code when they could verify that the location of that function, although not strict JS, still functions as expected cross-browser.Naked Objects: Naked Objects Release 4.0.110.0: Corresponds to the packaged version 4.0.110.0 available via NuGet. Please note that the easiest way to install and run the Naked Objects Framework is via the NuGet package manager: just search the Official NuGet Package Source for 'nakedobjects'. It is only necessary to download the source code (from here) if you wish to modify or re-build the framework yourself. If you do wish to re-build the framework, consul the file HowToBuild.txt in the release. Documentation Please note that after ...myCollections: Version 1.5: New in this version : Added edit type for selected elements Added clean for selected elements Added Amazon Italia Added Amazon China Added TVDB Italia Added TVDB China Added Turkish language You can now manually add artist Added Order by Rating Improved Add by Media Improved Artist Detail Upgrade Sqlite engine View, Zoom, Grouping, Filter are now saved by category Added group by Artist Added CubeCover View BugFixingIronPython: 2.7.1 RC: This is the first release candidate of IronPython 2.7.1. Like IronPython 54498, this release requires .NET 4 or Silverlight 4. This release will replace any existing IronPython installation. If there are no showstopping issues, this will be the only release candidate for 2.7.1, so please speak up if you run into any roadblocks. The highlights of 2.7.1 are: Updated the standard library to match CPython 2.7.2. Add the ast, csv, and unicodedata modules. Fixed several bugs. IronPython To...Rawr: Rawr 4.2.6: This is the Downloadable WPF version of Rawr!For web-based version see http://elitistjerks.com/rawr.php You can find the version notes at: http://rawr.codeplex.com/wikipage?title=VersionNotes Rawr AddonWe now have a Rawr Official Addon for in-game exporting and importing of character data hosted on Curse. The Addon does not perform calculations like Rawr, it simply shows your exported Rawr data in wow tooltips and lets you export your character to Rawr (including bag and bank items) like Char...New Projects"Cupa Timisului" evaluation app: The application is used for evaluating CABRILLO log file for "Cupa Timisului" HAM contest. You can use this code as a startup for ham contest log evaluating software... It's developed in C#.Afrihost Capped Account Monitoring Gadget: The Afrihost Monitoring Gadget is a Windows gadget to monitor the usage on your Afrihost capped account. This project is independently developed and not associated with Afrihost. It has been developed by an Afrihost client and not Afrihost themselves. Custom ORM for .NET: This project represents tiny "Custom ORM" system written in .NET (3.5 as of now). It has strongly typed mapping like in FluentNH. It allows you to change underlying data access logic on the fly. It is simple enough to grag-&-drop in your project and than change as you like.diagnostic medical system: Medical diagnostic system. Simple academic project using BiztTalk Bussines Rule Engine. DotNetNuke Kitchen Sink: A sample module project for DotNetNuke with a variety of different scenarios covered.ecBlog: ecBlog is a very simple blog application. Just run and use. Technology Choice I developed the site as expected with the MVC and HTML 5. Why MVC? In fact there is no one reason. I developed with one of the many features of MVC . MVC comes with a specific architecture, it also conFastPizza: This is a project to delivery stores, restaurants, and othersGB2312 for Silverlight: This class is for support GB2312 simplified Chinese characters for Silverlight(include Windows Phone 7) Application and inherited from Encoding abstract class. It's developed in CSharp. ?????? Silverlight(?? Windows Phone 7)?????? GB2312 ???????,? Encoding ?????。?? C# ????。Ginnay Distributed Downloader: Distributed Downloader using multiple proxiesIn for Consideration - EGR101 Rocket Launch Sequencer: In for Consideration's EGR101 RLS is an executable version of the simplified launch sequence presented in class materials of "Introduction to Engineering" at Embry-Riddle Aeronautical University in Daytona Beach, FL. Source code is available for those interested (C# only).luminji's core lib: luminji's core lib, provide the common utility of the c#.Muki erp System: MukiERP, features. MukiERP is a free, user-friendly, web-based ERP system. MukiERP is Open Source licensed on GPL. MukiERP is in active development and is constantly improved according to its users needs. MukiERP is written in .Net C# language. MukiERP is running well on a ASP.NET and MSSQL. NameDOB: This is for sharing a specific sample with a specific group.network utility: this is a project for working with network API.PGS: (functional) Program Generator from Spreadsheets: This project allows the generation of a functional program semantically equivalent to a given spreadsheet. Using this system, you can: - solve the calculation expressed by the user using a compiled approach. - use spreadsheets as a tool for programming by example.pkrss: c++ version:pkrss.sf.net csharp version:is here. pkrss.sf.net is c++ version desktop productor written by qt 4.7.3. pkrss.codeplex is csharp version web productor.SharePoint Log Browser: The SharePoint log browser is yet another way to view the log of SharePoint.SharpChip-8: Chip-8 Emulator written in C#SQL Server Stored Procedure best practices: This SQL Server stored procedure best practice guide contains documentations of best practices and helper tools to enhance further match with the best practices. sqlsearch: Hi, Googling gives me many search tools. But all tools are not efficient or not able to search into data. So I thought why developers on codeplex and I will not find out some solution for this same. All of you are invited to contribute in this project. Thank you, Hiren V.Suffix Tree in C# and F#: SuffixTree builds a suffix tree structure. A simple client shows how to find substrings in it, and the visual client shows the actual tree. Implemented in C# and F#.Test11: it is a test projectThe Seal: The Seal is a basic Open Source 2D Fantasy Based RPG(Role Playing Game) for Windows. More info coming soon.Toolpack: Updated and improves version silverlight toolkit and wpf toolkit.Unity Azure Setting Injector: Using Unity in Windows Azure made simple. Ever considered moving to Windows Azure, but didn't know how to inject setting from your Service Configuration file? Just reference this project and you will be able to inject Azure Storage Account Connection Strings & Local Storage Paths

    Read the article

  • java: speed up reading foreign characters

    - by Yang
    My current code needs to read foreign characters from the web, currently my solution works but it is very slow, since it read char by char using InputStreamReader. Is there anyway to speed it up and also get the job done? // Pull content stream from response HttpEntity entity = response.getEntity(); InputStream inputStream = entity.getContent(); StringBuilder contents = new StringBuilder(); int ch; InputStreamReader isr = new InputStreamReader(inputStream, "gb2312"); // FileInputStream file = new InputStream(is); while( (ch = isr.read()) != -1) contents.append((char)ch); String encode = isr.getEncoding(); return contents.toString();

    Read the article

  • Convert ISO/Windows charsets to UTF-8 in Javascript

    - by Amir
    I'm developing a firefox plugin and i fetch web pages to do some analysis for the user. The problem is when i try to get (XMLHttpRequest) pages that are not utf-8 encoded the string i see is messed up. For example hebrew pages with windows-1125 or Chinese pages with gb2312. I already tried the following: var uDecoder=Components.classes["@mozilla.org/intl/scriptableunicodeconverter"].getService(Components.interfaces.nsIScriptableUnicodeConverter); uDecoder.charset="windows-1255"; alert( xhr.responseText ); var decoder=Components.classes["@mozilla.org/intl/utf8converterservice;1"].getService(Components.interfaces.nsIUTF8ConverterService); alert(decoder.convertStringToUTF8(xhr.responseText,"WINDOWS-1255",true)); I also tried escape/unescape/encodeURIComponent any ideas???

    Read the article

  • Does a servlet knows the encoding of the sent form that specified using http-equiv?

    - by Daziplqa
    Does a servlet knows the encoding of the sent form that specified using http-equiv? When I specify an encoding of a POSTed form using http-equiv like that: <HTML> <head> <meta http-equiv='Content-Type' content='text/html; charset=gb2312'/> </head> <BODY > <form name="form" method="post" > <input type="text" name="v_rcvname" value="????"> </form> </BODY> </HTML> And then at the servlet I use the method, request.getCharacterEncoding() I got null ! So, Is there a way that I can tell the server that I am encoding the data in some char encoding??

    Read the article

1