[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#950023: locales: Collation rules for v/w in sv_SE produce very surprising results in grep



Package: locales
Version: 2.28-10
Severity: normal
Tags: l10n

Dear maintainer!

I'm not positive that this is a bug (the man page for grep does warn about
character ranges in locales other than C) but it produces very surprising
results in grep.

Presumably this is realated to bugs #506784 and #511357.

% echo -n abcdefghijklmnopqrstuvwxyz| sed 's/./&\n/g'| LC_COLLATE=C grep '[a-z]' 
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
% echo -n abcdefghijklmnopqrstuvwxyz| sed 's/./&\n/g'| LC_COLLATE=sv_SE grep '[a-z]'
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
x
y
z
% : Note the lack of 'w' above.
% LC_COLLATE=sv_SE grep '[a-w]'                            
grep: Invalid range end
% : This time at least there was an error message to warn me about the problem.


As i typically write "[a-z]" as shorthand for "[[:lower:]]" when i don't
need to match any national characters this bothers me quite a bit.


-- System Information:
Debian Release: 10.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-6-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=C, LC_CTYPE=sv_SE.utf8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages locales depends on:
ii  debconf [debconf-2.0]  1.5.71
ii  libc-bin               2.28-10
ii  libc-l10n              2.28-10

locales recommends no packages.

locales suggests no packages.

-- debconf information excluded


Reply to: