Skip to content

Commit

Permalink
deliberately convert the string to UTF-8
Browse files Browse the repository at this point in the history
IB-4785 It should not depend on local macine's current code page.

Signed-off-by: Oleg Prokofjev <oleg@aktors.ee>
  • Loading branch information
olegprokofjev authored and Telgat committed May 25, 2017
1 parent 5557407 commit 4f8605b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/xml/AnyType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <xsd/cxx/xml/dom/parsing-source.hxx>
#include <xsd/cxx/xml/dom/serialization-source.hxx>
#include <xsd/cxx/xml/char-utf8.hxx>

using namespace digidoc::xades;
using namespace xercesc;
Expand Down Expand Up @@ -96,9 +97,8 @@ AnyType::AnyType(const DOMElement &e, Flags f, Container *c)
if(p.cur_is_text())
{
const XMLCh *text = p.cur_text().getWholeText();
char *outbuf = XMLString::transcode(text);
text_ = std::string(outbuf);
XMLString::release(&outbuf);
XMLSize_t len = XMLString::stringLen(text);
text_ = char_utf8_transcoder<char>::to(text, len);
isText = true;
continue;
}
Expand Down

0 comments on commit 4f8605b

Please sign in to comment.