Reply
Thread Tools
Posts: 57 | Thanked: 42 times | Joined on Mar 2011 @ France
#1
Hello,
I have some problems on Xterminal, I'm gonna try to explain it by giving you several examples.

First, I'm french, so I use specials chars and accents like "é", "è", "ç", "ê", "ë".

Code:
$ cd /tmp
$ touch toto
By mistake, I type
Code:
$rmé toto
on the terminal (because the "é" letter is next the "m"). So I erase the "é":
Code:
$ rm toto
-sh: rm� not found
It means that the "é" has not really been erased on the command line!


second test: I've erased the "é", I move the cursor left until the beginning of the line. Another problem: the cursor moves one char before the start of the command line! I've tried with two "éé", and then the cursor moves on the "$" (and far left as the number of special chars). Then I move it rightmost I obtain:
Code:
/tmp$ lsééé
/tmlsééls
with the cursor on the second "l". (the command line has been shifted to the left...)

Another example: try to insert a "é" char at the middle of a string (I place the cursor on the "y").
Code:
$ azertyuiop
$ azert��yuiop
(and the command line is not shifted). So, I understand that the "é" char is encoded on 2 chars...

Another test: i type a command with the "é" letter, and i move left and right. Each time the line has been shifted to the left.

The special char take 2 spaces on the line, but is printed on one box...

Does anyone has already had this problem? Does a solution exists to fix it?

I hope you understand my problem.

Last edited by krutznikov; 2011-10-28 at 23:46.
 
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#2
 
Posts: 1,522 | Thanked: 392 times | Joined on Jul 2010 @ São Paulo, Brazil
#3
How can they call it fixed if it isn't fixed for the N900 nor anything before it?
 
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#4
FIXED in Harmattan (back when Harmattan was going to be Maemo 6). But see iDont's enhanced busybox which should contain the upstream fix.
 

The Following User Says Thank You to lma For This Useful Post:
Posts: 57 | Thanked: 42 times | Joined on Mar 2011 @ France
#5
thanks to have responded so quickly!

I've installed the last version of "busybox-power" (09/11/2011), when I launch xterminal, it prints "BusyBox v1.19.2 (Debian 1.19.2power1)" (and I can use new useful tools), but for my previous problem nothing has changed, same symptoms...
 
Posts: 268 | Thanked: 1,053 times | Joined on May 2010 @ The Netherlands
#6
Originally Posted by krutznikov View Post
I've installed the last version of "busybox-power" (09/11/2011), when I launch xterminal, it prints "BusyBox v1.19.2 (Debian 1.19.2power1)" (and I can use new useful tools), but for my previous problem nothing has changed, same symptoms...
Upstream BusyBox (as can be found in busybox-power) has much improved Unicode support over the stock BusyBox. However, Unicode support is turned off by default. You can verify this by executing "echo $LANG" in your shell. If the resulting string doesn't contain UTF8, then unicode is indeed turned off.

You need to start a new shell like:
Code:
LANG=en_EN.UTF8 sh
to have Unicode support enabled in the shell

Edit: since you're French, you probably want to replace en_EN with fr_FR in the code above.

Last edited by iDont; 2011-10-29 at 01:22.
 

The Following 4 Users Say Thank You to iDont For This Useful Post:
Posts: 1,522 | Thanked: 392 times | Joined on Jul 2010 @ São Paulo, Brazil
#7
Is there a way to change the default?
 
Posts: 57 | Thanked: 42 times | Joined on Mar 2011 @ France
#8
Originally Posted by iDont View Post
You need to start a new shell like:
Code:
LANG=en_EN.UTF8 sh
to have Unicode support enabled in the shell
YESS! works perfectly

Originally Posted by TiagoTiago View Post
Is there a way to change the default?
Not yet understood how the configuration works... (does this require to recompile busybox??)
Have found this http://busybox.net/FAQ.html#configure , will try tomorrow
 
Posts: 2,076 | Thanked: 3,268 times | Joined on Feb 2011
#9
Is there any reason this is not default? Been getting �'s in one application and this fixes it. Thanks!
 
Posts: 268 | Thanked: 1,053 times | Joined on May 2010 @ The Netherlands
#10
Originally Posted by TiagoTiago View Post
Is there a way to change the default?
You need to change the system's locale. I don't know how the set locale affects Maemo as a whole though, since it does quite a bit differently than your typical Linux distribution configuration wise. Anyway, editing /etc/osso-af-init/locale seems to do the trick. Only the line containing LANG needs to be changed in there. In my case, changing:
Code:
export LANG=nl_NL
to
Code:
export LANG=nl_NL.UTF8
appears to work after a reboot.

The only known side effect I'm aware of is that Ctrl-Space is seen as a NULL character in the terminal, which doesn't happen when using a non-Unicode locale.

Originally Posted by krutznikov View Post
Not yet understood how the configuration works... (does this require to recompile busybox??)
Have found this http://busybox.net/FAQ.html#configure , will try tomorrow
The proper fix is changing the system's locale setting. BusyBox merely respects what you've set there (launching a shell with LANG= basically overrides your default setting).

You can configure BusyBox to disrespect your system locale and force Unicode support though. To achieve this, run "apt-get source busybox-power" in Scratchbox, modify "CONFIG_FEATURE_CHECK_UNICODE_IN_ENV=y" in the two config files in debian/config/ to "CONFIG_FEATURE_CHECK_UNICODE_IN_ENV=n", and recompile busybox-power with "dpkg-buildpackage -r"fakeroot -u" -uc -us -nc"

I would encourage you to try changing your system's locale first however, rather than recompiling BusyBox with the above change. If you do want to recompile BusyBox though, feel free to contact me if you encounter any issues.

Originally Posted by szopin View Post
Is there any reason this is not default? Been getting �'s in one application and this fixes it. Thanks!
I don't know why Maemo hasn't got an UTF8 locale set by default. As to BusyBox, or any package for that matter, I prefer it to adhere the system's settings
 

The Following 3 Users Say Thank You to iDont For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 06:41.