
On Tue, Aug 16, 2011 at 12:27:51PM +0100, Daniel James wrote:
On 16 August 2011 13:15, Marius Stoica <letto2@gmail.com> wrote:
File names and comand line arguments are encoded as utf-8 these days
That's not true for windows. It isn't necessarily true for linux either (although it usually is nowadays). The point is that libraries like filesystem and program options should use the native encoding by default.
This is handled by Filesystem v3, as anything that accepts a string input also takes a codecvt, which defaults to a default-constructed codecvt() (which as far as I understand it uses the current locale). I ran into a bug with this the other day on Windows (out of ignorance) where a client machine tried to store UTF-8 paths into a Boost.Filesystem path without using an utf8_codecvt_facet. Speaking of which, the one in detail/utf8_codecvt_facet.{cpp,hpp} is quite unfriendly to end programmers. -- Lars Viklund | zao@acc.umu.se