Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #11438
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: help builtin generates unaligned results for multicolumn widechars. |
| Date | 2015-08-25 10:30 -0400 |
| Message-ID | <mailman.75.1440513056.28410.bug-bash@gnu.org> (permalink) |
| References | <BLU436-SMTP140089BB8F294A061718964C0640@phx.gbl> |
-----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
Re: help builtin generates unaligned results for multicolumn widechars. Chet Ramey <chet.ramey@case.edu> - 2015-08-25 10:30 -0400
csiph-web