Reply
Thread Tools
Posts: 64 | Thanked: 130 times | Joined on Dec 2009
#1
The terminal on N900 doesn't use UTF-8 on default and I can't find any easy way to make the change. Any idea how to make it use UTF-8?

edit: It seems the problem is with locale settings being set as non-UTF-8 and that is causing problems. And thus the fixing can be done just by fixing those settings.

Last edited by Phantasm; 2009-12-04 at 22:52.
 
Andre Klapper's Avatar
Posts: 1,665 | Thanked: 1,649 times | Joined on Jun 2008 @ Praha, Czech Republic
#2
Welcome to the forum!
Mind to share here how to exactly do that?
__________________
maemo.org Bugmaster
 
Posts: 64 | Thanked: 130 times | Joined on Dec 2009
#3
Typing "locale" on the terminal shows current settings for locale. In my case some of them are set as fi_FI and some are en_GB. I have language set es English (UK) and location as Finland.

The problem with those is that they should be that of UTF-8. I am not certain what all of those need to be changed to give the desired result, but at least LC_CTYPE. Easy solution to change them all into UTF-8 is to just set LC_ALL into UTF-8 variant. Not sure if it causes any side effects, but as it is only affecting the terminal window currently open there likely shouldn't be much. Unless you start some applications from the terminal that use those settings for location or so. It appears that the phone doesn't have suitable UTF-8 sets installed with proper names, but I haven't found it causing any problems.

The important thing is that on SSH connection to another computer, the settings are forwarded as UTF-8 and thus the other computer will understand that the characters given are UTF-8. This can also be overridden on 'screen' application with -U parameter without setting the locales.

Anyway, the actual commands:
locale
export LC_ALL="en_US.UTF-8"
locale

Here locale is only used to see initial situation and the change from it. Only the export command is required for the actual change. As for using en_US.UTF-8, it is due to it being most commonly found on remote machines. All UTF-8 character sets are identical, so the language part in it only affects some programs determining language to use etc from it.

And as the terminal does use UTF-8 by default, the locales should be set correctly to UTF-8 variants as default. And those should actually be found on the phone (instead of current error messages appearing on locale command after changing the type). So, it can be regarded as a bug currently.
 

The Following 4 Users Say Thank You to Phantasm For This Useful Post:
Posts: 64 | Thanked: 130 times | Joined on Dec 2009
#4
A little update...

It seems there isn't any problem here relating to N900. It is just that there has been a recent change in locale settings in general on any linux distros. With the new way, the normal UTF-8 variants do not require any mentioning of any charset. And some programs, like "screen" have not been updated to match it.
 
Reply


 
Forum Jump


All times are GMT. The time now is 01:59.