i18n: Set LC_COLLATE locale category based on system locale.
authorBen Pfaff <blp@cs.stanford.edu>
Wed, 9 May 2012 05:04:47 +0000 (22:04 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Wed, 9 May 2012 05:04:47 +0000 (22:04 -0700)
commit5b2fcf1abbfbf48a00300a41fa63444402a4bbb7
tree9904a796c5004d1b85879a9b9a7ec41cd87432c7
parent5841c349770a82f091e77dfe90fd68eee6032f66
i18n: Set LC_COLLATE locale category based on system locale.

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" <ajk-eis@rvhome.de>.
src/libpspp/i18n.c