TurnKey Linux Virtual Appliance Library

Enabling utf-8 on TKL GAE

Peter's picture

Short version: I can't get the TK GAE app to work properly with utf-8 and frankly am at the end of my wits.

Long version: I am running the TK GAE SDK 11.1 as a development platform as a virtual machine under Ubuntu 11.01 (Natty) with kvm. The host system is strict utf8. Neither the virtual console nor a ssh session (via konsole) does accept german umlauts (äöüß) correctly (that said, an OpenSuSE instance does so without any problems). If I try to use umlauts, there are some reproduceable but strange reactions: "ö" yields "(arg: 6)" on the bottom terminal line; "ä" seems to jump somewhere in the command history, "ß" and "ü" do nothing at all. Vim does accept umlauts, but shows strange behaviour too, like double characters. Such files yield a wild variety of errors even if corrected.

What I've tried so far: Setting and exporting LANG and LANGUAGE, generating the appropriate locale (with locale-gen de_DE.UTF-8), editing /etc/environment, /etc/default/locale, .bashrc and /etc/profile (to include the respective locale strings: again de_DE.UTF-8), dpgk-reconfigure locale, apt-get install language-pack-de; logging out and in and even restarting.

What has changed: Nothing. (Well... now my keyboard works as intended on the virtual console too, but it did so of course in ssh sessions already, and that wasn't really a problem.)

I read some threads in the forum and there it is claimed, that the 11.x patch of appliances should support utf8 out of the box. Nevertheless on a pristine system "locale -a" just gave me "en_GB", "POSIX" and "C". (Now it includes "de_DE.UTF-8" as well.)

Any help and suggestions would be very much appreciated.

Jeremy's picture

Hi Peter

That certainly sounds frustrating. As a native English speaker (well sort of anyway - I'm Australian :p) I'm completelky unfamilar with this sort of problem. So I can't really help much. Hopefully someone with some experience in these matters may be of assistance.

In the meantime, the only thing I can suggest is consulting the Ubuntu documentation (as you may or may not be aware, TKL is Ubuntu Lucid/10.04 under the hood). If you manage to find something that works, be great if you post back as no doubt others may have this same problem.

Peter's picture

I did some further testing

Unfortunatly I've still got no solution.

I was wondering if this could be a problem with Lucid, so I did a clean install of Lucid server 32bit on the same machine. I made sure to choose English as the system language and the umlauts (äöüßÄÖÜß) worked even in the installer. I tested this briefly with the username and password fields. The "locale" command did not show any different settings to mine (out of the box LANG="en_US.UTF-8".)

So I suspect this is not a problem with the virtual console, nor ssh, nor the virtualization per se but with the turnkey image and some special (if obscure) settings.

I really need this feature to work properly to let me do some editing work directly on the virtual machine and not having to download the files, edit them locally and upload them afterwards which makes the developing process very awkward.


Peter's picture

After some more hours of testing

I found references to problems related the use of utf in tty's. So I installed console-setup, console-common and console-data and ran the appropriate dpkg-reconfigure commands. There is still nothing changed. I even took a look at boottime.keymap.gz and found nothing different to the plain server-install.

The behaviour when typing umlaute is still unchanged. As it turns out, this seems to be a make or brake feature for my developement cycle (production is different, there is no problem with delivering utf content). The same problem exists in other tk-appliances like the django appliance.


Jeremy's picture

I have just posted a bug on the TKL bugtraker

So hopefully the devs will have a look at it when they get a chance. The bug can be found here.

Solution

Here you go! Edit: (in case someone comes up with this problem)

/etc/inputrc

set input-meta on
set output-meta on
set convert-meta off

Wow -

a little stroke of genius, eh ?

Thank you for the effort ! You really helped me !

with Raspbian Wheezy, under qemu-arm user chroot emulation , ö -> (arg: 6), if some poor soul searches it.

Your UncleVan.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)