bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help builtin generates unaligned results for multicolumn widechars.


From: Chet Ramey
Subject: Re: help builtin generates unaligned results for multicolumn widechars.
Date: Tue, 25 Aug 2015 10:30:43 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

-----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-----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]