diff --git a/archival/unzip.c b/archival/unzip.c
index 96b7ab6..c406d53 100644
--- a/archival/unzip.c
+++ b/archival/unzip.c
@@ -153,15 +153,15 @@
 #define FIX_ENDIANNESS_CDF(cdf) \
 do { if (BB_BIG_ENDIAN) { \
 	(cdf).fmt.version_made_by = SWAP_LE16((cdf).fmt.version_made_by); \
-	(cdf).fmt.version_needed = SWAP_LE16((cdf).fmt.version_needed); \
-	(cdf).fmt.method        = SWAP_LE16((cdf).fmt.method      ); \
-	(cdf).fmt.modtime       = SWAP_LE16((cdf).fmt.modtime     ); \
-	(cdf).fmt.moddate       = SWAP_LE16((cdf).fmt.moddate     ); \
-	(cdf).fmt.crc32         = SWAP_LE32((cdf).fmt.crc32       ); \
-	(cdf).fmt.cmpsize       = SWAP_LE32((cdf).fmt.cmpsize     ); \
-	(cdf).fmt.ucmpsize      = SWAP_LE32((cdf).fmt.ucmpsize    ); \
-	(cdf).fmt.filename_len  = SWAP_LE16((cdf).fmt.filename_len); \
-	(cdf).fmt.extra_len     = SWAP_LE16((cdf).fmt.extra_len   ); \
+	(cdf).fmt.version_needed  = SWAP_LE16((cdf).fmt.version_needed ); \
+	(cdf).fmt.method          = SWAP_LE16((cdf).fmt.method         ); \
+	(cdf).fmt.modtime         = SWAP_LE16((cdf).fmt.modtime        ); \
+	(cdf).fmt.moddate         = SWAP_LE16((cdf).fmt.moddate        ); \
+	(cdf).fmt.crc32           = SWAP_LE32((cdf).fmt.crc32          ); \
+	(cdf).fmt.cmpsize         = SWAP_LE32((cdf).fmt.cmpsize        ); \
+	(cdf).fmt.ucmpsize        = SWAP_LE32((cdf).fmt.ucmpsize       ); \
+	(cdf).fmt.filename_len    = SWAP_LE16((cdf).fmt.filename_len   ); \
+	(cdf).fmt.extra_len       = SWAP_LE16((cdf).fmt.extra_len      ); \
 	(cdf).fmt.file_comment_length = SWAP_LE16((cdf).fmt.file_comment_length); \
 	(cdf).fmt.external_attributes = SWAP_LE32((cdf).fmt.external_attributes); \
 }} while (0)
@@ -456,7 +456,9 @@
 	struct stat stat_buf;
 	if (lstat(dst_fn, &stat_buf) == -1) {
 		if (errno != ENOENT) {
-			bb_perror_msg_and_die("can't stat '%s'", dst_fn);
+			bb_perror_msg_and_die("can't stat '%s'",
+				dst_fn
+			);
 		}
 		/* File does not exist */
 		return -1;
@@ -634,7 +636,9 @@
 				break;
 			if (++i > 2) {
 				*ext = '\0';
-				bb_error_msg_and_die("can't open %s[.zip]", src_fn);
+				bb_error_msg_and_die("can't open %s[.zip]",
+					src_fn
+				);
 			}
 			strcpy(ext, extn[i - 1]);
 		}
@@ -646,8 +650,11 @@
 		xchdir(base_dir);
 
 	if (quiet <= 1) { /* not -qq */
-		if (quiet == 0)
-			printf("Archive:  %s\n", src_fn);
+		if (quiet == 0) {
+			printf("Archive:  %s\n",
+				printable_string(src_fn)
+			);
+		}
 		if (opts & OPT_l) {
 			puts(verbose ?
 				" Length   Method    Size  Cmpr    Date    Time   CRC-32   Name\n"
@@ -831,7 +838,8 @@
 				printf(       "%9u  " "%s   "         "%s\n",
 					(unsigned)zip.fmt.ucmpsize,
 					dtbuf,
-					dst_fn);
+					printable_string(dst_fn)
+				);
 			} else {
 				char method6[7];
 				unsigned long percents;
@@ -860,7 +868,8 @@
 					(unsigned)percents,
 					dtbuf,
 					zip.fmt.crc32,
-					dst_fn);
+					printable_string(dst_fn)
+				);
 				total_size += zip.fmt.cmpsize;
 			}
 			total_usize += zip.fmt.ucmpsize;
@@ -886,7 +895,7 @@
 			mode = get_lstat_mode(dst_fn);
 			if (mode == -1) { /* ENOENT */
 				if (!quiet) {
-					printf("   creating: %s\n", dst_fn);
+					printf("   creating: %s\n", printable_string(dst_fn));
 				}
 				unzip_create_leading_dirs(dst_fn);
 				if (bb_make_directory(dst_fn, dir_mode, FILEUTILS_IGNORE_CHMOD_ERR)) {
@@ -895,7 +904,9 @@
 			} else {
 				if (!S_ISDIR(mode)) {
 					bb_error_msg_and_die("'%s' exists but is not a %s",
-						dst_fn, "directory");
+						printable_string(dst_fn),
+						"directory"
+					);
 				}
 			}
 			goto skip_cmpsize;
@@ -914,12 +925,16 @@
 			if (!S_ISREG(mode)) {
  fishy:
 				bb_error_msg_and_die("'%s' exists but is not a %s",
-					dst_fn, "regular file");
+					printable_string(dst_fn),
+					"regular file"
+				);
 			}
 			if (overwrite == O_ALWAYS) {
 				goto do_open_and_extract;
 			}
-			printf("replace %s? [y]es, [n]o, [A]ll, [N]one, [r]ename: ", dst_fn);
+			printf("replace %s? [y]es, [n]o, [A]ll, [N]one, [r]ename: ",
+				printable_string(dst_fn)
+			);
 			my_fgets80(key_buf);
 			/* User input could take a long time. Is it still a regular file? */
 			mode = get_lstat_mode(dst_fn);
@@ -949,7 +964,9 @@
 			if (!quiet) {
 				printf(/* zip.fmt.method == 0
 					? " extracting: %s\n"
-					: */ "  inflating: %s\n", dst_fn);
+					: */ "  inflating: %s\n",
+					printable_string(dst_fn)
+				);
 			}
 #if ENABLE_FEATURE_UNZIP_CDF
 			if (S_ISLNK(file_mode)) {
diff --git a/coreutils/ls.c b/coreutils/ls.c
index b1c3068..db3ddb9 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -421,7 +421,7 @@
 	uni_stat_t uni_stat;
 
 	// TODO: quote tab as \t, etc, if -Q
-	name = printable_string(&uni_stat, name);
+	name = printable_string2(&uni_stat, name);
 
 	if (!(option_mask32 & OPT_Q)) {
 		return uni_stat.unicode_width;
@@ -450,7 +450,7 @@
 	uni_stat_t uni_stat;
 
 	// TODO: quote tab as \t, etc, if -Q
-	name = printable_string(&uni_stat, name);
+	name = printable_string2(&uni_stat, name);
 
 	if (!(option_mask32 & OPT_Q)) {
 		fputs(name, stdout);
diff --git a/include/libbb.h b/include/libbb.h
index 61fa1e0..140404f 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -833,7 +833,8 @@
 } uni_stat_t;
 /* Returns a string with unprintable chars replaced by '?' or
  * SUBST_WCHAR. This function is unicode-aware. */
-const char* FAST_FUNC printable_string(uni_stat_t *stats, const char *str);
+const char* FAST_FUNC printable_string(const char *str);
+const char* FAST_FUNC printable_string2(uni_stat_t *stats, const char *str);
 /* Prints unprintable char ch as ^C or M-c to file
  * (M-c is used only if ch is ORed with PRINTABLE_META),
  * else it is printed as-is (except for ch = 0x9b) */
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index d5e92e8..b1e971f 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -1086,7 +1086,7 @@
 			);
 		}
 		if (ENABLE_UNICODE_SUPPORT)
-			puts(printable_string(NULL, matches[n]));
+			puts(printable_string(matches[n]));
 		else
 			puts(matches[n]);
 	}
diff --git a/libbb/printable_string.c b/libbb/printable_string.c
index 077d58d..a814fd0 100644
--- a/libbb/printable_string.c
+++ b/libbb/printable_string.c
@@ -9,7 +9,7 @@
 #include "libbb.h"
 #include "unicode.h"
 
-const char* FAST_FUNC printable_string(uni_stat_t *stats, const char *str)
+const char* FAST_FUNC printable_string2(uni_stat_t *stats, const char *str)
 {
 	char *dst;
 	const char *s;
@@ -55,3 +55,8 @@
 #endif
 	return auto_string(dst);
 }
+
+const char* FAST_FUNC printable_string(const char *str)
+{
+	return printable_string2(NULL, str);
+}
diff --git a/libbb/unicode.c b/libbb/unicode.c
index d378175..89d4217 100644
--- a/libbb/unicode.c
+++ b/libbb/unicode.c
@@ -996,7 +996,7 @@
 size_t FAST_FUNC unicode_strwidth(const char *string)
 {
 	uni_stat_t uni_stat;
-	printable_string(&uni_stat, string);
+	printable_string2(&uni_stat, string);
 	return uni_stat.unicode_width;
 }
 
diff --git a/util-linux/fdisk_gpt.c b/util-linux/fdisk_gpt.c
index cdb9062..dbe889f 100644
--- a/util-linux/fdisk_gpt.c
+++ b/util-linux/fdisk_gpt.c
@@ -87,7 +87,7 @@
 	}
 	wc[i] = 0;
 	if (wcstombs(buf, wc, sizeof(buf)) <= sizeof(buf)-1)
-		fputs(printable_string(NULL, buf), stdout);
+		fputs(printable_string(buf), stdout);
 #else
 	char buf[37];
 	int i = 0;
