On Thu, 26 Nov 2015 18:53:04 +0100, Richard PALO wrote:
I filed https://www.illumos.org/issues/6480#change-15783
Just curious if anybody else has noticed this sort of thing, perhaps in other
tools than /usr/bin/tr?
I think that our tr is correct here - \254 is illegal sequence for
character in UTF-8 encoding (and tr is "translate characters" as defined
in tr(1) man page), probably GNU tr simply doesn't check?
Also, are you sure the GNU tr works correctly for you (all done with
en_US.UTF-8 locale):
altair:yuri:~$ echo 'a b' | /usr/bin/tr ' ' $'\254'
tr: illegal sequence
altair:yuri:~$ echo 'a b' | /usr/bin/tr ' ' $'\302\254'
a¬b
altair:yuri:~$ echo 'a b' | /usr/gnu/bin/tr ' ' $'\254'
a▒b
altair:yuri:~$ echo 'a b' | /usr/gnu/bin/tr ' ' $'\302\254'
a
altair:yuri:~$
-------------------------------------------
illumos-discuss
Archives: https://www.listbox.com/member/archive/182180/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182180/21175430-2e6923be
Modify Your Subscription:
https://www.listbox.com/member/?member_id=21175430&id_secret=21175430-6a77cda4
Powered by Listbox: http://www.listbox.com