tr(1) buggy with de_DE.ISO8859-1(5) locale?

Jonathan Noack noackjr at alumni.rice.edu
Fri Feb 3 15:07:13 PST 2006


Martin wrote:
> There is a quite nasty bug in tr(1) when using
> de_DE.ISO8859-1(5) locale.
> 
> Try this please:
> unsetenv LC_ALL
> setenv LANG de_DE.ISO8859-1
> echo v | tr a-z A-Z
> 
> I'm getting "W" as result. Shouldn't it be "V"?

(Unexpected behavior explained elsewhere in the thread.)

The correct way to change lower-case to upper-case is as follows:
echo v | tr "[:lower:]" "[:upper:]"

See tr(1) for more info.

-Jonathan


More information about the freebsd-stable mailing list