Solaris 10 x86 tr bad string

Solaris 10 x86 tr bad string

I was searching for problem with tr command.
I had a problem on Solaris 10 x86 that scripts with command’s:
calluser=`/usr/xpg4/bin/id -u -n`
calluser=`echo $calluser | tr “[:lower:]” “[:upper:]”`

Was returning Bad string result.

I found on net solution to replace “[:lower:]” “[:upper:]”
with “[a-z]” “[A-Z]”.
This solution works fine if u don’t need to update many scripts each time. So I found problem in my case that I had local variable LC_CTYPE=hr_HR.UTF-8.

So I went to /etc/default/init and commented all local settings to look like:

And after that tr command was working perfect!