# tr and LC_COLLATE



## pbd (Sep 8, 2009)

Hi,

I suspect that [font="Courier New"]/usr/bin/tr[/font] does not '[A-Z] [a-z]' translation correctly when LC_COLLATE is cs_CZ.ISO8859-2:


```
# locale | fgrep COLLATE
LC_COLLATE="C"
# echo abcdefghijklmnopqrstuvwxyz | tr '[A-Z]' '[a-z]'
abcdefghijklmnopqrstuvwxyz
# export LC_COLLATE="cs_CZ.ISO8859-2"                 
# locale | fgrep COLLATE                              
LC_COLLATE="cs_CZ.ISO8859-2"
# echo abcdefghijklmnopqrstuvwxyz | tr '[A-Z]' '[a-z]'
ÃCÄ†ÄŽÃ‰GHIÃKLÄ¹NÅƒÃ“QRÅ”ÅšÅ¤ÃšWXYÃz
# echo abcdefghijklmnopqrstuvwxyz | tr '[:upper:]' '[:lower:]' 
abcdefghijklmnopqrstuvwxyz
```

Am I right or '[A-Z] [a-z]' should not be the same as '[:upper:] [:lower:]'?


----------

