diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2007-02-14 16:26:41 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2007-02-14 16:26:41 +0000 |
commit | d283709363fab2a7e642e416fd61f95903c386b4 (patch) | |
tree | 5eeaca0c6d6d43e8d3c61e8fe65a5a0e771ebe67 | |
parent | f35ee0d1a0f47710fec27f4055b716a5aafe3d6e (diff) | |
download | zsh-d283709363fab2a7e642e416fd61f95903c386b4.tar.gz zsh-d283709363fab2a7e642e416fd61f95903c386b4.tar.xz zsh-d283709363fab2a7e642e416fd61f95903c386b4.zip |
23177: better formatting of unprintable multibyte characters under 256
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/utils.c | 4 |
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; |