Re: [PATCH dash] [BUILTIN] ensure LC_COLLATE is not overriden

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

 



On 08/05/2014 10:40 AM, Chema Gonzalez wrote:
> If the user environment has either LC_ALL or LANG defined, the setting
> of LC_COLLATE in src/mkbuiltins is overriden. With a non-POSIX locale,
> the orders of dotcmd (remember that '.' is 0x2e in ascii) and truecmd
> (':' is 0x3a in ascii) are reversed, which makes the ":" command fail
> in the bsearch.
> 

> -	}}' $temp | LC_COLLATE=C sort -k 1,1 | tee $temp2 | awk '{
> +	}}' $temp | LC_ALL= LANG= LC_COLLATE=C sort -k 1,1 | tee $temp2 | awk '{

Setting LC_ALL= to the empty string risks implementation-defined
behavior.  Also, LC_ALL overrides LANG and LC_COLLATE.  It should be
sufficient to merely do:

	}}' $temp | LC_ALL=C sort -k 1,1 | tee $temp2 | awk '{

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux