Boost logo

Boost :

Subject: Re: [boost] [review] Review of Nowide (Unicode) starts today
From: Peter Dimov (lists_at_[hidden])
Date: 2017-06-12 15:03:27

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.

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

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.

Boost list run by bdawes at, gregod at, cpdaniel at, john at