RE : RE : [fpc-pascal] Explicit encoding of LF in XML
> > 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 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: RE : [fpc-pascal] Explicit encoding of LF in XML
On 12-8-2011 16:31, Ludo Brands wrote: >> Excel needs an encoded LF: >> First line. Second line >> >> 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: ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
RE : [fpc-pascal] Explicit encoding of LF in XML
> All, > > Looking at multiline support of text/string cells for export > to Excel XML format. > > My code, such as: > TDOMElement(FieldNode).SetAttribute('ss:Type', 'String'); > FNode := > Foutputdoc.CreateTextNode(LeftStr(UTF8Decode(EF.Field.AsString > ), 32767)); writes out a cell like: > > First line. > Second line > (Separated by CR LF - changing it to only LF with a hex > editor doesn't help) > > Excel needs an encoded LF: > First line. Second line > > How can I produce that? > Uses strutils; ... Foutputdoc.CreateTextNode(LeftStr(UTF8Decode(AnsiReplaceStr(AnsiReplaceStr(E F.Field.AsString,#10,' '),#13,'')),32767)); Ludo ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Explicit encoding of LF in XML
All, Looking at multiline support of text/string cells for export to Excel XML format. My code, such as: TDOMElement(FieldNode).SetAttribute('ss:Type', 'String'); FNode := Foutputdoc.CreateTextNode(LeftStr(UTF8Decode(EF.Field.AsString), 32767)); writes out a cell like: First line. Second line (Separated by CR LF - changing it to only LF with a hex editor doesn't help) Excel needs an encoded LF: First line. Second line How can I produce that? Thanks, Reinier ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] XMLXSDExport: line ending in Excel cells
On Fri, 12 Aug 2011, Reinier Olislagers wrote: Hi list, I've been refactoring the XMLXSDExport code and am now busy fixing some bugs based on testing. I'd appreciate your input. In Excel text fields, you can generate a line ending by pressing Alt-Enter. On export to XML this is written as So far so good. If exporting dataset text (memo, string, ..) data to Excel XML text fields, which characters do I need to convert to 1. Carriage return + linefeed (#13#10) 2. Linefeed (#10) 3. All occurrences of #10 and #13#10 4. Value of LineEnding constant My reasoning: it shouldn't matter on which platform you're accessing a database, so we should treat both #13#10 and #10 equally, so I'd choose option 3. Your thoughts? Make it a property of the converter. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Re: XMLXSDExport: line ending in Excel cells
On 12-8-2011 12:32, Reinier Olislagers wrote: > In Excel text fields, you can generate a line ending by pressing > Alt-Enter. On export to XML this is written as > So far so good. > > If exporting dataset text (memo, string, ..) data to Excel XML text > fields, which characters do I need to convert to > 1. Carriage return + linefeed (#13#10) > 2. Linefeed (#10) > 3. All occurrences of #10 and #13#10 > 4. Value of LineEnding constant > Well, seems I had to drink more coffee. is line feed encoded in XML. So it doesn't matter, I can just strip out the #13s - still working on getting those pesky Alt-enters correctly imported into Excel but it's probably something very stupid... Reinier ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Should Lazarus and FPC release library updates separately from product updates?
On 12 Aug 2011, at 13:04, Frank Church wrote: Unless library updates don't depend on product updates shouldn't they be kept separate? I don't know if it is something already done that is not explained well enough or is not done at all? It is not done at all for FPC. The reason is that it requires a lot of work (testing and packaging for umpteen platforms) and there is no one who has volunteered to do that work. With the upcoming fppkg infrastructure (http://wiki.freepascal.org/ fppkg), this may however become easier to do in the future. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Should Lazarus and FPC release library updates separately from product updates?
Whenever updates are made it is difficult to tell whether they are due to updates or fixes in the libraries, ie FCL, LCL etc or the product ie the Lazarus IDE and the FreePascal language and compiler. Unless library updates don't depend on product updates shouldn't they be kept separate? I don't know if it is something already done that is not explained well enough or is not done at all? -- Frank Church === http://devblog.brahmancreations.com ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] XMLXSDExport: line ending in Excel cells
Hi list, I've been refactoring the XMLXSDExport code and am now busy fixing some bugs based on testing. I'd appreciate your input. In Excel text fields, you can generate a line ending by pressing Alt-Enter. On export to XML this is written as So far so good. If exporting dataset text (memo, string, ..) data to Excel XML text fields, which characters do I need to convert to 1. Carriage return + linefeed (#13#10) 2. Linefeed (#10) 3. All occurrences of #10 and #13#10 4. Value of LineEnding constant My reasoning: it shouldn't matter on which platform you're accessing a database, so we should treat both #13#10 and #10 equally, so I'd choose option 3. Your thoughts? Thanks, Reinier ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Working Free Pascal android JNI example
Or more generally: Any ideas of where / what I should look for to fix this? -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Working Free Pascal android JNI example
Well, the hack doesn't seam to really work well anyway, because it crashes executables generated by the compiler =( So one can either activate the hack and have a compiler only for DLLs or not have it and have a compiler only for executables... Where does argv and argc come from? From dllprt0.as ? -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal