zsh-users
 help / color / mirror / code / Atom feed
From: "Jun T." <takimoto-j@kba.biglobe.ne.jp>
To: zsh-users@zsh.org
Subject: Re: zsh doesn't understand some multibyte characters
Date: Fri, 15 May 2015 01:43:45 +0900	[thread overview]
Message-ID: <CF275011-9284-4528-9027-26762F7EFE17@kba.biglobe.ne.jp> (raw)
In-Reply-To: <20150513182942.GB4834@lorien.comfychair.org>


2015/05/14 03:29, Danek Duvall <duvall@comfychair.org> wrote
> 
> If I set
> 
>    comb_acute_mb[] = { (char)0xe2, (char)0x80, (char)0xa6 };
> 
> in the test, it thinks that character's wcwidth() is 2, not 1.

U+2026 is one of the characters whose "East Asian Width" property
is set to "Ambiguous". Widths of these characters are *really* ambiguous;
in western (monospaced) fonts they have a single width,
while in (most of?) CJK fonts they have double width.

Usually, wcwidth() returns 1 for these characters so they are not
displayed correctly in CJK fonts, unless applications take spacial care of
them. For example, xterm has an option -cjk to handle this problem.

Your report indicates that Solaris is one of the rare systems in
which wcwidth() returns 2 for U+2026.

Are there any fonts in which U+2026 has double width on Solaris?

> I don't know why the zero-width
> combining character was chosen as the test.

The test was first introduced to detect a broken wcwidth() on Mac OS X,
where wcwidth() returns 1 for combining characters.


  parent reply	other threads:[~2015-05-14 16:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-13 16:14 Danek Duvall
2015-05-13 17:43 ` Bart Schaefer
2015-05-13 18:29   ` Danek Duvall
2015-05-13 20:20     ` Bart Schaefer
2015-05-13 21:24       ` Chet Ramey
2015-05-14 16:43     ` Jun T. [this message]
2015-05-14 17:32       ` Danek Duvall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CF275011-9284-4528-9027-26762F7EFE17@kba.biglobe.ne.jp \
    --to=takimoto-j@kba.biglobe.ne.jp \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).