Parsing XML with numeric entities outside Latin 1

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Laurent

    Parsing XML with numeric entities outside Latin 1

    Hi,

    I have an XML file with this text in it:
    <price>10 &#x20AC;</price>
    (just an example)

    My input and output encodings are Latin 1 (ISO-8859-1).

    When PHP parses it, the characterdata function outputs
    10 ?
    I would like it to output
    10 &#x20AC;
    i.e. just leave the entity as it is, as the character can't be
    represented directly in Latin 1.

    Is this possible ?

    Thank you.
Working...