I parse xml file in android. I copypasted example…
It works with english words, but I need to get it working with russian words (it’s not working with russion words – without exception – simple bad encoding).
I tried to add this
InputSource is = new InputSource();
is.setEncoding("UTF_8"); //add this
is.setCharacterStream(new StringReader(xml));
doc = db.parse(is);
It didn’t helped me not a little
Xml is in utf-8 encoding. I think, my app translates words in utf-8 to windows1252…
Can somebody please help?
Thanks for edit!)
Example with sourcecode – http://www.androidhive.info/2011/11/android-xml-parsing-tutorial/
It’s simple.
I get answer from http://forum.sources.ru/index.php?showtopic=354149&st=15&#entry3106098
In English:
My app get word from xml in bad encoding!
Simple, I must add encoding in moment, when i get word!