Laura <lestebanez@hotmail.com> asked:
> 1.- Are UTF-8 and UTF-16 compatible with Java, Windows NT, W2000, W95,
> W98 and UNIX?
"Compatible with" could mean any number of things when talking about
operating system support for Unicode. I assume you mean, "Do these
systems provide native support for UTF-8 and UTF-16?" Java, of course,
is not an OS but a programming language that can run on any of the OS's
you mentioned.
As far as I know (which in this case isn't very far), Java supports
UTF-8 and UCS-2. Internally it uses a non-standard variant of UTF-8,
but I'm pretty sure the method that writes UTF-8 to the outside world is
standard. Perhaps Java has been upgraded to support not only UCS-2 but
also UTF-16; I don't know.
Windows 95 and 98 provide limited support for Unicode, NT 4 is better,
and Windows 2000 is *much* better. Even the humble Notepad in Windows
2000 natively supports UTF-8 and UTF-16LE. You may hear that 95 and 98
don't support Unicode at all, but I'm using 95 "classic" with IE 5.5 and
Outlook Express 5.5 and can read all the Unicode postings on this list
(up to the limitations of the fonts, anyway). Uniscribe obviously helps
a lot.
For Unix, I can do no better than to point you to Markus Kuhn's
excellent "UTF-8 and Unicode FAQ" at
<http://ww.cl.cam.ac.uk/~mgk25/unicode.html>.
> 2.- Is ASCII also compatible with all of them?
Is ASCII compatible with Java and all those operating systems? Yes, of
course it is. I don't think that's the question you were asking,
though. Let's try again:
Is ASCII compatible with UTF-8 and UTF-16? Yes to UTF-8, no to UTF-16.
UTF-8 is a multi-byte encoding form which encodes ASCII characters (00
through 7F) as single bytes equivalent to their ASCII representation.
In other words, perfectly compatible. OTOH, in UTF-16 all characters
are represented as 16-bit values or pairs of 16-bit values. If you
convert an ASCII string to UTF-16 and then view the UTF-16 as a sequence
of bytes, every other byte will be 00, which is completely incompatible
with tools that expect ASCII -- most will halt on the first 00.
-Doug Ewell
Fullerton, California
This archive was generated by hypermail 2.1.2 : Fri Mar 08 2002 - 00:24:51 EST