LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-03-2004, 04:46 AM   #1
GruiX
Member
 
Registered: Jan 2004
Location: Toulouse (France)
Distribution: Arch Linux
Posts: 46

Rep: Reputation: 15
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
 
Old 03-03-2004, 06:56 AM   #2
MunterMan
Member
 
Registered: Nov 2003
Location: The North of England
Distribution: Suse 10.3
Posts: 172

Rep: Reputation: 30
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
 
Old 03-03-2004, 07:37 AM   #3
GruiX
Member
 
Registered: Jan 2004
Location: Toulouse (France)
Distribution: Arch Linux
Posts: 46

Original Poster
Rep: Reputation: 15
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...
 
Old 03-04-2004, 06:41 AM   #4
MunterMan
Member
 
Registered: Nov 2003
Location: The North of England
Distribution: Suse 10.3
Posts: 172

Rep: Reputation: 30
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.
 
Old 03-04-2004, 08:16 AM   #5
GruiX
Member
 
Registered: Jan 2004
Location: Toulouse (France)
Distribution: Arch Linux
Posts: 46

Original Poster
Rep: Reputation: 15
Yes my browser encoding was set to "Occidental (ISO-8859-1)"

Quote:
Originally posted by MunterMan
Java should use getLocale to get your location from the system. Have you set your location correctly?
How do I know if it's set correctly?
Like this?
Code:
~$ locale
It gives :

Code:
LANG=POSIX
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
It's strange, yesterday i tried to set LC_ALL to "fr_FR.iso885915@euro", and now it's reset to "POSIX" :/
 
Old 03-04-2004, 08:00 PM   #6
MunterMan
Member
 
Registered: Nov 2003
Location: The North of England
Distribution: Suse 10.3
Posts: 172

Rep: Reputation: 30
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.
 
Old 03-05-2004, 06:17 AM   #7
GruiX
Member
 
Registered: Jan 2004
Location: Toulouse (France)
Distribution: Arch Linux
Posts: 46

Original Poster
Rep: Reputation: 15
/etc/sysconfig does not exists :/

In KDE, Country is already set to "France"



In the Java Applet ControlCenter's parameters, i added these arguments :
Code:
-Duser.language=fr -Duser.country=FR -Duser.variant=EURO
Now, when i dump System Properties in the Java Console, i have these lines :
Code:
user.country = FR
user.language = fr
user.variant = EURO

..But AWT/Swing Textfields still don't accept my accents
 
Old 03-05-2004, 08:52 AM   #8
MunterMan
Member
 
Registered: Nov 2003
Location: The North of England
Distribution: Suse 10.3
Posts: 172

Rep: Reputation: 30
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.
 
Old 03-06-2004, 04:59 AM   #9
GruiX
Member
 
Registered: Jan 2004
Location: Toulouse (France)
Distribution: Arch Linux
Posts: 46

Original Poster
Rep: Reputation: 15
Modifying those global variables does nothing..

I have resolved my problem by reconfiguring the Debian's "locales" package
Code:
# dpkg-reconfigure locales
And then i selected the default locale "fr_FR@euro"

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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
locale: Cannot Set LC_ALL to default locale: No such file or directory. asym Linux - General 10 03-24-2013 08:35 PM
How to change the locale by setting the system default locale letdoit Slackware 6 08-18-2011 03:34 AM
problem installing JRE 5.0 Zhou Yi Linux - Software 3 04-04-2005 11:18 AM
jre install problem.. tehnick Linux - Software 6 03-29-2005 07:30 AM
JRE Problem Tr@ce Linux - Software 7 03-28-2005 09:40 PM


All times are GMT -5. The time now is 04:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration