Author: jow
Date: 2014-10-27 12:22:15 +0100 (Mon, 27 Oct 2014)
New Revision: 43084

Added:
   trunk/package/utils/busybox/patches/270-libbb_make_unicode_printable.patch
Modified:
   trunk/package/utils/busybox/Makefile
Log:
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 <[email protected]>

Modified: trunk/package/utils/busybox/Makefile
===================================================================
--- trunk/package/utils/busybox/Makefile        2014-10-27 11:09:37 UTC (rev 
43083)
+++ trunk/package/utils/busybox/Makefile        2014-10-27 11:22:15 UTC (rev 
43084)
@@ -9,7 +9,7 @@
 
 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

Added: 
trunk/package/utils/busybox/patches/270-libbb_make_unicode_printable.patch
===================================================================
--- trunk/package/utils/busybox/patches/270-libbb_make_unicode_printable.patch  
                        (rev 0)
+++ trunk/package/utils/busybox/patches/270-libbb_make_unicode_printable.patch  
2014-10-27 11:22:15 UTC (rev 43084)
@@ -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++;
+               }
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to