openjdk team mailing list archive
-
openjdk team
-
Mailing list archive
-
Message #05156
Re: Bug#608723: josm: LC_CTYPE decides language used for user interface
reassign 608723 openjdk-6-jre
clone 608723 -1
retitle -1 trick josm wrapper into using the correct locale setting
forcemerge 497072 608723
found 497072 6b20-1.9.2-1
affects 497072 josm
thanks
Hello Ansgar,
On Mon, 3 Jan 2011 01:37:20 +0100, David Paleino wrote:
> On Mon, 03 Jan 2011 01:01:20 +0100, Ansgar Burchardt wrote:
>
> > When I start josm, the interface uses Japanese by defautl even though
> > only LC_CTYPE is set to a Japanese locale:
> >
> > $ locale
> > LANG=C
> > LANGUAGE=
> > LC_CTYPE=ja_JP.UTF-8
> > LC_NUMERIC="C"
> > LC_TIME="C"
> > LC_COLLATE="C"
> > LC_MONETARY="C"
> > LC_MESSAGES="C"
> > LC_PAPER="C"
> > LC_NAME="C"
> > LC_ADDRESS="C"
> > LC_TELEPHONE="C"
> > LC_MEASUREMENT="C"
> > LC_IDENTIFICATION="C"
> > LC_ALL=
> >
> > locale(7) states that LC_MESSAGES should decide which language messages
> > are displayed in, not LC_CTYPE.
>
> I'd include LANG, LANGUAGE and LC_ALL there as well. Am I wrong?
>
> However, I can confirm that even just "LC_CTYPE=<locale> josm" changes its
> language.
I found that this really is a Java bug. See the attached code example, run it
with different LC_CTYPEs and watch the results.
OpenJDK maintainers: I see that the bug was forwarded to Sun's bugtracker.
However, it has been marked as duplicate of another bug, which seems a totally
different bug to me, and marked as fixed. However, the bug's evidently still
there. Do you know whether there's some progress on this side?
Ansgar: I could just trick the wrapper into setting LC_* variables. I see
that with:
$ LC_ALL=it_IT.UTF-8 LC_CTYPE=C josm
I no longer have messages in English (as LC_CTYPE=C would imply), but in
Italian. It seems that LC_ALL has higher priority over LC_CTYPE. Please
continue discussion on the cloned bug number :)
Kindly,
David
--
. ''`. Debian developer | http://wiki.debian.org/DavidPaleino
: :' : Linuxer #334216 --|-- http://www.hanskalabs.net/
`. `'` GPG: 1392B174 ----|---- http://deb.li/dapal
`- 2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
import java.util.Locale;
class LocaleTest {
public static void main(String[] args) {
Locale l = Locale.getDefault();
System.out.println(" Language, Country, Variant, Name");
System.out.println("");
System.out.println("Default locale: ");
System.out.println(" "+l.getLanguage()+", "+l.getCountry()+", "+", "+l.getVariant()+", "+l.getDisplayName());
}
}
Attachment:
signature.asc
Description: PGP signature
Follow ups