ð matched by "grep '[A-Z]'" while Ð is not, and vice versa for '[a-z]'

Bug #1746705 reported by Kevin Brubeck Unhammer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
glibc (Ubuntu)
New
Undecided
Unassigned

Bug Description

It seems like ð and Ð are swapped wrt. capitalisation in nn_NO.UTF-8 and nb_NO.UTF-8 locales.

ð should be lowercase, Ð should be uppercase, but when using grep A-Z or a-z, they're switched. (The [:upper:] and [:lower:] classes are not affected.)

$ for class in a-z A-Z '[:upper:]' '[:lower:]'; do echo "grep [${class}] matches:"; echo a A ð Ð | LANG=nn_NO.UTF-8 grep -o "[${class}]";done
grep [a-z] matches:
a
Ð
grep [A-Z] matches:
A
ð
grep [[:upper:]] matches:
A
Ð
grep [[:lower:]] matches:
a
ð

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: locales 2.26-0ubuntu2.1
ProcVersionSignature: Ubuntu 4.13.0-32.35-generic 4.13.13
Uname: Linux 4.13.0-32-generic x86_64
ApportVersion: 2.20.7-0ubuntu3.7
Architecture: amd64
CurrentDesktop: XFCE
Date: Thu Feb 1 11:29:14 2018
InstallationDate: Installed on 2011-12-13 (2241 days ago)
InstallationMedia: Xubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
PackageArchitecture: all
SourcePackage: glibc
UpgradeStatus: Upgraded to artful on 2017-11-09 (84 days ago)

Revision history for this message
Kevin Brubeck Unhammer (unhammer) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.