> From: André Warnier [mailto:[EMAIL PROTECTED] > Subject: Re: Migrating to tomcat 6 gives formatted currency > amounts problem > > - the servlet reads those documents with some InputStream, > without specifying a character set or encoding, and by > default that means to use Tomcat's idea of its default > LC_CTYPE for those InputStreams ?
Essentially correct, if you substitute "JVM" for "Tomcat" in the above. Input and output are done via byte streams, converted to and from Unicode based on the specified character encoding. When that's not specified (via <Connector> attribute or HTTP header), the JVM uses a default encoding. To determine the default, JVM initialization looks at various system properties if they exist, and then certain environment variables. (The exact ones are platform dependent.) Consequently, setting LC_CTYPE (or equivalent) prior to starting up Tomcat can have a dramatic effect on the interpretation of both input and output, as you have discovered. Look at the API doc for java.io.InputStreamReader and java.io.OutputStreamWriter for examples of character set encoding usage. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]