
On Fri, Oct 17, 2008 at 7:17 AM, Johan Torp <johan.torp@gmail.com> wrote:
How do convert a boost::filesystem::wpath to a known encoding in the native filesystem's path representation?
Specifically I want to convert a boost::filesystem::wpath to a third party string (CFString from Carbon). In order to do that I must know the encoding of wpath.string() or wpath.external_file_string() on Mac, which is "implementation defined".
wpath.external_file_string() returns the type and encoding required by the platform. For Mac OS X, the type is std::string, and the Apple web site says the encoding is Unicode. I assume that means UTF-8, although I couldn't find that stated explicitly.
Interfacing boost::filesystem::wpath with 3rd party APIs seems like common problem.
Sure. That's why external_file_string is exposed. Internationalization should be a bit easier with Boost.Filesystem Version 3 that I'm working on, because there is a single path type. --Beman