[1.45][filesystem3] utf8 support

Hi! now I switched to filesystem3. Everything works, but there is one issue on windows. I'd like to use utf8 in my application. I can imbue an utf8-locale to path. But if I have legacy libraries that take only 8 bit strings then I would pass utf8 instead of ansi (e.g. latin1). Therefore filesystem::path can be seen as a gateway between the application and the operating system and therefore needs two locales, one for the application and one for the operating system. Or an additional method utf8() that returns utf8 regardless of the locale. What do you think? -Jochen

On Sat, Nov 27, 2010 at 4:36 PM, Jochen Wilhelmy <j.wilhelmy@arcor.de>wrote:
Hi!
now I switched to filesystem3. Everything works, but there is one issue on windows. I'd like to use utf8 in my application. I can imbue an utf8-locale to path. But if I have legacy libraries that take only 8 bit strings then I would pass utf8 instead of ansi (e.g. latin1). Therefore filesystem::path can be seen as a gateway between the application and the operating system and therefore needs two locales, one for the application and one for the operating system. Or an additional method utf8() that returns utf8 regardless of the locale. What do you think?
Without sample code, I may be missing something. But can't you achieve what you want by use of the overloads for various class path functions that take a "const codecvt_type&" argument? HTH, --Beman
participants (2)
-
Beman Dawes
-
Jochen Wilhelmy