pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] i18n: Set LC_COLLATE locale category based on system locale.


From: Ben Pfaff
Subject: Re: [PATCH] i18n: Set LC_COLLATE locale category based on system locale.
Date: Wed, 09 May 2012 06:14:43 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Thanks, I pushed this.

afk-eis, the problem should be fixed on master.

John, I'm open to setting more categories after auditing the code
for problems and then fixing them.

John Darrington <address@hidden> writes:

> This looks fine to me.
>
> In fact, we really should be setting all categories.  The only reason we have 
> not done so,
> is that we are (mis)using printf to parse formatted input, and therefore 
> setting LC_NUMERIC
> would break that.
>
> J'
>
> On Tue, May 08, 2012 at 10:05:06PM -0700, Ben Pfaff wrote:
>      LC_COLLATE controls the sort order of file names in GTK+ file
>      chooser dialog boxes, so we should set this locale category so as
>      to honor the user's preferences.
>      
>      In the standard C library, only a few functions honor LC_COLLATE:
>      strcoll, wcscoll, strxfm, and wcsxfrm.  PSPP doesn't use any of
>      these functions, so this commit should not affect PSPP's use of
>      standard library functions.
>      
>      The libunistring manual only mentions collation rules in the entries
>      for a few functions: u8_strcoll, u16_strcoll, u32_strcoll,
>      u8_normcoll, u16_normcoll, u32_normcoll, u8_casecoll, u16_casecoll
>      u32_casecoll.  PSPP doesn't use any of those functions either.
>      
>      Reported by "ajk-eis" <address@hidden>.
>      ---
>       src/libpspp/i18n.c |    1 +
>       1 files changed, 1 insertions(+), 0 deletions(-)
>      
>      diff --git a/src/libpspp/i18n.c b/src/libpspp/i18n.c
>      index 5ec3960..0819299 100644
>      --- a/src/libpspp/i18n.c
>      +++ b/src/libpspp/i18n.c
>      @@ -546,6 +546,7 @@ void
>       i18n_init (void)
>       {
>         setlocale (LC_CTYPE, "");
>      +  setlocale (LC_COLLATE, "");
>         setlocale (LC_MESSAGES, "");
>       #if HAVE_LC_PAPER
>         setlocale (LC_PAPER, "");
>      -- 
>      1.7.2.5
>      
>      
>      _______________________________________________
>      pspp-dev mailing list
>      address@hidden
>      https://lists.gnu.org/mailman/listinfo/pspp-dev



reply via email to

[Prev in Thread] Current Thread [Next in Thread]