aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2014-10-27 11:22:41 +0000
committerJo-Philipp Wich <jow@openwrt.org>2014-10-27 11:22:41 +0000
commitd77575c04ba092ce4ea3833afde410c087ac5067 (patch)
treed3bc62b84a1b87d48a3dcfa97bf43081adfde293
parent64e9d67cb404cfa9db60bde9cb409755410f9d22 (diff)
downloadupstream-d77575c04ba092ce4ea3833afde410c087ac5067.tar.gz
upstream-d77575c04ba092ce4ea3833afde410c087ac5067.tar.bz2
upstream-d77575c04ba092ce4ea3833afde410c087ac5067.zip
BB: busybox: make high ASCII chars printable (#7993)
Currently busybox utils like "ls" fail to display filenames containing UTF-8 characters, replacing any special characters with "?". Change libbb's printable_string() function to allow high ASCII characters so that unicode filenames are displayed correctls. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> Backport of r43084 git-svn-id: svn://svn.openwrt.org/openwrt/branches/barrier_breaker@43085 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/utils/busybox/Makefile2
-rw-r--r--package/utils/busybox/patches/270-libbb_make_unicode_printable.patch20
2 files changed, 21 insertions, 1 deletions
diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile
index 668679e4d2..59a84a2f94 100644
--- a/package/utils/busybox/Makefile
+++ b/package/utils/busybox/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=busybox
PKG_VERSION:=1.22.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_FLAGS:=essential
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
diff --git a/package/utils/busybox/patches/270-libbb_make_unicode_printable.patch b/package/utils/busybox/patches/270-libbb_make_unicode_printable.patch
new file mode 100644
index 0000000000..3bfd48a23b
--- /dev/null
+++ b/package/utils/busybox/patches/270-libbb_make_unicode_printable.patch
@@ -0,0 +1,20 @@
+--- a/libbb/printable_string.c
++++ b/libbb/printable_string.c
+@@ -31,8 +31,6 @@ const char* FAST_FUNC printable_string(u
+ }
+ if (c < ' ')
+ break;
+- if (c >= 0x7f)
+- break;
+ s++;
+ }
+
+@@ -45,7 +43,7 @@ const char* FAST_FUNC printable_string(u
+ unsigned char c = *d;
+ if (c == '\0')
+ break;
+- if (c < ' ' || c >= 0x7f)
++ if (c < ' ')
+ *d = '?';
+ d++;
+ }