about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/utils.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 303fb68a7..a3cb6cd5c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-02-14  Peter Stephenson  <pws@csr.com>
+
+	* 23177: Src/utils.c: print unprintable characters under
+	256 in \M- format even in multibyte mode.
+
 2007-02-14  Barton E. Schaefer  <schaefer@zsh.org>
 
 	* 23169 (tweaked): Src/exec.c: upon failure to duplicate file
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;