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


Groups > gnu.bash.bug > #11438

Re: help builtin generates unaligned results for multicolumn widechars.

Path csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!usenet.stanford.edu!not-for-mail
From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: help builtin generates unaligned results for multicolumn widechars.
Date Tue, 25 Aug 2015 10:30:43 -0400
Lines 34
Approved bug-bash@gnu.org
Message-ID <mailman.75.1440513056.28410.bug-bash@gnu.org> (permalink)
References <BLU436-SMTP140089BB8F294A061718964C0640@phx.gbl>
Reply-To chet.ramey@case.edu
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
X-Trace usenet.stanford.edu 1440513057 1190 208.118.235.17 (25 Aug 2015 14:30:57 GMT)
X-Complaints-To action@cs.stanford.edu
Cc chet.ramey@case.edu
To "Mingye Wang (Arthur2e5)" <arthur200126@hotmail.com>, bug-bash@gnu.org
Envelope-to bug-bash@gnu.org
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.2.0
In-Reply-To <BLU436-SMTP140089BB8F294A061718964C0640@phx.gbl>
X-Junkmail-Status score=10/50, host=mpv5.cwru.edu
X-Junkmail-Whitelist YES (by domain whitelist at mpv2.tis.cwru.edu)
X-detected-operating-system by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From 129.22.105.37
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:11438

Show key headers only | View raw


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 8/22/15 9:59 AM, Mingye Wang (Arthur2e5) wrote:
> 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.

Thanks.  I made some changes along these lines that will be in the next
push to the devel branch.

Chet
- -- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAlXcfAoACgkQu1hp8GTqdKu7SQCfbDVrAq0/pnrLBLdOD2XLv39o
04kAoII1J+A+j4jYx9Qu/0XaiVt1uXYE
=uzw9
-----END PGP SIGNATURE-----

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


Thread

Re: help builtin generates unaligned results for multicolumn widechars. Chet Ramey <chet.ramey@case.edu> - 2015-08-25 10:30 -0400

csiph-web