Christian Geisert wrote:

> > Java source is Unicode, and I don't think the encoding would matter, but
>
> Java source is whatever the platform encoding is (see file.encoding
> system property) so the best thing is to avoid chars > 127 at all
> (use \uxxxx instead) ... uh this won't work in this case as
> these are comments. Maybe there's a workaround for special french
> characters (like  = ae in german)

O'Reilly's "Java in a Nutshell", 4th edition, page 20: "Java programs are
written using the Unicode character set."

Java uses Unicode specifically to avoid the "avoid chars > 127" problem. The
platform may affect defaults, but the editor is where the problem shows up,
as not all editors support Unicode. AFAIK, all java compilers must handle
Unicode files. The issue was that the editor knew that the 128+ chars were
not encoded correctly. Converting to UTF-8 solved the problem nicely.

BTW, I think the long-hand ASCII \uxxxx will work in comments as well as
source (too lazy to test it).

Victor Mote


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to