[LINUX] Encoding problem when my application is started at boot
Hello,
I've got an encoding problem with my java application under a Mandriva
10.1.
Specs :
- java sdk 1.4.2_08
- Choosed encoding ISO-8859-1
- Mandriva LANG variable is FR
The application works with Tomcat and a servlet that makes the bridge
to a database.
The facts:
When i start tomcat and the servlet on the boot time (i've made a link
from my script to /etc/rc5.d/), the accents are replaced by ?.
After that, if i stop/start the services, it works very good.
NB: I run tomcat and the servlet with the java param
-Dfile.encoding="ISO-8859-1"
It seems to me that at boot time, java is not starting my app with the
correct encoding.
Does anyone have an idea ?
Thanks for your help.
Fred
[831 byte] By [
JLBINFOa] at [2007-10-2 0:53:19]

public class file_encoding {
public static void main(String args[]) {
System.out.println(g("os.arch") + " " + g("os.name") + " "+ g("os.version") + " " +
g("java.vendor") + " " + g("java.version") + " " + g("java.vm.specification.version"));
System.out.println(g("file.encoding"));
}
static String g(String name) { return System.getProperty(name); }
}
$ echo $LANG
en_US.latin2
$ java file_encoding
i386 Linux 2.6.4-52-default Sun Microsystems Inc. 1.4.2_04 1.0
ANSI_X3.4-1968
$ LANG=en_Us
$ java file_encoding
i386 Linux 2.6.4-52-default Sun Microsystems Inc. 1.4.2_04 1.0
ANSI_X3.4-1968
$ LANG=en_US
$ java file_encoding
i386 Linux 2.6.4-52-default Sun Microsystems Inc. 1.4.2_04 1.0
ISO-8859-1
$ LANG=fr_FR
$ java file_encoding
i386 Linux 2.6.4-52-default Sun Microsystems Inc. 1.4.2_04 1.0
ISO-8859-1
$ LANG=ru_RU
$ java file_encoding
i386 Linux 2.6.4-52-default Sun Microsystems Inc. 1.4.2_04 1.0
ISO-8859-5