[Development] Heads-up: glibc 2.28 will break matching of [a-z], [0-9] and other ranges

Edward Welbourne edward.welbourne at qt.io
Wed Jul 18 10:21:25 CEST 2018


Hi all,

A discussion on the GNU make mailing list brought this to my attention.
Apparently glibc 2.28 is going to implement the POSIX spec on ranges,
which says

  A range expression represents the set of collating elements that fall
  between two elements in the current collation sequence,
  inclusively. It is expressed as the starting point and the ending
  point separated by a hyphen (-).

  Range expressions must not be used in portable applications [...]

This turns out to break globs (and other patterns) using ranges; if you
want to match lower-case letters, you need to say [[:lower:]], and
similarly for [[:digit:]], etc.  For example, [a-z] shall now match all
the upper-case letters except A and Z, which you probably didn't intend.

More background:
https://sourceware.org/bugzilla/show_bug.cgi?id=23393
http://pubs.opengroup.org/onlinepubs/7908799/xbd/re.html#tag_007_003_005

I don't know how that may affect us, but my guess is we probably have to
change some shell scripts and potentially also some regexes.  I've
created QTBUG-69518 to track this,

	Eddy.



More information about the Development mailing list