On 10/30/2015 3:14 PM, Corinna Vinschen wrote:
On Oct 30 10:07, Ken Brown wrote:
What about the other issue I raised: Should setlocale return null to
indicate an error if it's given an invalid locale name like en_DE.UTF-8?
Huh. Interesting. You're runing Windows10, right?
Yes
After some digging
it turns out there's a bug in W10. LocaleNameToLCID() does *not* fail
and return with an error if it doesn't know a locale. That would be too
simple I guess. Rather, it returns a value LOCALE_CUSTOM_UNSPECIFIED,
0x1000. So all unknown locales are now treated as custom locale. Duh!
I fear the answer when trying to report this. Probably it's a feature...
I applied a patch to workaround this feature.
Confirmed. Thanks.
Ken
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple