Standards-wise the only answer to this is to deprecate all non-UTF-8 locales and leave non-UTF-8 codesets outside the scope of C.
Basically, non-Unicode needs to always be at the edge, while in the middle everything needs to be Unicode.
From an application perspective it's easy: document that it only works in UTF-8 locales. Really, that is my position for my software. Anything else is ETOOHARD.
Basically, non-Unicode needs to always be at the edge, while in the middle everything needs to be Unicode.
From an application perspective it's easy: document that it only works in UTF-8 locales. Really, that is my position for my software. Anything else is ETOOHARD.