--- Src/utils.c 15 Dec 2005 14:51:41 -0000 1.108 +++ Src/utils.c 7 Jan 2006 22:36:34 -0000 @@ -3475,22 +3475,21 @@ mb_niceformat(const char *s, FILE *strea if (ret == (size_t)-1 || ret == (size_t)-2) { + /* The byte didn't convert, so output it as a \M-x sequence. */ + fmt = nicechar(*(unsigned char*)ptr); + ret = newl = 1; + } else { /* - * We're a bit stuck here. I suppose we could - * just stick with \M-... for the individual bytes. + * careful in case converting NULL returned 0: NULLs are + * real characters for us. */ - break; + if (c == L'\0' && ret == 0) + ret = 1; + fmt = wcs_nicechar(c, &newl, NULL); } - /* - * careful in case converting NULL returned 0: NULLs are real - * characters for us. - */ - if (c == L'\0' && ret == 0) - ret = 1; + umlen -= ret; ptr += ret; - - fmt = wcs_nicechar(c, &newl, NULL); l += newl; if (stream)