Re: [Java-gnome-developer] java encoding problems
Brought to you by:
afcowie
From: pancake <pa...@ph...> - 2006-06-18 13:50:37
|
The example that I have submitted the last day it was just for handling p= lain text files. If you're using MessageBundles to handle the localization strings = you must do another thing. As I read in some mailing list there's a "bug" in JDK that forces all Mes= sageBundle files parsing to be in iso-8859-15 format. So, the right way is to write = all MessageBundles in iso-8859-15 encoding instead of utf-8. I fixed this in the gdvb-git repo. And now everything is ok :) I've teste= d this on a iso-8859-15 system and "elektranox" on a utf8 environ. I'll update the localization tutorial in the java-gnome wiki. --pancake On Sun, 18 Jun 2006 18:46:09 +1000 Andrew Cowie <an...@op...> wrote: > On Sat, 2006-06-17 at 17:51 +0200, pancake wrote: > > System.out.println(line); // will show strange chars on iso8859 termi= nals > > new Label(line); // will be ok for iso8859 X or utf8 ones > >=20 >=20 > > So, I don't need special chars for the console ATM. >=20 > Perhaps a bit off topic, but a few weeks ago we were having a shindig o= n > #gnome-hackers about how to use the [a] Compose key to express unusual > characters like =C2=BB, =C2=B0 and =E2=82=AC. >=20 > Along the way I mused that it would be so cool if such things worked in > my terminals and davyd asked what my LANG setting was. >=20 > export LANG=3D"en_CA" >=20 > I responded, and his immediate comeback was "switch to >=20 > export LANG=3D"en_CA.UTF-8" >=20 > in your .bashrc, logout, login again, and rock on" >=20 > Works like a charm - my gnome-terminals are all beautifully displaying > the unicode characters \u00bb, \u2026 etc and I just use > System.out.println() - no mucking around with encodings and extra strea= m > wrappers. >=20 > One observation - Jikes gets messed up if you put something like "blah > blah =C2=BB blah blah" in a hardcoded String - the result is like "blah= blah > =C3=85=C2=BB blah blah". Eclipse doesn't have any problem, but I do put= in "blah > blah \u00bb blah blah" in Strings just to be safe as we tend to use > Jikes when building from make. >=20 > AfC > Sydney >=20 >=20 >=20 >=20 > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer |