Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
unsigned len;
*ptr = '\0';
# if ENABLE_FEATURE_ASSUME_UNICODE
- len = unicode_strlen(ptr_strbeg);
+ {
+ uni_stat_t uni_stat;
+ printable_string(&uni_stat, ptr_strbeg);
+ len = uni_stat.unicode_width;
+ }
# else
len = ptr - ptr_strbeg;
# endif
# if ENABLE_FEATURE_ASSUME_UNICODE
{
char c;
+ uni_stat_t uni_stat;
c = ptr[n];
ptr[n] = '\0';
- len = unicode_strlen(ptr);
+ printable_string(&uni_stat, ptr);
+ len = uni_stat.unicode_width;
ptr[n] = c;
}
# else