On Mon, 3 Feb 1997 unicode@Unicode.ORG wrote:
> Mark Leisher wrote:
> > Doug> I coded a very simple test of the level of support for wide
> > Doug> character strings in a C/C++ compiler. Unfortunately it > shows that
> > Doug> there are still compilers out there that will have trouble > even at
> > Doug> the entry level of Unicode functionality.
> > Unfortunately, gcc and g++ seem to convert \x4e00 to 0, and nothing
> > will print.
> Correct, and there are a couple of possible explanations:
> 1) The compiler has wchar_t as 8 bits. 0x4e00 will have the high
> byte truncated, and will be reduced to 0. A zero byte is the C
> marker for end of string. So, the program will end immediately
> with no output.
0x4e00 is probably a bad example. What about using something
else, such as 0x4e5D (the character for "nine")? If it prints
"]", we know it's been truncated to 8-bit.
This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:20:33 EDT