Re: [Java-gnome-developer] java encoding problems
Brought to you by:
afcowie
From: pancake <pa...@ph...> - 2006-06-17 15:57:07
|
Great..I think I found the solution, but this only works on GTK, not in console The way is: BufferedReader br = new BufferedReader( new InputStreamReader( new FileInputStream(filename), "UTF-8")); String line = br.readLine(); 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. Thanks. On Fri, Jun 16, 2006 at 08:47:38AM +0200, Chr. V. J. Bruessow wrote: > Hi, > > pancake wrote: > ... > > It looks like Java doesn't gets the file encoding automagically, but > > I don't know how to set the charset for the FileReader class. BTW > > the other question is..when I've read the string .. do I have to > > reencode't to the system's default encoding ? > > Maybe these sites can help you: > > http://www.jorendorff.com/articles/unicode/java.html > http://www.thescripts.com/forum/thread16986.html > > > Greetings, > Christian > > > > > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer |