On Tue, Mar 22, 2011 at 6:30 PM, Seb <[email protected]> wrote: > Hello, > > Trying to use busybox (1.18.4) as a daily ash shell (config attached), > I encounter some problems with my UTF-8 locale. These appear only when > you open a login ash session (no problem when this one is opened from > a bash session), that's why I created a temporary user to reproduce > the bug: > > # useradd unibug -s /bin/ash -d /tmp -p "" > # echo "export LANG=fr_FR.utf8 PS1=prompt:\ " >/tmp/.profile > # export LANG=fr_FR.utf8 > # xterm -fa DejaVuSansMono:size=10:Bold -exec su - unibug > prompt: x="é" # "é" turns on "?" if the cursor is moved back. > prompt: echo ${#x} > 2 > prompt: éééé # press [del] as far as you can... > prom # ... and eat the prompt. > > It seems the shell ignores the locale and considers a byte-oriented > charset is used in input, so each wide character is acknowledged to > be several (no problem if you redo the test using "fr_FR" as locale). > > I've first tryed to use the libc Unicode routines > (CONFIG_UNICODE_USING_LOCAL option, with glibc-2.11.1 on Slackware > 13.1), and got a worse result, as I couldn't even enter an accented > character (but ASCII worked well). > > Then I've finally disabled the LANG checking > (CONFIG_FEATURE_CHECK_UNICODE_IN_ENV option), which seems to fix the > problem for me (but will certainly mess on a non-Unicode system). So, > the problem appears to be in the way busybox interacts with the LANG > environment variable.
Fixed in git: http://git.busybox.net/busybox/commit/?id=20704f066250744c0c2b84920c27d0fd0aa9e935 -- vda _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
