Re: [Java-gnome-developer] java encoding problems
Brought to you by:
afcowie
From: Andrew C. <an...@op...> - 2006-06-18 08:46:18
|
On Sat, 2006-06-17 at 17:51 +0200, pancake wrote: > System.out.println(line); // will show strange chars on iso8859 terminals > new Label(line); // will be ok for iso8859 X or utf8 ones > > So, I don't need special chars for the console ATM. Perhaps a bit off topic, but a few weeks ago we were having a shindig on #gnome-hackers about how to use the [a] Compose key to express unusual characters like », ° and €. 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. export LANG="en_CA" I responded, and his immediate comeback was "switch to export LANG="en_CA.UTF-8" in your .bashrc, logout, login again, and rock on" 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 stream wrappers. One observation - Jikes gets messed up if you put something like "blah blah » blah blah" in a hardcoded String - the result is like "blah blah Å» 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. AfC Sydney |