Ok, so the other week I spent two days on trying to lure my Netbeans project to execute with the possibility to read utf-encoded xml on windows platforms. Reading through, and trying, multiple sites with advice on how to set the file.encoding in a variety of project and platform settings files, I finally changed my xml-reading implementation from getClass().getResourceAsStream("guide.xml") to
new InputStreamReader(getClass().getResourceAsStream("guide.xml"), "UTF-8").
Just like that. If this is usefull to someone else I'm happy...
Inga kommentarer:
Skicka en kommentar