In my android app, i download a xml file from a server, construct a xml doc out of it, pars it and display the info in an layout with the开发者_如何学编程 usual setText method. However the Swedish characters åäö wont show correctly.
I have no idea how to fix this, any tips?
if you are using eclipse ide
go to preferences
under Window menu
, then under General
node, select Workspace
, in the window shown, change the text file encoding
to UTF8
..
and you can change the encoding per file from its properties
window
I found the problem, it was the in the beginning that was not suppose to be there. I'm not really sure why, the xml file is encoded with UTF-8 anyway, but the DocumentBuilder was not able to build a Document out of it when that line was first.
Thanks for the tips that lead me to it!
精彩评论