Cannot set locale categories independently with POSIX 2008 locales

2019-03-26 Thread Karl Williamson
This has been reported from multiple sources, and we at Perl 5 have diagnosed the problem If LC_CTYPE is set to C.UTF-8, it is not possible to set any other category independently to either C or C.UTF-8 without inadvertently setting LC_CTYPE back to C. The attached program demonstrates the pr

Re: Cannot set locale categories independently with POSIX 2008 locales

2019-03-26 Thread Ted Unangst
Karl Williamson wrote: > This has been reported from multiple sources, and we at Perl 5 have > diagnosed the problem > > If LC_CTYPE is set to C.UTF-8, it is not possible to set any other > category independently to either C or C.UTF-8 without inadvertently > setting LC_CTYPE back to C. The at

Re: Cannot set locale categories independently with POSIX 2008 locales

2019-03-27 Thread Karl Williamson
On 3/27/19 12:26 AM, Ted Unangst wrote: Karl Williamson wrote: This has been reported from multiple sources, and we at Perl 5 have diagnosed the problem If LC_CTYPE is set to C.UTF-8, it is not possible to set any other category independently to either C or C.UTF-8 without inadvertently setting

Re: Cannot set locale categories independently with POSIX 2008 locales

2019-03-27 Thread Ted Unangst
Karl Williamson wrote: > > This should fix things. > > Does it work if 'oldloc' is 0? a legal value Nope. Good catch. Index: newlocale.c === RCS file: /home/cvs/src/lib/libc/locale/newlocale.c,v retrieving revision 1.1 diff -u -p -

Re: Cannot set locale categories independently with POSIX 2008 locales

2019-03-28 Thread Ingo Schwarze
Hi Ted and Karl, Ted Unangst wrote on Wed, Mar 27, 2019 at 06:03:29PM -0400: > Karl Williamson wrote: >> Ted Unangst wrote: >>> This should fix things. There is no bug and nothing to fix. Our existing implementation fully conforms to the POSIX specification. POSIX explicitly says: It is unsp

Re: Cannot set locale categories independently with POSIX 2008 locales

2019-03-28 Thread Karl Williamson
On 3/28/19 8:03 AM, Ingo Schwarze wrote: Hi Ted and Karl, Ted Unangst wrote on Wed, Mar 27, 2019 at 06:03:29PM -0400: Karl Williamson wrote: Ted Unangst wrote: This should fix things. There is no bug and nothing to fix. Our existing implementation fully conforms to the POSIX specificatio

Re: Cannot set locale categories independently with POSIX 2008 locales

2019-03-28 Thread Ted Unangst
Karl Williamson wrote: > On 3/28/19 8:03 AM, Ingo Schwarze wrote: > >It is unspecified whether the locale object pointed to by base > >shall be modified, or freed and a new locale object created. > > I can see how you might be able to argue for your interpretation. I > believe the wordin

Re: Cannot set locale categories independently with POSIX 2008 locales

2019-03-29 Thread Ingo Schwarze
Hi Ted and Karl, Ted Unangst wrote on Fri, Mar 29, 2019 at 12:34:20AM -0400: > Karl Williamson wrote: >> On 3/28/19 8:03 AM, Ingo Schwarze wrote: >>>It is unspecified whether the locale object pointed to by base >>>shall be modified, or freed and a new locale object created. >> I can see