LC_COLLATE vs. egrep -- bug or (non-)feature?

Eric Blake eblake@redhat.com
Tue Oct 11 20:56:00 GMT 2011


On 10/11/2011 02:49 PM, Henry S. Thompson wrote:
>
>> LANG=preferred LC_COLLATE=C
>>
>> and don't set LC_ALL.
>
> Hmm.  Two remaining questions:
>
>   1) By 'preferred', I presume you mean my preferred setting, e.g. en_GB.utf8

Correct.

>   2) _Where_ should I set those values?  As far as I can tell I'm not
>      currently setting them at all. . .

For individual users, ~/.bashrc, ~/.profile, ~/.zshrc, or whatever other 
shell-specific startup files you use, works well.

There's currently ongoing discussion about making cygwin's locale(1) 
program provide sane defaults based on the current Windows localization 
settings, which would then be incorporated into /etc/profile for 
system-wide default for all shells, but that thread hasn't yet settled 
on the final patches to use.

For a single override, do so in the script needing the override (and 
that's where setting LC_ALL=C is most commonly seen - for example, all 
./configure scripts sanitize the world to the C locale up front).

-- 
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
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



More information about the Cygwin mailing list