Re: [xml] xmlEncodeSpecialChars and carriage reurn / CRLF / 0x0D 0x0A / \r\n / 13, 10



On Wed, Aug 08, 2007 at 05:18:40PM +0400, SABROG wrote:
I am generate xml file with MSOffice spreedsheet format. In workbook
i place few carriage return (ctr+enter), after i save workbook to xml
format from Excel i see what xml replace \n to "
", so if i just
  Have you read the spec ?
   http://www.w3.org/TR/REC-xml/#sec-line-ends
 this seems related.

replace this symbol to \n (10 dec) - Excel don't understand this. From

  I'm sorry I have no way nor any reason to try to debug Excel problems.

my program i generate this xml format, but i can't write "
" with
xmlEncodeSpecialChars, libxml2 understand only "\r" and convert him to
"
". Now i just open xml file and replace "__newline__" tag on
"
". Can i reimplement global escape function with my or may be
libxml2 have function like writeRawString without check content ?

  if you have code point 10 in the content string libxml2 will generate

 . I'm sure about this, and I don't see how this would relate to
xmlEncodeSpecialChars, I don't know what you are doing, but what you 
must do is put a character of value 10 in the UTF-8 string, which doesn't
sound a very complex task.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/



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