[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [PATCH v2] Fix conversion from lower to upper case wi
From: |
Eric Blake |
Subject: |
Re: [Qemu-trivial] [PATCH v2] Fix conversion from lower to upper case with Turkish locale |
Date: |
Tue, 27 Mar 2012 11:33:55 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120316 Thunderbird/11.0 |
On 03/27/2012 11:23 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.
>
...
>
> v2:
> POSIX says that 'tr a-z' is unspecified outside of the POSIX
> locale, so we must set LC_ALL=C to make sure that we are using
> POSIX (hint from Eric Blake, thanks).
>
> Signed-off-by: Stefan Weil <address@hidden>
> ---
> configure | 6 +++---
> scripts/create_config | 6 +++---
> scripts/tracetool | 4 ++--
> 3 files changed, 8 insertions(+), 8 deletions(-)
Not being a regular reviewer on this list, I'm not sure I know the
subtle difference between 'Acked-by' and 'Reviewed-by' to know which one
I should be adding; but this patch resolves my objection on v1.
[Side note - POSIX actually requires:
tr a-z A-Z
to do the 26-letter case conversion, and that use of '[a-z]' means you
are transliterating 28 characters, by changing '[' and ']' to
themselves. But on older Solaris tr, you had to provide the [] to get
range expansion rather than transliteration of a literal '-', so your
patch is the right approach for maximal portability]
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature