From: Bennett, Patrick (Patrick.Bennett_at_[hidden])
Date: 2004-08-25 08:33:10
> -----Original Message-----
> From: boost-bounces_at_[hidden]
> On Behalf Of John Maddock
> Sent: Wednesday, August 25, 2004 5:50 AM
> To: boost_at_[hidden]
> Subject: Re: [boost] Re: Re: New design proposal for boost::filesystem
> > Win32 doesn't support UTF-8 filenames natively. That's why
> > boost::filesystem would have to convert t o/from UCS-2 along Win32
> > interface boundaries.
> > If you're concerned about other platforms, you shouldn't be.
> > boost::filesystem currently works only with latin encodings in ascii
> > strings so no functionality would be taken away.
> Not true: currently the narrow character strings passed to
> boost.filefsystem are assumed to be in that platforms native encoding
> you can for example pass native Windows narrow character strings (not
> just ACSII ones) to the lib, and actually I don't see why you can't
> UTF-8 on Linux.
[Bennett, Patrick] Yes, you could pass UTF-8 through as-is in Linux. If
your application was running in Japan on Windows, boost::filesystem
would not work at all. So, yes, you can pass all sorts of extended
characters to Windows in an 8-byte string (the majority of which aren't
really valid for filenames), but that does nothing for Unicode support.
It simply won't work. For Unicode support the application must call the
xxxxxW versions of the windows API's and pass in a UCS-2 string.
> What you can't do is use the same encoding on all platforms, because
> underlying platform API's won't understand them.
[Bennett, Patrick] Correct, this was my whole point. If I can't write a
portable (to at least Linux and Windows), internationalizable
application with boost::filesystem then it's of no use to (at least) me.
This is why I suggested that UTF-8 be used as boost::filesystem's
encoding. It can be passed through as-is or converted as needed on each
platform and it would be backwards compatible with existing
I'll probably not talk about this topic too much more. I think I've
pretty much said everything I'm going to say, so if no one else agrees,
I'll just move along. ;)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk