This is the mail archive of the
libc-locales@sourceware.org
mailing list for the GNU libc locales project.
[Bug localedata/22073] charmaps/UTF-8: wcwidth of U+00AD (soft hyphen): 0 or 1 ?
- From: "maiku.fabian at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: libc-locales at sourceware dot org
- Date: Thu, 07 Sep 2017 20:19:48 +0000
- Subject: [Bug localedata/22073] charmaps/UTF-8: wcwidth of U+00AD (soft hyphen): 0 or 1 ?
- Auto-submitted: auto-generated
- References: <bug-22073-716@http.sourceware.org/bugzilla/>
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.