Subject: Re: [boost] Formal Review Request: Boost.String.Convert
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2009-02-17 10:57:39
Vladimir Batov wrote:
>> - std::string <--> std::wstring or similar (based on a future
>> Boost.Unicode library)
> I am not sure we can do std::string <-> std::wstring unless we know what
> std::string represents (currently it can be UTF8 or MBCS). If, with the
> introduction of std::u8string, std::string is guaranteed to be MBCS,
> then I guess we can have std::string <-> std::wstring as well.
I think it would be sufficient to rely on the locale to make decisions
about the char nature. I have solved this particular task in Boost.Log.
You may find it in boost/log/detail/code_conversion.hpp and
libs/log/src/code_conversion.cpp, if you're interested.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk