Hi all,

I am still beating my head against a brick wall trying to get the default
encoding changed for my Tomcat server on Linux (slackware 2.4.17 if it
matters).

The problem is actually outside of Tomcat so please excuse the slightly
off-topic question.  But basically, I've run the following simple test:

import java.io.InputStreamReader;
import java.io.ByteArrayInputStream;
public class Encoding {
  public static void main(String[] args){
    byte[] bytes = new byte[0];
    ByteArrayInputStream bs = new ByteArrayInputStream(bytes);
    InputStreamReader in = new InputStreamReader(bs);
    System.out.println("file.encoding is " +
System.getProperty("file.encoding"));
    System.out.println("default encoding is " + in.getEncoding());
  }
}

And no matter what I try, it always says "default encoding is ASCII", no
matter what I've specified file.encoding as.  I'm invoking the class as:

java -cp $CLASSPATH:. -Dfile.encoding=ISO8859_1 Encoding

I've tried the following values for file.encoding with no changes:

ISO8859_1
ISO-8859-1
8859_1
iso-8859-1
iso8859-1
iso8859_1
en_US
no_NO
norwegian

I've also tried every one of those values for LANG and LC_ALL in my
environment variables.

Please, someone help me! How do I change the damned default encoding????
Why isn't it picking up on my environment variables or the file.encoding
property? Running "java -version" tells me:

java version "1.3.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_02-b02)
Java HotSpot(TM) Client VM (build 1.3.1_02-b02, mixed mode)

Can anyone help? I'm totally stymied here!

Best regards,

Richard




--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to