Re: [xml] xmllint: Why does it convert UTF-8 to numeric entity refs?

On Mon, Aug 04, 2003 at 12:22:03PM -0400, David Sewell wrote:
    <test lang="fran&#xE7;ais">UTF-8 character: &#xE7;</test>
    <test lang="fran&#xE7;ais">numeric ref: &#xE7;</test>
    <test lang="fran&#xE7;ais">entity ref: &#xE7;</test>

Is there any way to preserve the UTF-8 output?

  No, it's totally equivalent from an XML point of view anyway.

(It would be nice to have an optional flag to xmllint allowing a choice
of output between characters and numeric refs.)

  There is just too many option already, and this would require propagating
one more set of flags for the serialization routine. I see no justification
for adding more complexity to the serializer. The outputs are equivalent
anyway, as soon as the data is processed by an XML parser both version
cannot be distinguished,


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]