This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug localedata/22073] charmaps/UTF-8: wcwidth of U+00AD (soft hyphen): 0 or 1 ?


https://sourceware.org/bugzilla/show_bug.cgi?id=22073

--- Comment #13 from Mike FABIAN <maiku.fabian at gmail dot com> ---
(In reply to Egmont Koblinger from comment #11)
> To clarify my previous comment:
> 
> If compatibility is a concern then let's go with 1, I'm absolutely fine with
> that.
> 
> If compatibility is not such of a concern, it feels to me that -1 is a more
> reasonable choice than 0.


> Basically, out of the three possibilities 0 is the one I find the least
> reasonable. As for the other two, my guts feeling tell me to go with the
> backwards compatible 1, however, you guys have way better arguments pro or
> con than guts feeling so I cannot join that discussion.

From the man page of wcwidth:

     The wcwidth() function returns  the number of columns needed
     to represent the wide character c.  If c is a printable wide
     character,  the value  is at  least 0.   If c  is null  wide
     character  (L'\0'),  the  value  is  0.   Otherwise,  -1  is
     returned.

The soft hyphen is printable (it is in the section “print” of LC_CTYPE
in localedata/locales/i18n), therefore the value returned by wcwidth()
is at least 0.  So -1 is not possible for the soft hyphen.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]