From owner-freebsd-bugs@freebsd.org Mon Feb 5 20:21:09 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92365EEC83D for ; Mon, 5 Feb 2018 20:21:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E321873F8 for ; Mon, 5 Feb 2018 20:21:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 71A705106 for ; Mon, 5 Feb 2018 20:21:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w15KL8uq053823 for ; Mon, 5 Feb 2018 20:21:08 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w15KL8WA053822 for freebsd-bugs@FreeBSD.org; Mon, 5 Feb 2018 20:21:08 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 225692] iswprint() wrong for some FULL WIDTH characters in UTF-8 locale Date: Mon, 05 Feb 2018 20:21:08 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: cem@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Feb 2018 20:21:09 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D225692 --- Comment #1 from Conrad Meyer --- iswprint(wc) is a thin shim around __istype(wc, _CTYPE_R); __istype(wc, type) is a thin shim in include/_ctype.h: return (!!__maskrune(wc, _CTYPE_R)); __maskrune() is defined earlier in the same file: return ((wc < 0 || wc >=3D _CACHED_RUNES) ? ___runetype(wc) : _CurrentRuneLocale->__runetype[wc]) & _CTYPE_R; (CACHED_RUNES is probably 1<<8.) This tells me the type information is being looked up in ___runetype() and = that the _CTYPE_R bit must be unset for 0x2002/0xff08. At some level, I thought we got this metadata from the unicode standard tab= les, but maybe ours are out of date or this particular data is sourced independently. ___runetype(wc) is a thin shim around ___runetype_l(wc, __get_locale()); ___runetype_l() does a binary search in the _RuneRange table for the current locale object. If nothing is found, it returns 0. This suggests the curre= nt locale object does not have or does not have correct type metadata for at l= east these two characters. --=20 You are receiving this mail because: You are the assignee for the bug.=