Skip to content
Snippets Groups Projects
Commit 2ab0dae9 authored by Jo-Philipp Wich's avatar Jo-Philipp Wich
Browse files

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: default avatarJo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 43084
parent 9b1ad94f
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
--- 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++;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment