build system: introduce FEATURE_ASSUME_UNICODE
ls: use it. also do G trick. with UNICODE off:
function old new delta
ls_main 843 871 +28
show_color 1 - -1
showdirs 500 497 -3
my_stat 100 97 -3
terminal_width 4 - -4
tabstops 4 - -4
status 122 118 -4
static.dotdir 4 - -4
current_time_t 4 - -4
all_fmt 4 - -4
------------------------------------------------------------------------------
(add/remove: 0/6 grow/shrink: 1/3 up/down: 28/-31) Total: -3 bytes
Also was tested with UNICODE on with glibc.
diff --git a/Config.in b/Config.in
index 0a7edf8..e70caf5 100644
--- a/Config.in
+++ b/Config.in
@@ -21,6 +21,18 @@
Select this only if you plan to use busybox on full-blown
desktop machine with common Linux distro, not on an embedded box.
+config FEATURE_ASSUME_UNICODE
+ bool "Assume that 1:1 char/glyph correspondence is not true"
+ default n
+ help
+ This makes various applets aware that one byte is not
+ one character on screen.
+
+ Busybox aims to eventually work correctly with Unicode displays.
+ Any older encodings are not guaranteed to work.
+ Probably by the time when busybox will be fully Unicode-clean,
+ other encodings will be mainly of historic interest.
+
choice
prompt "Buffer allocation policy"
default FEATURE_BUFFERS_USE_MALLOC