[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#197375: gcj dies en parsing java code with high ASCII values in it



Peter Hawkins wrote:
I've never touched the locale on my systems, so it's the default (LANG="C"?)

Please invoke locale(1) to be sure.

However, there is still a minor problem in that running the 'java' wrapper script picks a different default encoding to the default encoding of the jdk. I gather the jdk picks its encoding from the environment as well, but I think it chooses differently. Maybe the default should be ISO-8859-1 for the "C" locale, not ASCII?

I don't see this as a problem. Please find the documentation of the JDK that explains in detail how the encoding of source code files is determined. The gcj approach is very clear (use the locale's encoding), so if the JDK is different, it must be the JDK that is broken.

The encoding of the C locale most definitely must *not* be Latin-1. If you want characters outside the POSIX "portable character set", use a different locale.

In general, relying on defaults for source code encodings is also bad, so always specify the encoding explicitly.

Regards,
Martin




Reply to: