[android-developers] Displaying unicode in a TextView?
I am parsing epub books, and I want to render the pages inside of a TextView. I am able to get the book content, and I display it as follows. Assume bookContent is a String which contains the text from an epub book section, and assume that this.view is a reference to my TextView ... this.view.setText(Html.fromHtml(content).toString()); This renders fairly nicely inside of my TextView, but if the book section contains unicode characters, they show up as garbage on the screen. I would like my TextView to properly interpret the unicode characters and display them how they're intended to look. How can I configure my TextView to properly display utf8 characters as something readable? Note that I don't want to eliminate the utf8 characters, nor do I want to convert them into any other encoding. I just want them to display properly on the screen. Thanks in advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Displaying unicode in a TextView?
I am parsing epub books, and I want to render the pages inside of a TextView. I am able to get the book content, and I display it as follows. Assume bookContent is a String which contains the text from an epub book section, and assume that this.view is a reference to my TextView ... this.view.setText(Html.fromHtml(content).toString()); This renders fairly nicely inside of my TextView, but if the book section contains unicode characters, they show up as garbage on the screen. I would like my TextView to properly interpret the unicode characters and display them how they're intended to look. How can I configure my TextView to properly display unicode characters as something readable? Note that I don't want to eliminate the unicode characters, nor do I want to convert them into any other encoding. I just want them to display properly on the screen. Thanks in advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Displaying unicode in a TextView?
I seriously doubt this is a TextView problem, unless perhaps the characters you are trying to display are not in the font. What type of data is the content variable? Most likely there is an incorrect content encoding somewhere in your data chain. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en