From 7dbd93a3d471ff402f919d31aa4e86bdb9d6e5aa Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Sat, 30 Jun 2018 00:55:35 -0600 Subject: * Width of characters is not always determined correctly when wcwidth is used. The revert to using code for the Windows operating system. Reported by Andrew Ho. --- pith/charconv/utf8.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pith/charconv') diff --git a/pith/charconv/utf8.c b/pith/charconv/utf8.c index 373f4b62..6613f4db 100644 --- a/pith/charconv/utf8.c +++ b/pith/charconv/utf8.c @@ -100,10 +100,13 @@ wcellwidth(UCS ucs) #endif } -/* ambiguous width zone character function */ +/* ambiguous width zone character function. We use the Windows code until + * we find a better way to do it in general. + */ int pith_ucs4width(UCS ucs) { + return (ucs >= 0x2100) ? 2 : 1; #if !defined(_WINDOWS) && HAVE_WCWIDTH return wcwidth((wchar_t) ucs); #else -- cgit v1.2.3-70-g09d2