mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-24 04:50:27 +02:00
45536: fix handling of 8bit character under C-locale
correctly escape unprintable 8bit character by using \M-
This commit is contained in:
parent
e5765bfdc8
commit
0bc1edef5a
2 changed files with 7 additions and 2 deletions
|
|
@ -711,7 +711,7 @@ wcs_nicechar_sel(wchar_t c, size_t *widthp, char **swidep, int quotable)
|
|||
if (widthp)
|
||||
*widthp = 6;
|
||||
} else {
|
||||
strcpy(buf, nicechar((int)c));
|
||||
strcpy(buf, nicechar_sel((int)c, quotable));
|
||||
/*
|
||||
* There may be metafied characters from nicechar(),
|
||||
* so compute width and end position independently.
|
||||
|
|
@ -771,7 +771,7 @@ mod_export int is_wcs_nicechar(wchar_t c)
|
|||
if (c == 0x7f || c == L'\n' || c == L'\t' || c < 0x20)
|
||||
return 1;
|
||||
if (c >= 0x80) {
|
||||
return (c >= 0x100);
|
||||
return (c >= 0x100 || is_nicechar((int)c));
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue