bug-bash
[Top][All Lists]
Advanced

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

Re: Case modification fails for Unicode characters


From: Pierre Gaston
Subject: Re: Case modification fails for Unicode characters
Date: Fri, 13 Jul 2012 08:56:28 +0300

On Fri, Jul 13, 2012 at 3:46 AM, Dennis Williamson
<dennistwilliamson@gmail.com> wrote:
> On Thu, Jul 12, 2012 at 1:57 PM, DJ Mills <danielmills1@gmail.com> wrote:
>> On Thu, Jul 12, 2012 at 2:19 PM, Dennis Williamson
>> <dennistwilliamson@gmail.com> wrote:
>>> s=łódź; echo "${s^^} ${s~~}"'
>>> łóDź ŁÓDŹ
>>>
>>> The to-upper and the undocumented toggle operators should produce
>>> identical output in this situation, but only the toggle works
>>> correctly.
>>>
>>> This is in en_US.UTF-8, but also reported in pl_PL.utf-8. In Bash
>>> 4.2.24 and Bash 4.0.33.
>>>
>>> --
>>> Visit serverfault.com to get your system administration questions answered.
>>>
>>
>> I get the same result with:
>> » echo "$s" | tr '[:lower:]' '[:upper:]'
>> łóDź
>>
>> » locale
>> LANG=en_US.UTF-8
>> LC_CTYPE="en_US.UTF-8"
>> LC_NUMERIC="en_US.UTF-8"
>> LC_TIME="en_US.UTF-8"
>> LC_COLLATE="en_US.UTF-8"
>> LC_MONETARY="en_US.UTF-8"
>> LC_MESSAGES="en_US.UTF-8"
>> LC_PAPER="en_US.UTF-8"
>> LC_NAME="en_US.UTF-8"
>> LC_ADDRESS="en_US.UTF-8"
>> LC_TELEPHONE="en_US.UTF-8"
>> LC_MEASUREMENT="en_US.UTF-8"
>> LC_IDENTIFICATION="en_US.UTF-8"
>> LC_ALL=
>>
>>
>> This is a locale issue, and has nothing to do with bash itself...
>
>
> That's partly true except that ~~ works.
>
Also many (all?) versions of tr don't know about locale, eg here:
$ echo ź | tr ź a
aa



reply via email to

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