[xmlsec] Unicode Utf8 as xml content?

Aleksey Sanin aleksey at aleksey.com
Wed Aug 29 08:49:31 PDT 2007


> 1. What kind of conversion is this "ä" -> "&#x4820"?

No idea. But read bellow.

> 
> 2. My hope is that xmlsec encupsulates iconv.dll. 

Depends on how you build xmlsec and libxml2.

> How can I create nodes with the XmlSec Api? I cannot find any api to set the node content.
> xmlSecAddChild(oFatherNode, BAD_CAST "Name", 0);

Search LibXML2! In general, all LibXML2 calls assume that you pass
UTF8 strings. Thus, you need to make conversion to UTF8 *before*
you call LibXML2/xmlsec functions

> 3. At this moment I convert the xmlChar I get from the parser manually to unicode 
 > (unsigned short), because I'm working within my program with 
std::wstring. Is there
 > a possibilty to get directly unicode strings?

Not sure what do you mean by this. But I am sure you can use
conversion apis from iconv or any other library directly.

Aleksey



More information about the xmlsec mailing list