bin/141036: tr(1) does not respect locale setting

Erwin Hoffmann feh at
Wed Dec 2 21:45:55 UTC 2009

Hi jh,

--On Wednesday, December 02, 2009 16:55:31 +0000 jh at wrote:

> Synopsis: tr(1) does not respect locale setting
> State-Changed-From-To: open->closed
> State-Changed-By: jh
> State-Changed-When: Wed Dec 2 16:45:56 UTC 2009
> State-Changed-Why:
> See the COMPATIBILITY section in tr(1) manual page. If you want to convert
> a file to lower case you should use tr "[:upper:]" "[:lower:]".

indeed. This works (and I should have read the man page).

Q: Why not simply use [A-Z] as a synonym for :upper: (and vice versa for 
:lower:) ?

INDIVIDUAL none standard ASCII characters are converted in the literal 

 echo "ääää" | tr '[ä]' '[Ä]' => ÄÄÄÄ

(if you can read it; it is the German umlaut 'u' sometimes expressed as 

as expected. Thus for *single* characters 'tr' works as expected; hower not 
for ranges. This is far from abvious; though explained in the man page.

Sorry for the trouble.

Pls. close the bug report.

regards & thanks.



Dr. Erwin Hoffmann | FEHCom |

More information about the freebsd-bugs mailing list