Boost logo

Boost :

Subject: Re: [boost] [filesystem] Version 3 of Boost.Filesystem added to trunk
From: Alexander Lamaison (awl03_at_[hidden])
Date: 2010-06-04 05:03:58

On Thu, 3 Jun 2010 20:04:26 -0400, Beman Dawes wrote:

> On Thu, Jun 3, 2010 at 6:48 PM, Alexander Lamaison <awl03_at_[hidden]> wrote:
>> On Wed, 2 Jun 2010 11:07:34 -0400, Beman Dawes wrote:
>>> * Any other comments or suggestions?
>> Some code I have wraps a SFTP library that returns paths as UTF-8 strings.
>> These need to be converted to the local code page before displaying to the
>> user.  My original plan was to typedef basic_path with a traits class of my
>> own that I could imbue with a specific locale to do the conversion.
>> With FSv3 the only way to do this seems to be path::imbue() which imbue
>> *all* paths, globally.  Or am I missing something?
> Yep, there is another way. First convert the UTF-8 string to a UTF-16
> string using software of your choice. Then construct a
> boost::filesystem::path with the UTF-16 string as an argument.
> Alternately, assign the UTF-16 string to a boost::filesystem::path.

If I contruct a path directly using a UTF-8 char string, will the UTF-8 to
UTF-16 conversion not be taken care of by codecvt?


SFTP for Windows Explorer (

Boost list run by bdawes at, gregod at, cpdaniel at, john at