Boost logo

Boost Users :

From: Cory Nelson (phrosty_at_[hidden])
Date: 2008-08-07 09:27:04


On Thu, Aug 7, 2008 at 2:21 AM, Ken zhang <kennir_at_[hidden]> wrote:
> Hello
>
> I hava a UTF8 string reading from TinyXML, I want convert to a Unicode
> string (wchar_t) for some reasons, How can convert it by boost?
>

Boost doesn't have anything to do this. I've got some code here you can use:

http://svn.int64.org/svnroot/int64/snips/unicode.hpp

std::string u8;
std::wstring wc;

unicode::transcode<unicode::utf8, unicode::wchar_encoding>(u8, wc);

-- 
Cory Nelson

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net