On Wed, 17 Nov 1999 01:02:22 +0800, David Li wrote:
>Hi, I am facing a strange behavior with JDK 1.2.
>
>String(byte[]) is supposed to construct a string from a byte array.
>using default encoding. The default encoding in terms comes from
>sun.io.ByteToCharConverter's getDefault(). I am wondering what determine
>what's return by the getDefault in ByteToCharConverter.
>
>My program if runs under command line use the current Big5 encoding.
>However, when I run it as a servlet under apache, it use ISO8859_1
>converter. I have try to set a couple paramter for the VM from
>file.encoding, user.lang to user.region and none of these seems to
>affect the the default converter. I wonder how the getDefault() method
>is controled.
That is controlled via the locale setting which in within the environment
of the process that starts the JVM.
You most likely do not have that same environment running in the apache
server process or the servlet engine under apache (depending on how
you configured it and which servlet engine you used)
You should check that the correct environment (espcially locale and
timezone) settings exist in the web server process and any processes
it spawns.
--
Michael Sinz ---- Technology and Engineering Director/Consultant
"Starting Startups" mailto:[EMAIL PROTECTED]
My place on the web ---> http://www.users.fast.net/~michael_sinz
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]