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

Bug#950023: marked as done (locales: Collation rules for v/w in sv_SE produce very surprising results in grep)



Your message dated Wed, 3 Aug 2022 13:29:06 +0200
with message-id <YupcAkakc4oxFbDk@aurel32.net>
and subject line Bug#950023: locales: Collation rules for v/w in sv_SE produce very surprising results in grep
has caused the Debian Bug report #950023,
regarding locales: Collation rules for v/w in sv_SE produce very surprising results in grep
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
950023: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=950023
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
Version: 2.34-0experimental0

On 2020-01-28 14:33, Ulrik Haugen wrote:
> 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.

The sv_SE locale got some rework in glibc 2.34, finally fixing this bug.
I am therefore closing it.

Regards
Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net

--- End Message ---

Reply to: