[Bug 3697] [Patch] 1.19.0 (git) Allow unicode output for "busybox ls"
bugzilla at busybox.net
bugzilla at busybox.net
Thu May 12 00:58:37 UTC 2011
https://bugs.busybox.net/show_bug.cgi?id=3697
--- Comment #5 from Denys Vlasenko <vda.linux at googlemail.com> ---
(In reply to comment #4)
> config is there in attachments
I can reproduce it with your config, when I use libc with limited locale
support. On "big" config with glibc, I can't.
> 1.19 doesnt show unicode filenames Like Russian Or Chinese (yours, my bionic
> fork) static and dynamic builds...
>
> in your code (and mine) :
>
> https://github.com/tpruvot/android_external_busybox/blob/gingerbread/libbb/unicode.c#L42
Yes. This is the test that libc locale subsystem understood byte sequence 0xce,
0x94 as one Unicode character. If it didn't (width != 1), then we conclude that
current locale (as set by $LANG) is not Unicode, and turn Unicode support off:
unicode_status = (width == 1 ? UNICODE_ON : UNICODE_OFF);
and from that point on, any chars with high byte set will be treated as
invalid.
Either set $LANG properly (say, to "en_US.utf8") and/or make sure your libc
does support Unicode, or unset CONFIG_UNICODE_USING_LOCALE in the .config - I
unset it and now it works for me:
$ ./busybox ls /.2/video_rus/*_11.avi
/.2/video_rus/Штрафбат_11.avi
--
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list