Unicode and Win32
João Garcia
jgarcia@uk2.net
Fri May 30 04:15:00 GMT 2003
Hi,
fernando@lozano.eti.br wrote:
>> You're right, unicode is unicode. But beware UTF-8 and UTF-16 :-)
Wrong link... :-)
Sorry. It was irrelevant anyway. UTF-16BE and UTF-16LE seem to depend
only on the architecture (big endian and little endian), so everything
should be "in sync" between the OS and the compiler.
But I am not so sure about other things (ie. surrugates). I also don't
know if those things are relevant for the problem. We shall see...
> > What about System.getProperty("os.name") and "os.version" ? Aren't they
> reliable? If not, they should be fixed and used on your code.
Thanks. I guess I could use them but, since the code is in C++, I
thougth it would be nice to use the w32 API directly.
And I did find a solution (it wasn't that difficult...):
GetVersionEx(LPOSVERSIONINFO lpVersionInfo).
lpVersionInfo is a structure. One of its fields holds the platform code
(value 1 for W9x and value 2 for NT branch). I can use ( platform >= 2 )
as a condition to use wchar functions. I hope the code will be able to
work with platform 3 (whatever that may be). ;-)
A better alternative would be to have Linux dominant on the desktop. :-)
João
More information about the Java
mailing list