Re: UTF-8 in Swing app on Windows
| From:Hendrik Maryns [gtw37bn02@masked-domain] |
| Sent on:Wed, 07 May 2008 14:05:16 +0200 |
| In reply to:UTF-8 in Swing app on Windows sent on Wed, 07 May 2008 13:46:49 +0200 by Hendrik Maryns [gtw37bn02@masked-domain] |
Hendrik Maryns wrote:
> Hi,
>
> I have a Swing application which runs fine on Linux, showing some UTF-8
> symbols outside of the usual range fine. However, on Win2000, these
> show up as the usual strange symbols. So obviously, the strings are
> interpreted as cp1252.
>
> How can I set it to use the proper symbols?
>
> This only happens with the native look and feel, if I choose the default
> cross-platform one, the menu’s show up fine.
>
> However, there is some text I read in and display as well, which gets
> garbled all the same. How to fix this?
Hm, seems to work now, strangely, although the only thing I changed was
a fix to my second question:
final BufferedReader queriesF = new BufferedReader(new
InputStreamReader(new FileInputStream(selectedFile), "UTF-8"));
instead of
final BufferedReader queriesF = new BufferedReader(new
FileReader(selectedFile)));
Ah well, H.
Other messages in this topic