I'm trying to sidestep some issues with unicode filenames on Windows (MSYS64) using Boost.Nowide. Specifically, my program operates in UTF-8, and providing that to std/Boost functions yields incorrect filenames due to them being interpreted as UTF-16 (or something along those lines).

However, the primary functions I have issues with are from Boost.PropertyTree. Specifically, read_json and write_json. These functions don't seem to be Nowide-friendly.

I tried just calling boost::nowide::nowide_filesystem() before my json calls, hoping it would work; it did not, I got the same mangled filenames. My next thought was to see if a nowide stream could be substituted into the stream-taking variants of read_json/write_json; it cannot be, they aren't compatible.

The only option that seems to leave is something along these lines: https://stackoverflow.com/a/21537818, but using Nowide to read in the file. That adds a lot of steps (and possibly memory usage). It feels like I'm missing something.

Any suggestions would be appreciated. Thanks in advance.

:-:-:-
:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-
William E. Kappler II
Software Designer and Programmer