Boost logo

Boost Users :

Subject: [Boost-users] [filesystem] wpath and fopen() on windows
From: Paul (elegant_dice_at_[hidden])
Date: 2010-02-10 09:21:16


Hi,

What is the best way for me to use boost::filesystem::wpath with a 3rd party
C library that expects a const char* filename, on Windows?

On linux, its simple: my_file.to_external_string() but on windows that
gives me a wide-character string.

So far the only thing I can think of is to roll my own wstring --> UTF8
conversion function, but I'm not even sure that is correct (will fopen()
work with UTF-8 encoded filenames on windows?).

thanks,
Paul



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net