I am working on an app which calls a rest web service. Sometimes the xml responses contain characters which the phone can not display. When displaying these characters, an empty box is displayed instead. I would like to filter out these characters. How can I detect if a character will be able to be displayed on the screen?
Some specific characters include:
http://www.fileformat.info/info/unicode/char/0094/index.htm
http://www.fileformat.info/info/unicode/char/0080/index.htm
http://www.fileformat.info/info/unicode/char/0092/index.htm
Android support the following encodings
US_ASCII shouldn’t make any problems.
For ISO_8859_1 you should check wiki
for control chars 0x00-0x1f and 0x7f-0x9f and filter them.
And of course use a matching font.
Using UTF_8 or 16 is more complex, read Joels The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets
You might find this mailing list useful.