I am working on an application that calls a web service for recreation. Sometimes xml responses contain characters that cannot be displayed on the phone. When these characters are displayed, an empty field is displayed instead. I would like to filter out these characters. How to determine if a character can be displayed on the screen?
Some special 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 encodings
US_ASCII .
ISO_8859_1 wiki 0x00-0x1f 0x7f-0x9f . , , .
UTF_8 16 , Joels , Unicode
.
, :
Charset.defaultCharset();
XML XML Content-Type HTTP-.:
<?xml version="1.0" encoding="utf-8" ?>
Content-Type: text/html; charset=utf-8
XML, , :
new String( bytes);
, Dalvik .:
new String( bytes, encoding);
, Character.isIdentifierIgnorable() , . Character.isISOControl(), , .
Character.isIdentifierIgnorable()
Character.isISOControl()
Source: https://habr.com/ru/post/1741379/More articles:Resharper plugin for sorting methods in alphabetical order? - sortingКомпилировать OpenSSH для использования в приложении iphone - objective-cUsing a hash to check if a page with $ _POST values has been updated - postПолучение первого результата из запроса LINQ - почему ElementAt (0) терпит неудачу, когда First () преуспевает? - c#Displaying a hash map of coordinates in sleep mode with annotation - javaPhp file upload function - phpHow to save URL parameters when writing custom 404 error page? - asp.netbutton logic to disable or not in mvc - design-patternsКак узнать, является ли объект или decendant - c#How to call a method when you click Finish in KeyBoard? - objective-cAll Articles