I have the 'N Tilde' character Ñ in my Z/OS DB2 database. I am generating an xml file from the data. In the XML I have encoding=UTF-8
, however Internet Explorer gives me the error Illegal character in text field
. If I change the encoding to ISO-8859-1 it works fine.
I thought ISO-8859-1 was a subset of UTF-8, so why is it not working with UTF-8?
Is UTF-8 the best for an XML document?
ISO-8859-1 is not a subset of UTF-8. It can represent a subset of the characters representable in UTF-8, but it doesn't do so in the same way.
Both ISO-8859-1 and UTF-8 are supersets of ASCII (i.e. they can represent all characters that ASCII can represent and they represent them in the same way).
So you can't just label ISO-8859-1 data as UTF-8 and hope that it works, you need to actually store (or convert) your data as UTF-8.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With