[Expat-discuss] Re: CDATA problems

Karl Waclawek karl at waclawek.net
Fri Feb 28 10:07:46 EST 2003


> I have one problem on CDATA section. . I don't understand because the parser
> analize the Section CDATA, shouldn't be ignored?

No, it should not be ignored.
 
> If I create a parser with enconding UTF-8, for analize
> Edit1.txt (see attachment), and in the inner of section CDATA there are some
> characters write no UTF-8 code,
> the parser fails.Why?

All characters must be UTF-8 encoded, no exceptions.
If you want to put arbitrary binary data into a CDATA section,
then you must encode them. Base64 encoding generates output
compatible with UTF-8.

Karl



More information about the Expat-discuss mailing list