Gavin Lambert wrote:
On 16/08/2022 07:35, Peter Dimov wrote:
The usual approach is to put
boost::filesystem::path::imbue( std::locale( std::locale::classic(), new boost::filesystem::detail::utf8_codecvt_facet ) );
as the first thing in `main`.
As a library, you cannot assume that the application has done this (nor can you do it yourself). The code has to act correctly regardless.
Yes in principle, but the question I'm replying to is this:
Can you please submit a pull request showing me how route.cpp can be correctly implemented according to these semantics?
In this case I can assume things. route.cpp does create a path from argv[2], but interpreting it as UTF-8 would probably be a feature. Using the ACP is wrong anyway as argv[2] is likely in the console code page.