German characters display in TextView

a 夏天 提交于 2019-12-08 06:07:06

问题


In my Android application I am trying to display German Text. ö ä ü ß those characters are unable to display in TextView. If anyone having idea how to set font or how to display characters let me know. The Data I am receiving from services.


回答1:


I think you should read wikipedia: Character_encoding as well as The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)




回答2:


My problem solved I add

DocumentBuilder db = dbf.newDocumentBuilder(); ByteArrayInputStream bis = new ByteArrayInputStream(xml.getBytes("UTF-8")); doc = db.parse(bis); in my code in xml reader so now I can display german characters properly...



来源:https://stackoverflow.com/questions/8383889/german-characters-display-in-textview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!