Please note: Under POSIX platforms no conversions are performed and no UTF-8 validation is done as this is incorrect:
I do not quite understand the rationale behind not converting to UTF-8 on Posix platforms. I naively though I got UTF-8 in argv because my system is convigured in UTF-8 but I discover that this is not necessary always the case. In the example you highlight, I do not see the difference from the Windows case. You could convert to UTF-8 in argv and back to the local encoding in nowide::remove. I understand it is not efficient if you do not really use the content of the filename but if you have to write, say an xml report in UTF-8, you would have to convert anyway. Today, what is the portable way to convert argv to UTF-8? i.e. without having to #ifdef _WIN32...? Frédéric