> I am new with Java. Within an integration I get strange behaviour
> caused of different Codepages of the server and the clients. Is it
> possible to enter a default for the property "file.encoding" in the
> file "jvm.cfg" and what is the syntax?
Exactly what "strange behaviour" are you experiencing?
Any software that depends on the default encoding being correct is
implicitly broken, for distributed applications even more so. You
should code your application to use the encoding it needs, regardless
of any local defaults.
Here's a possible clue: instead of using FileReader/Writer, use
InputStreamReader/Writer which let you specify the encoding.
/gordon
--
Marcelo Morales - 03 Apr 2008 13:56 GMT
> > I am new with Java. Within an integration I get strange behaviour
> > caused of different Codepages of the server and the clients. Is it
[quoted text clipped - 14 lines]
>
> --
Hi
I agree with Gordon. _Never_ rely on default encoding being right.
I'm no expert, but a seasoned programmer. Encoding has always been a
pita for me, regardless of programming language, platform or os. Since
the introduction of nio, Java has become stronger imho.
java.nio.charset.Charset.availableCharsets().keySet() should give you
a nice list of supported encodings. It might differ from one platform
to another and from one jvm to the next (check out MacRoman). You can
set the default java encoding using the file.encoding property.
Marcelo Morales