From d283709363fab2a7e642e416fd61f95903c386b4 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 14 Feb 2007 16:26:41 +0000 Subject: 23177: better formatting of unprintable multibyte characters under 256 --- Src/utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Src/utils.c') 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; -- cgit v1.2.3