开发者

Problem with swedish characters (åäö) when downloading xml in android

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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜