Re: Bash case-modifying word expansions and locales
From:
Chet Ramey
Subject:
Re: Bash case-modifying word expansions and locales
Date:
Sat, 06 Jul 2013 21:48:21 -0400
User-agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130328 Thunderbird/17.0.5
On 7/1/13 11:36 PM, Tomasz Tomasik wrote:
> Hello.
>
> I have problem with case-modifying word expansions in bash.
>http://wiki.bash-hackers.org/syntax/pe#case_modification
>
> bash -c 'foo="żółw"; echo ${foo^^}'
> żółW
>
> Characters with diacritical marks are not affected.
>
> However, it works in zsh:
> zsh -c 'foo="żółw"; echo ${(U)foo}'
> ŻÓŁW
Thanks for the report. This will be fixed in the next release of bash. The
problem is int-char truncation in lib/sh/casemod.c:sh_modcase().
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/