Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #11425

help builtin generates unaligned results for multicolumn widechars.

Path csiph.com!xmission!news.alt.net!nntp.club.cc.cmu.edu!169.228.66.3.MISMATCH!ihnp4.UCSD.Edu!usenet.stanford.edu!not-for-mail
From "Mingye Wang (Arthur2e5)" <arthur200126@hotmail.com>
Newsgroups gnu.bash.bug
Subject help builtin generates unaligned results for multicolumn widechars.
Date Sat, 22 Aug 2015 21:59:09 +0800
Lines 50
Approved bug-bash@gnu.org
Message-ID <mailman.71.1440251977.11330.bug-bash@gnu.org> (permalink)
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3AXbBbHATjPmDje1uvcXdT0Mcu3oKTXVb"
X-Trace usenet.stanford.edu 1440251977 15835 208.118.235.17 (22 Aug 2015 13:59:37 GMT)
X-Complaints-To action@cs.stanford.edu
To bug-bash@gnu.org
Envelope-to bug-bash@gnu.org
X-TMN [g/9dqn4VV82d2RjbMvw8gaxnx27EV/f7]
X-Originating-Email [arthur200126@hotmail.com]
X-Enigmail-Draft-Status N1110
User-Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Thunderbird/40.0
X-OriginalArrivalTime 22 Aug 2015 13:59:27.0760 (UTC) FILETIME=[C27F8100:01D0DCE2]
X-detected-operating-system by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From 65.55.116.102
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.14
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <http://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
Xref csiph.com gnu.bash.bug:11425

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

Version: <= 4.4-alpha

In bash's `help.def' builtin, wdispcolumn() is used to display `help'
columns. It terminates the string at wcstr[width - 1], with a comment
that assmues each wide character to be exactly one column wide.

This works fine with most languages where widechars are, actually, one
column wide. But with East Asian languages, more specifically Chinese,
Japanese & Korean, it would produce terrible results.

Maybe bash should consult wcswidth(wcstr+1,displen), or get the `len' in
wcsnwidth() changed to some additional int* argument to store it, and
consider the the difference between the real width and displen.

-- 
Regards,
Arthur2e5 (0x222D7BDA)


Back to gnu.bash.bug | Previous | Next | Find similar


Thread

help builtin generates unaligned results for multicolumn widechars. "Mingye Wang (Arthur2e5)" <arthur200126@hotmail.com> - 2015-08-22 21:59 +0800

csiph-web