mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-29 05:21:00 +01:00
23177: better formatting of unprintable multibyte characters under 256
This commit is contained in:
parent
f35ee0d1a0
commit
d283709363
2 changed files with 8 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue