summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2007-02-14 16:26:41 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2007-02-14 16:26:41 +0000
commitd283709363fab2a7e642e416fd61f95903c386b4 (patch)
tree5eeaca0c6d6d43e8d3c61e8fe65a5a0e771ebe67 /Src
parentf35ee0d1a0f47710fec27f4055b716a5aafe3d6e (diff)
downloadzsh-d283709363fab2a7e642e416fd61f95903c386b4.tar.gz
zsh-d283709363fab2a7e642e416fd61f95903c386b4.tar.xz
zsh-d283709363fab2a7e642e416fd61f95903c386b4.zip
23177: better formatting of unprintable multibyte characters under 256
Diffstat (limited to 'Src')
-rw-r--r--Src/utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/utils.c b/Src/utils.c
index 0e7a7d2bb..ea2d17149 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -514,10 +514,12 @@ wcs_nicechar(wchar_t c, size_t *widthp, char **swidep)
 	    sprintf(buf, "\\U%.8x", (unsigned int)c);
 	    if (widthp)
 		*widthp = 10;
-	} else {
+	} else if (c >= 0x100) {
 	    sprintf(buf, "\\u%.4x", (unsigned int)c);
 	    if (widthp)
 		*widthp = 6;
+	} else {
+	    return nicechar((int)c);
 	}
 	if (swidep)
 	    *swidep = buf + *widthp;