Re: [xml] wide characters & xmlDocDumpFormatMemory



On Fri, Feb 04, 2005 at 10:47:24AM +0000, David Harris wrote:
  res = xsltApplyStylesheet(cur, doc, params);
xmlDocDumpFormatMemory(res, &xmlbuff, &buffersize, 1);

   Bzzzz wrong approach. You need an XSLt specific serialization funtion
 like indicated in the tutorial, plus define in your stylesheet 
    http://www.w3.org/TR/xslt#output
    encoding = string 

 If you had just looked at the doc for the functions you used
   http://xmlsoft.org/html/libxml-tree.html#xmlDocDumpFormatMemory
you would have seen just below 
   http://xmlsoft.org/html/libxml-tree.html#xmlDocDumpFormatMemoryEnc

basically Read the Docs !


xmlDocDumpFormatMemory works fine in xmlbuff is coerced to char but not 
wchar_t. How can I use wide characters? are there wide character versions of 
these functions? I certainly couldnt find them or any clue about using utf8 
input for this library.

  You need to read more about the subject
    http://www.w3.org/TR/REC-xml/#sec-guessing
if you use XML, you'd better read the associated spec. It does *not* have to
show up at the API level. There is also specific doc about encoding in
libxml2
    http://xmlsoft.org/xmlmem.html
  it' 2 clicks away from the main page http://xmlsoft.org/

  Maybe you "certainly" could not find informations, but the informations
are "certainly" available and indexed by both google and xmlmsoft own
search engines.

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
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]