pundog wrote:

Alberto Massari wrote:
As for the std::string -> XMLCh* conversion, just use the transcodeFrom
method exposed by the same transcoder.

Alberto


But the "transcodeFrom" function receives an XMLCh* as the source string.
but i've got an std::string. How can i convert my std::string to XMLCh*
using a specific (utf-8) encoding?
As you can read here http://xerces.apache.org/xerces-c/apiDocs/classXMLTranscoder.html#b9d5409d562aa54f99dc01617091c457, the signature is

virtual unsigned int XMLTranscoder::transcodeFrom( const XMLByte <http://xerces.apache.org/xerces-c/apiDocs/XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126> *const srcData, const unsigned int srcCount, XMLCh *const toFill, const unsigned int /maxChars/, unsigned int & /bytesEaten/, unsigned char *const /charSizes)/
//
//It takes XMLByte* (i.e. unsigned char*, that you should get from std::string.c_str() ) and fills an XMLCh buffer of maxChars.

Alberto

Reply via email to