You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by ajay bhadauria <ab...@yahoo.com> on 2015/02/27 19:52:07 UTC
XalanDOMString to STL string
Hello, We have xalan 1.111 c++ library and we are using UTF-8 encoded not UTF-16 files. Q 1 Classes like XalanDOMString returns 2-byte and we are trying to convert to STL string class. Below is the snippet code which is working but I was wondering of any efficient way of converting from XalanDOMString to STL string. Q2 : is there any way to compile xalan c++ to default to UTF-8 so that we do not need to use the below code.
XalanDOMString::CharVectorType vArg;
vArg = TranscodeToLocalCodePage(theArg);
std::string sArg(vArg.begin(), vArg.end()); RegardsAjay