Artyom Beilis wrote:
Question: what do the functions do (on Windows) when the passed UTF-8 is invalid? From a brief look at the documentation, I don't see this specified, but I may have missed it.
It is documented in reference documentation.
http://cppcms.com/files/nowide/html/namespaceboost_1_1nowide.html#a6644397c5...
Yes, I see now that it's documented on some, such as for instance fopen: If invalid UTF-8 given, NULL is returned and errno is set to EINVAL but not all, for instance getenv: UTF-8 aware getenv. Returns 0 if the variable is not set. or setenv: UTF-8 aware setenv, key - the variable name, value is a new UTF-8 value,. and it's not clear what happens when one feeds invalid UTF-8 to cout/cerr. Another minor point is that the library assumes Cygwin is POSIX and tries `using ::setenv;`, which is a compile error. For the purposes of Nowide, Cygwin should be considered Windows.