[PATCH] Also treat "East Asian Ambiguous" characters as full-width

Shun-ichi GOTO shunichi.goto at gmail.com
Fri Oct 30 07:56:54 CDT 2009


2009/10/30 Benoit Boissinot <benoit.boissinot at ens-lyon.org>:
> But we have no context here, right? So shouldn't we treat them as
> narrow?

The width of those characters depends on the font of the terminal
and usually console app cannot know its representation width.

I assume that the purpose of the trimming is not to make ugly output
by turning back at the right end of the terminal.
If so, I think it is better (or safe) to count column width of those characters
as full-width.

F.Y.I.: On Japanese windows, "GREEK SMALL LETTER BETA" (U+03B2)
is displayed as full-width on the terminal with default font "MS
Mincho" / "MS Gothic". On the other hand, it is half width with
"Luchida console" font.

-- 
Shun-ichi GOTO


More information about the Mercurial-devel mailing list