Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Unicode problem
- X-seq: zsh-workers 24416
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Unicode problem
- Date: Mon, 21 Jan 2008 14:15:37 +0000
- In-reply-to: <slrnfp97q5.dvv.joerg@xxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <slrnfouc3r.6ea.joerg@xxxxxxxxxxxx> <20080117120932.4458d35a@news01> <slrnfp97q5.dvv.joerg@xxxxxxxxxxxx>
> The zero width character is drawn with width one?
Yes, that's what gnome-terminal is doing. It seems to agree with the
screen width the library code is reporting (I didn't check explicitly
but the behaviour is consistent with that).
I think there are actually two widths involved here: the screen width
used with a fixed-size font for editing (applicable to zsh), and the
logical width of the character that would appear in a document. The
latter is typically different to the former (in particular when a
variable width font is in use), and it's the latter case where it needs
to be zero width. There's a kind of hybrid case for a WYSIWYG word
processor where it needs to flag up the space for editing even though
pretending it's behaving as zero-width, but this is a special case of
variable-width fonts. The information in the library as returned by
wcwidth() is only applicable to fixed width fonts, where "zero width" is
essentially meaningless; a character width must be 1, 2, ... So I think
gnome-terminal is doing the right thing here, although I can understand
the confusion.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author