[Bug 219900] tr class and unicode collation

2018-10-10 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219900

--- Comment #4 from Yuri Pankov  ---
And for the original problem, I don't think that any conversion other than
[:lower:] <-> [:upper:] makes sense in tr(1) context.  It is also noted in
tr(1) itself:

With the exception of case conversion, characters in the
classes are in unspecified order.

In other words, I don't think it's collation problem, rather just unspecified
behavior, which doesn't need fixing.

If there's a real world use case that you think is related to this, please
provide examples.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 219900] tr class and unicode collation

2017-12-05 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219900

--- Comment #3 from Yuri Pankov  ---
WRT the tr issue -- that's what 'tr' on Debian GNU/Linux has to say about it:

$ echo test | tr '[:alpha:]' '[:upper:]'
tr: misaligned [:upper:] and/or [:lower:] construct

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 219900] tr class and unicode collation

2017-12-05 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219900

Yuri Pankov  changed:

   What|Removed |Added

 CC||yur...@gmx.com

--- Comment #2 from Yuri Pankov  ---
Looks like at least grep issue is not there (or already fixed) in bsdgrep:

loki:yuri:~$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_ALL=
loki:yuri:~$ grep '^[A-Z]' foo
Bar
BAZ
loki:yuri:~$ grep --version
grep (BSD grep) 2.6.0-FreeBSD

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 219900] tr class and unicode collation

2017-12-05 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219900

Lars Engels  changed:

   What|Removed |Added

 CC||l...@freebsd.org

--- Comment #1 from Lars Engels  ---
A similar issue with grep and awk:

> grep '^[A-Z]' foo
foo
Bar
BAZ


Same for egrep, grep -E and awk, using sed(1) works as expected.

> grep -V
grep (GNU grep) 2.5.1-FreeBSD

> locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_ALL=en_US.UTF-8


With LANG=C all three tools work as expected.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 219900] tr class and unicode collation

2017-06-09 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219900

Bug ID: 219900
   Summary: tr class and unicode collation
   Product: Base System
   Version: CURRENT
  Hardware: Any
OS: Any
Status: New
  Severity: Affects Only Me
  Priority: ---
 Component: bin
  Assignee: freebsd-bugs@FreeBSD.org
  Reporter: m...@freebsd.org

It seems that there is a bug in unicode collation using tr to convert char to
uppercase :

manu@arcadia> echo $LC_ALL  
en_US.UTF-8
manu@arcadia> echo test | tr '[:lower:]' '[:upper:]'
TEST
manu@arcadia> echo test | tr '[:alpha:]' '[:upper:]'
ÓÄÒÓ
manu@arcadia> echo test | tr '[:alnum:]' '[:upper:]'
ÞÎÝÞ
manu@arcadia> export LC_ALL=C
manu@arcadia> echo test | tr '[:lower:]' '[:upper:]'
TEST
manu@arcadia> echo test | tr '[:alpha:]' '[:upper:]'

manu@arcadia> echo test | tr '[:alnum:]' '[:upper:]'


-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"