How to parse XML with special characters?

Whenever I try to parse XML with special characters such as ō or ζΊ€ 月 ε…ˆη”Ÿ, I get an error. Xml documents claim to use UTF-8 encoding, but that doesn't seem to be the case. Here's what the nasty text looks like when viewing XML in Firefox:

Bleach: Diamond Dust Rebellion - M & Aring; Hitotsu no Hy & Aring; rinmaru; DiamondDust Rebellion Bleach - Mou Hitotsu no Hyourinmaru

On the actual website & Aring; actually the symbol ō.

One day, Doraemon and his friends meet Professor Mangetsu (& Aelig; & ordm; & aelig; & Arel; & ccedil ;, Professor Mangetsu?), who studies magical and magical creatures such as goblins and his daughter Miyoko (& Ccedil; & frac34; & aring; & trans; & shy ;, shy ;, Miyoko?), And they are warned of the perilous approach of the criminal star β€œStar” to Earth & # 039; s orbit. />

And again, on the website itself, these symbols appear as ζΊ€ 月 ε…ˆη”Ÿ and 美 倜 子.

The actual XML file is formatted correctly, except for those special characters that do not appear to use UTF-8 encoding. Is there a way to get NSXML to parse these XML files?

+4
source share
1 answer

To use characters other than those that are utf-8, you need to use your special code. If you want to introduce ΓΆ , you need to type ö

Find more on
Wikipedia: http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references

+3
source

Source: https://habr.com/ru/post/1311943/


All Articles