Boost logo

Boost :

Subject: Re: [boost] [General] Always treat std::strings as UTF-8
From: Alexander Lamaison (awl03_at_[hidden])
Date: 2011-01-19 14:54:24

On Wed, 19 Jan 2011 18:52:19 +0200, Peter Dimov wrote:

> Alexander Lamaison wrote:
> [about fopen]
>> Are you saying this is how it should be or this is how it is? Because, on
>> Windows, 'name' certainly can't be UTF-8! The implementation takes 'name'
>> to be in the default local codepage, uses mbstowchar to up-convert it to a
>> UCS2 wchar_t string and delegates it to _wfopen (or similar - I'm doing
>> this from memory).
> For what it's worth, it doesn't, it calls CreateFileA. This may or may not
> produce the same result as what you describe, depending on whether the
> current C locale matches the ANSI code page.

You're quite right. I was mixing up with fstream.


Easy SFTP for Windows Explorer (

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