diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/utils.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index cc270ddc0..0d95307de 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2020-03-17 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> + + * 45536: Src/utils.c: fix handling of 8bit character in + is_wcs_nicechar() and wcs_nicechar_sel() under C-locale. + 2020-03-15 Daniel Shahaf <danielsh@apache.org> * 45541: Functions/VCS_Info/test-repo-git-rebase-apply: internal: diff --git a/Src/utils.c b/Src/utils.c index f9c2d4a2b..339404489 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -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; |