Re: [xml] =?koi8-r?b?eG1sRW5jb2RlU3BlY2lhbENoYXJzIGFuZCBjYXJyaWFnZSBy?= =?koi8-r?b?ZXVybiAvIENSTEYgLyAweDBEIDB4MEEgLyBcclxuIC8gMTMsMTA=?=



I specially download latest snapshot and compiling him, this problem don't go.
"\n" - not converting with xmlEncodeSpecialChars and without, i use function - xmlNewTextChild, this what i 
see:

          <Data ss:Type="String">SGL+2CHD
(7-14)</Data>
        </Cell>
        <Cell ss:StyleID="3">
          <Data ss:Type="String">SGL+2CHD
(2-7)</Data>
        </Cell>
        <Cell ss:StyleID="3">
          <Data ss:Type="String">String</Data>
        </Cell>
        <Cell ss:StyleID="3">
          <Data ss:Type="String">DBL+CHD
(7-14)</Data>

But must this:

          <Data ss:Type="String">SGL+2CHD&#10;(7-14)</Data>
        </Cell>
        <Cell ss:StyleID="3">
          <Data ss:Type="String">SGL+2CHD&#10;(2-7)</Data>
        </Cell>
        <Cell ss:StyleID="3">
          <Data ss:Type="String">String</Data>
        </Cell>
        <Cell ss:StyleID="3">
          <Data ss:Type="String">DBL+CHD&#10;(7-14)</Data>

-----Original Message-----
From: Daniel Veillard <veillard redhat com>
To: SABROG <sabrog inbox ru>
Date: Wed, 8 Aug 2007 09:50:22 -0400
Subject: 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 "&#10;", 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 "&#10;" with
xmlEncodeSpecialChars, libxml2 understand only "\r" and convert him to
"&#13;". Now i just open xml file and replace "__newline__" tag on
"&#10;". 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
&#10; . 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/



Подключись к коллективному разуму на Ответах Mail Ru
http://r.mail.ru/cln3255/otvet.mail.ru/



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