Boost logo

Boost :

Subject: Re: [boost] wfopen
From: Artyom (artyomtnk_at_[hidden])
Date: 2010-12-14 01:04:13


Hello,

Once I had written something called "nowide"

http://art-blog.no-ip.info/files/nowide.zip

See, this as well: http://comments.gmane.org/gmane.comp.lib.boost.devel/205699

A simple library that does this "in-other-way" i.e.
allows to call fopen under windows with UTF-8 string rather
then using wide string as on all "normal" platforms.

So basically you need to use boost::nowide::fopen with normal utf-8 encoded
strings (under windows) or current locale (normally utf-8) under all other
platforms.

And I would **strongly** recommend never use so called "wide" strings
in portable applications. They are very inconsistent (as for UNIXes it us UTF-32

and under Windows they UTF-16) and usually quite useless as
wide characters has very few added value over UTF-8 string.

And when working with Windows I would recommend converting UTF-8 to Wide string
just before passing them to OS functions (like _wfopen for example).

Artyom

----- Original Message ----
> From: Christian Henning <chhenning_at_[hidden]>
> To: boost <boost_at_[hidden]>
> Sent: Mon, December 13, 2010 3:58:06 AM
> Subject: [boost] wfopen
>
> 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?
>
> Thanks,
> Christian
> _______________________________________________
> Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
>

      


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