This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Bug in collation functions?
- From: Ken Brown <kbrown at cornell dot edu>
- To: cygwin at cygwin dot com
- Date: Fri, 30 Oct 2015 19:09:20 -0400
- Subject: Re: Bug in collation functions?
- Authentication-results: sourceware.org; auth=none
- References: <56321815 dot 7000203 at cornell dot edu> <20151029153516 dot GJ5319 at calimero dot vinschen dot de> <56323F2E dot 4030807 at cornell dot edu> <56324598 dot 9060604 at cornell dot edu> <56324E82 dot 7000402 at redhat dot com> <563268A4 dot 6000005 at cornell dot edu> <56329462 dot 2090206 at cornell dot edu> <56329BE8 dot 808 at cornell dot edu> <20151030120320 dot GO5319 at calimero dot vinschen dot de> <56337996 dot 2000400 at cornell dot edu> <20151030191440 dot GP5319 at calimero dot vinschen dot de>
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