Boost logo

Boost :

Subject: Re: [boost] [string] Realistic API proposal
From: Artyom (artyomtnk_at_[hidden])
Date: 2011-01-29 05:25:07


> If std::string is UTF-8 encoded (as you are suggesting, correct?), then you
>also requires additional copy:
>
> // conversion for Windows API
> std::string u8s = ...;
> std::wstring u16s = convert_to_utf16(u8s);
> HANDLE h = CreateFileW(u16s.c_str(), ...);
>
> Regards,
> Anders Dalvander
>

Fortunately only under Windows, under rest of the normal OSes it
would not require :-).

Also the idea is also to have utf-8 aware API in boost for windows so you just
call:

   boost::ofstream file(utf_name);

Artyom

      


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk