Jre 1.4.2 locale problem
Hi,
I'm french and i often use Java Applets to chat But, i can't use accents and special french characters (éàùçêô...) into those applets :/ it's quite sucking.. Thanks |
That means the java is badly written.
If you are writing them yourself, use the locale class. see here http://java.sun.com/j2se/1.4.2/docs/...il/Locale.html |
It's not my applets.. Have you never seen one of these java applet that connect to an IRC chan (for exemple)?
Sure, their applets are badly written but i can't do anything for this.. I saw there was a "ControlCenter" applet given with JRE in which we can specify parameters for all applets the JVM runs.. Maybe, here is the solution.. But i don't know which parameter i should put there.. The help talks about "assertions" but i don't know how it works and if it could resolve this. Or perhaps, the problem comes from my system locale configuration... |
What encoding are your using?
I assume you are using a browser to look at the applets. I am using opera. Under the view menu the encoding is set to automatic and your French characters don't show properly. If I set it to ISO-8859-1 (Western), they appear. Java should use getLocale to get your location from the system. Have you set your location correctly? If you have set the default keyboard layout and language as English, you should note that there is a difference between English (US) and English (International). Hope this helps. |
Yes my browser encoding was set to "Occidental (ISO-8859-1)"
Quote:
Like this? Code:
~$ locale Code:
LANG=POSIX |
The locale information is held in
/etc/sysconfig/i18n You could try editing this to the settings you want, or use the kde control centre to set country and language. |
/etc/sysconfig does not exists :/
In KDE, Country is already set to "France" :scratch: In the Java Applet ControlCenter's parameters, i added these arguments : Code:
-Duser.language=fr -Duser.country=FR -Duser.variant=EURO Code:
user.country = FR ..But AWT/Swing Textfields still don't accept my accents :cry: |
Try this then,
export LANG="fr" export LC_ALL="fr" To make the changes permanent add them to a shell startup file. I tend to use rc.local which is under /etc/rc.d somewhere. You can set all the LC variables to fr, posix is just the default. Even if you don't have an /etc/sysconfig/ you will have the i18n file somewhere. Ask at the debian support site. |
Modifying those global variables does nothing..
I have resolved my problem by reconfiguring the Debian's "locales" package Code:
# dpkg-reconfigure locales After a reboot, many programs were in French, i had all special french characters available in the Konsole and also in java applets ^^ Why i didn't try this earlier? Because, when i installed the "locales" package, i had already selected "fr_FR@euro"... why it hadn't be saved? i dunno. Now I have a problem with fonts :/ In many dialog boxes, they are about 6pt.. Anyway, Thanks for you help. |
All times are GMT -5. The time now is 03:04 PM. |