OpenVZ Forum


Home » General » Support » Console charset
Console charset [message #35567] Sun, 05 April 2009 14:41 Go to next message
laotse is currently offline  laotse
Messages: 35
Registered: December 2008
Member
Hi there,

is there a way to tell a container to use utf-8 as charset in the default "-bash" used for vzctl enter?

My native locale would be de_DE.utf8, which is configured as default on the node and works perfectly.

node#: echo "Süß"
Süß
node#: vzctl enter VE
VE#: <enter some umlaut, but nothing or strange things happen>
VE#: export LANG=de_DE.utf8
VE#: bash
VE#: echo "Süß"
Süß

So basically the container has everything installed what it takes to deal with UTF-8. However, "-bash" reports POSIX as locale and even after setting LC_LANG does not accept umlauts or does display them correctly. The child bash works as expected.

Of course /etc/default/locales contains the correct setting, but it is apparently ignored by "-bash".

Is this a bug or a feature? Is it possible to change this behaviour?

Er well, systems both node and VE are Debian Lenny current as per today.

Regards,
- lars
Re: Console charset [message #35588 is a reply to message #35567] Tue, 07 April 2009 11:23 Go to previous messageGo to next message
tonib is currently offline  tonib
Messages: 3
Registered: April 2009
Location: Slovenia
Junior Member
Hi,
well, I have same problem.
I have Debian Lenny on node and VE.
My node can dispay characters I need (čČšŠžŽ) but VE don't.

I install and reinstall (dpkg-reconfigure locales) and disable overriding of LC_* variables in /etc/ssh/sshd_config but still can't see what I wish.

Regards
Re: Console charset [message #35612 is a reply to message #35588] Wed, 08 April 2009 13:40 Go to previous messageGo to next message
tonib is currently offline  tonib
Messages: 3
Registered: April 2009
Location: Slovenia
Junior Member
Lars, can you input umlaut when you loged as lars (or whatewer user name you have) and not as root?

When I loged as normal user I can input Č芚Žž.

Take a look at this example:

root@zatomija:/# echo $LANG

root@zatomija:/#
root@zatomija:/# su - toni
toni@zatomija:~$ echo $LANG
en_US.UTF-8
toni@zatomija:~$ echo "蚞ȊŽ"
蚞ȊŽ
toni@zatomija:~$ su
Password:
root@zatomija:/home/toni# echo $LANG
en_US.UTF-8
root@zatomija:/home/toni# echo "蚞ȊŽ"
蚞ȊŽ


So the whole thing is just about passing $LANG.

We must initially set right $LANG for root and we win.
Re: Console charset [message #35628 is a reply to message #35612] Thu, 09 April 2009 11:23 Go to previous message
laotse is currently offline  laotse
Messages: 35
Registered: December 2008
Member
tonib wrote on Wed, 08 April 2009 15:40

Lars, can you input umlaut when you loged as lars (or whatewer user name you have) and not as root?

When I loged as normal user I can input Č芚Žž.
So the whole thing is just about passing $LANG.

We must initially set right $LANG for root and we win.



Yes, I encounter the same behaviour. Was tricky to test, since I'd got to find a container, which has local login users at all.

Okay, but I fear that this is a feature. I remember having had problems with the encoding of the root console all the while, i.e. on normal machines. I just don't notice it normally, because I'm using a root shell fired up by an ordinary user or ssh.

Anybody out there, who knows in more detail what's happening under the hood?

Regards,
- lars.
Previous Topic: kernel 2.6.27-openvz fails to compile
Next Topic: *SOLVED* openvz and trixbox
Goto Forum:
  


Current Time: Sun Jul 14 19:59:12 GMT 2024

Total time taken to generate the page: 0.02449 seconds