[fpc-pascal] Explicit encoding of LF in XML
Ludo Brands
ludo.brands at free.fr
Fri Aug 12 17:21:18 CEST 2011
> > Uses strutils;
> > ...
> >
> Foutputdoc.CreateTextNode(LeftStr(UTF8Decode(AnsiReplaceStr(AnsiReplac
> > eStr(E
> > F.Field.AsString,#10,'
'),#13,'')),32767));
> >
> > Ludo
> >
> That's what I thought at first, too ;)
>
> But the & gets encoded again by the XML unit and you get:
>
Of course....
Looking in XMLWrite, I don't see any solution. LF is a valid character in a
text node while & isn't.
Ludo
More information about the fpc-pascal
mailing list