[fpc-pascal] Explicit encoding of LF in XML
Reinier Olislagers
reinierolislagers at gmail.com
Fri Aug 12 16:42:27 CEST 2011
On 12-8-2011 16:31, Ludo Brands wrote:
>> Excel needs an encoded LF:
>> <Cell><Data ss:Type="String">First line.
Second line</Data></Cell>
>>
>> How can I produce that?
>>
>
> Uses strutils;
> ...
> Foutputdoc.CreateTextNode(LeftStr(UTF8Decode(AnsiReplaceStr(AnsiReplaceStr(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:
More information about the fpc-pascal
mailing list