Wednesday, October 14, 2009

™ not working with XML

Sample HTML:



Save it as sample.html
In the browser you will see as below.



Replace ™ with ™

Sample XML:



Save it as sample.xml
It will work fine.
Replace ™ with ™
It will not work.
See below.



Reason:
The code positions from 128 to 159 are reserved for control codes like DELETE, NEXT LINE, SINGLE GRAPHIC CHARACTER INTRODUCER etc and these are not allowed in decoded XML.

In windows char set (Windows-1252) some of the octets from the range 128-159 are assigned to printable characters. But in ISO 8859-1 character set they are reserved for control codes.

No comments: