£ character in XML

213 Views Asked by At

Using Delphi XE2 TXMLDocument and MSXML

<description>£1.00 x 100</description>   parsing error as does
<description><![CDATA[£1.00 x 100]]></description>   parsing error as does

The £ character is not noted as an invalid character.

Is this an issue? More importantly what workaround is suggested.

TIA

Ephraim

2

There are 2 best solutions below

1
Ephraim On
&#x00A3; 

is a workaround

<description>&#x00A3;1.00 x 100</description>
1
David Heffernan On

The likely explanation for this is that you have specified UTF-8 in your ?xml declaration but have actually encoded the file using ANSI. Obviously the solution is to encode the file correctly as UTF-8.