openwrt/package/utils/busybox/patches/270-libbb_make_unicode_printable.patch
Jo-Philipp Wich 2ab0dae991 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>

SVN-Revision: 43084
2014-10-27 11:22:15 +00:00

21 lines
388 B
Diff

--- 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++;
}