public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "René Neumann" <lists@necoro.eu>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [RFC] ban use of base-4 casemods in ebuilds due to locale collation instability
Date: Wed, 11 Nov 2015 08:16:51 +0100	[thread overview]
Message-ID: <5642EB63.7030708@necoro.eu> (raw)
In-Reply-To: <22082.49419.148679.628538@a1i15.kph.uni-mainz.de>



Am 11.11.2015 um 05:16 schrieb Ulrich Mueller:
>>>>>> On Tue, 10 Nov 2015, Mike Frysinger wrote:
> 
>> Arfrever highlights these are not even safe to use.  bash is locale aware,
>> so it'll apply LC_COLLATE rules when processing the ^/, casemods.  while
>> you can fix this with external programs ala:
>> 	LC_COLLATE=C tr ...
> 
>> you can't do it with inline code like:
>> 	LC_COLLATE=C SRC_URI=".../${PN^^}/..."
> 
>>>>>> On Tue, 10 Nov 2015, Mike Frysinger wrote:
> 
>> sorry, i meant char classification here (LC_CTYPE), not collation.
> 
> Shouldn't these be safe to use if the string consists purely of ASCII
> characters? I mean, A-Z and a-z should be uppercase and lowercase,
> respectively, in any locale?

Unfortunately, no (have been bitten by this issue already some years ago):

$ echo $LC_ALL
tr_TR
$ f=i; echo ${f^^}
İ
$ f=I; echo ${f,}
ı

- René



  reply	other threads:[~2015-11-11  7:17 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10 23:53 [gentoo-dev] reminder: you cannot use bash-4.x features (e.g. ${var^^}) in EAPI=[0-5] Mike Frysinger
2015-11-11  1:54 ` Mike Frysinger
2015-11-11  2:51 ` [gentoo-dev] [RFC] ban use of base-4 casemods in ebuilds due to locale collation instability Mike Frysinger
2015-11-11  4:03   ` Mike Frysinger
2015-11-11  4:16   ` Ulrich Mueller
2015-11-11  7:16     ` René Neumann [this message]
2015-11-11  7:37       ` Ulrich Mueller
2015-11-11  7:47         ` Mike Frysinger
2015-11-11  8:04           ` Ulrich Mueller
2015-11-11  7:42     ` Mike Frysinger
2015-11-11  6:16   ` Patrick Lauer
2015-11-11  9:13     ` Michał Górny
2015-11-11 12:39     ` Ciaran McCreesh
2015-11-11 15:48       ` [gentoo-dev] Revise EAPI 6? (was: [RFC] ban use of base-4 casemods in ebuilds due to locale collation instability) Ulrich Mueller
2015-11-11 21:52         ` Jason A. Donenfeld
2015-11-11 22:21           ` [gentoo-dev] Revise EAPI 6? Matthias Maier
2015-11-11 23:18             ` Ulrich Mueller
2015-11-12  0:34               ` Mike Gilbert
2015-11-12  6:24                 ` Ulrich Mueller
2015-11-12  6:52           ` [gentoo-dev] Re: Revise EAPI 6? (was: [RFC] ban use of base-4 casemods in ebuilds due to locale collation instability) Martin Vaeth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5642EB63.7030708@necoro.eu \
    --to=lists@necoro.eu \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox