On 26 January 2017 at 07:10, Michael Deutschmann <[email protected]> wrote: > On Wed, 25 Jan 2017, you wrote: >> The reason it wants to use a UTF-8 locale is so that it can use >> functions like mbrtowc and iswspace to process UTF-8 input. Is there >> any other way to process UTF-8 in C if you have no locales available >> on your system? > > Only by doing the conversions in your own code, ignoring the wide > character API.
I think that your setup is so broken it is not worth supporting. Is there any reason you don't have any locale support? > Note that you'd have to use something other than wchar_t to store UTF-32 > intermediate data. There are no standard guarantees on the size of > wchar_t, indeed there is one standard typedef "wint_t", that exists to > allow a null implementation of the API where wchar_t is char. If the code converts from UTF-8 to codepoints itself, an "unsigned long" would be enough because that is guaranteed to have at least 32 bits.
