<i18n dev> Reading Linux filenames in a way that will map back the same on open?

Martin Buchholz martinrb at google.com
Sun Sep 14 19:34:36 PDT 2008

On Sat, Sep 13, 2008 at 14:57, Xueming Shen <Xueming.Shen at sun.com> wrote:
> Martin, don't trap people into using -Dfile.encoding, always treat it as a
> read only property:-)
> I believe initializeEncoding(env) gets invoked before -Dxyz=abc  overwrites
> the default one,
> beside the "jnu encoding" is introduced in 6.0, so we no longer look
> file.encoding since, I believe
> you "ARE" the reviewer:-)

Oh dear.  Sorry for the misinformation.
- newer Linux systems ship without any ISO-8859-1 locale
  (you can add one using the command "sudo locale-gen en_US")
- Specifying "C" or "POSIX" for LANG or LC_ALL will cause Java to
  use "ASCII", not "ISO-8859-1" as the default locale,
  which is likely not what you want :-(
- The JDK uses two different system properties, sun.jnu.encoding,
  and file.encoding, for default charset use.  This is very confusing,
  undocumented, and non-standardized.  Setting these as system
  properties on the command line appears to be unsupported.

Is that right?  I'm pretty unhappy about the situation.


More information about the i18n-dev mailing list