reassign 316010 slang2 tags 316010 + patch thanks Bug with CJK symbols belongs to slang2. Patch for it attached. I commented part of a function because I do not know how it is supposed to work.
/me thinks that slang2's upstream wants to reinvet the libc writing their own functions for text processing (unlike libc functions that are completely incorrect and UTF-8 centric). -- Eugeniy Meshcheryakov Kyiv National Taras Shevchenko University Information and Computing Centre http://icc.univ.kiev.ua
diff -ruN slang-2.0.4-old/src/slutf8.c slang-2.0.4/src/slutf8.c
--- slang-2.0.4-old/src/slutf8.c 2005-06-20 18:56:22.000000000 +0300
+++ slang-2.0.4/src/slutf8.c 2005-07-14 18:23:07.456402952 +0300
@@ -148,19 +148,15 @@
continue;
}
- if (ignore_combining)
- {
+ int wi;
SLwchar_Type w = fast_utf8_decode (s, len);
- if (0 != SLwchar_wcwidth (w))
- n++;
+ wi = SLwchar_wcwidth (w);
+ n+=wi;
s += len;
continue;
- }
-
- n++;
- s += len;
}
-
+#if 0
+ /* XXX how this should work???? */
if (ignore_combining)
{
while (s < smax)
@@ -176,7 +172,7 @@
s += nconsumed;
}
}
-
+#endif
if (dnum != NULL)
*dnum = n;
return s;
signature.asc
Description: Digital signature

