Re: how can i write a hello world in chinese with python



thanks everyone
maybe this simple API doesn't fit the Chinese display
but thanks everybody!

At least I've got that what bundles is and maybe I can use Python to
write program

On 12月14日, 上午6时31分, "MRAB" <goo...@xxxxxxxxxxxxxxxxxxxx>
wrote:
Dennis Lee Bieber wrote:
On 12 Dec 2006 23:40:41 -0800, "kernel1983" <kernel1...@xxxxxxxxx>
declaimed the following in gmane.comp.python.general:

and I tried unicode and utf-8
I tried to both use unicode&utf-8 head just like "\xEF\xBB\xBF" and not
to use

"unicode" is a term covering many sins. "utf-8" is a specification
for encoding elements of specific unicode characters using 8-bit
elements (I believe by using certain codes x00 to x7F alone as "normal",
and then x80 to xFF to represent an "escape" to higher [16-bit] element
sets).

"\xEF\xBB\xBF" is just a byte string with no identifier of what
encoding is in use (unless the first one or two are supposed to be
BOM)... In the "Windows: Western" character set, it is equivalent to
small-i-diaeresis/right-guillemot/upside-down? () In MS-DOS: Western
Europe, those same bytes represent an
acute-accent/double-down&left-box-drawing/solid-down&left

I've not done any unicode work (iso-latin-1, or subset thereof, has
done for me). I also don't know Mac's, so I don't know if the windowing
API has specific calls for Unicode data... But you probably have to
encode or decod that bytestring into some compatible unicode
representation.When you save a textfile as UTF-8 in Notepad.exe (Windows) it puts the
bytestring "\xEF\xBB\xBF" at the start to indicate that it's UTF-8 and
not ANSI (ie 8-bit characters). The bytes are actually the BOM
bytestring "\xFE\xFF" encoded in UTF-8.

.



Relevant Pages

  • Re: Unicode Support
    ... >> (I know this is a poor example, but think about other languages, eg ... First things first, when you register your RosAsm windows classes, you ... the messages with ANSI / UNICODE parameters in ANSI or UNICODE form... ... with their alphabet characters, as with the numbers and punctuation...so, ...
    (alt.lang.asm)
  • Re: Filename Encoding Help
    ... I suggest UTF-8, it's the most efficient for regular text, and it's the default for all methods reading and writing text files in .NET. ... UTF-16 but I am not sure what Windows Vista does. ... UTF-8 can represent the full Unicode spectrum, but many characters wind up encoded in just one or two bytes. ...
    (microsoft.public.dotnet.framework)
  • Re: _mbslen vs strlen
    ... My Windows application was unicode ... The length in characters, ... C++ on Linux has wide character characters as well as single byte ...
    (comp.os.linux.development.apps)
  • Re: Microsoft Layer for Unicode on Windows 95/98/Me systems
    ... VB has little support of external representation of characters. ... > however does and VB depends on Windows to draw the characters. ... These are examples I have listed for missing Unicode support in VB. ...
    (microsoft.public.vb.winapi)
  • Re: _stprintf
    ... Some versions of Windows implement DBCS, apparently the Japanese version of Windows had ... This also means that if you are using Unicode to represent Kanji, ... to use MAX_PATH Kanji characters to name a file. ...
    (microsoft.public.vc.mfc)