bin/54959: tr utility has a bug in ISO8859-2 locale

Zahemszky Gábor gabor at
Sun Jul 27 13:50:17 PDT 2003

>Number:         54959
>Category:       bin
>Synopsis:       tr utility has a bug in ISO8859-2 locale
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 27 13:50:15 PDT 2003
>Originator:     Zahemszky Gábor
>Release:        FreeBSD 4.8-STABLE i386
System: FreeBSD Picasso.Zahemszky.HU 4.8-STABLE FreeBSD 4.8-STABLE #1: Tue Jul 22 09:58:37 CEST 2003 root at Picasso.Zahemszky.HU:/usr/obj/usr/src/sys/PICASSO i386

	In Hungary, we use the hu_HU.ISO8859-2 locale.  The iso-8859-2
codepage has correct upper-lower conversion tables (eg. in vi, the ~
operator works well, with correct LANG variable), but tr has a bug: it
uses something, but not the correct iso-8859-2 conversion table when
converting from upper to lower or vice versa.

	# use correct fonts, kbdtables and LANG, eg:
$ kbdcontrol -l hu.iso2.102keys
$ vidcontrol -f iso02-8x16
$ export LANG=hu_HU.ISO8859-2
$ echo áéíóöõúüû | hd

00000000  e1 e9 ed f3 f6 f5 fa fc  fb 0a                    |áéíóöõúüû.|

$ echo áéíóöõúüû | tr '[:lower:]' '[:upper:]' | hd	### INCORRECT!!!

00000000  c2 ca ce d4 d8 d6 db dd  dc 0a                    |ÂÊÎÔØÖÛÝÜ.|

$ echo ÁÉÍÓÖÕÚÜÛ | hd					### correct

00000000  c1 c9 cd d3 d6 d5 da dc  db 0a                    |ÁÉÍÓÖÕÚÜÛ.|




More information about the freebsd-bugs mailing list