Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::filesystem::path in UTF-8 on Windows
From: John M. Dlugosz (mpbecey7gu_at_[hidden])
Date: 2011-11-05 17:42:09


On 11/5/2011 12:57 PM, Igor R wrote:
>>>>> On Windows you should convert it to utf16.
>
> I don't think "path" object can do such a conversion automatically, so
> you should convert it on your own using CRT, WinAPI, ATL macros or any
> other facilities.

Uh, I don't think you understood the point of the question at all, nor know about the class.

"If the value type of [begin,end) or source arguments for member functions is not
value_type, and no cvt argument is supplied, conversion to value_type occurs using an
imbued locale."

"For Windows-like implementations, including Cygwin and MinGW, path::value_type is
wchar_t. The default imbued locale provides a codecvt facet that invokes Windows
MultiByteToWideChar or WideCharToMultiByte API's with a codepage of CP_THREAD_ACP if
Windows AreFileApisANSI()is true, otherwise codepage CP_OEMCP. "

It DOES CONVERT, and that is the starting point of my issue. See? It does convert, and
not in the way I want (if I indeed wanted it to).


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