[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [Qemu-devel] [PATCH] Fix conversion from lower to upp
From: |
Eric Blake |
Subject: |
Re: [Qemu-trivial] [Qemu-devel] [PATCH] Fix conversion from lower to upper case with Turkish locale |
Date: |
Tue, 27 Mar 2012 11:09:22 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120316 Thunderbird/11.0 |
On 03/27/2012 10:57 AM, Stefan Weil wrote:
> Some locale settings let make fail or create wrong results
> because tr '[:lower:]' '[:upper:]' which is used to convert
> from lower to upper case depends on the locale.
>
> With locale tr_TR.UTF-8, lower case 'i' is not converted to 'I'.
> This results in wrong entries in config-host.h like these ones:
>
> #define CONFIG_QEMU_PREFiX "/usr/local"
> #define CONFIG_QEMU_BiNDiR "/usr/local/bin"
> for card in $audio_card_list; do
> - def=CONFIG_`echo $card | tr '[:lower:]' '[:upper:]'`
> + def=CONFIG_`echo $card | tr '[a-z]' '[A-Z]'`
NACK. POSIX says that 'tr a-z' is unspecified outside of the POSIX
locale, but without setting LC_ALL=C, you aren't guaranteeing the POSIX
locale. If you want to be portable without use of [:lower:], you have
to spell it out, with abcdefghijklmnopqrstuvwxyz.
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature