Boost logo

Boost :

Subject: Re: [boost] wfopen
From: Christian Henning (chhenning_at_[hidden])
Date: 2010-12-13 17:18:39


Hi,

On Sun, Dec 12, 2010 at 10:28 PM, KTC <ktc_at_[hidden]> wrote:
> On 13/12/2010 01:58, Christian Henning wrote:
>>
>> Hi there, one of the requirements for me to fix before I include
>> io_new to boost is to support opening files with unicode filenames. As
>> far as I can see there is _wfopen on Windows platforms. What's the one
>> for Linux and co?
>>
>> I'm a bit puzzled that no boost lib seems to use _wfopen. I searched
>> all files. Is there something better?
>
> Erm, Boost.Filesystem ?

My interface has to support FILE*, Streams, Strings, and
boost::filesystem::path. It seems to me that I can use _wfopen only on
Windows machines.

In essence I need to do the following?

#ifdef _Windows
FILE* f = _wfopen( L"test.jpg", L"rb");
#else
FILE* f = fopen( L"test.jpg", L"rb");
#endif // _Windows

Is that correct?

Thanks,
Christian


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