Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Some groundwork for Unicode in Zle



=?iso-8859-1?Q?Fran=E7ois-Xavier?= Coudert wrote:
> Hi all,
> 
> I'm new to the list but I'm interested in UTF-8 inclusion into Zle. My
> question is the following: have you considered the possibility of keeping
> storing strings like the line edited in arrays of char (and not wide
> chars), while using a few functions to handle the fact that one Unicode
> character may be represented by a few chars (and one glyph by a few
> Unicode characters, but I'm not sure how this can be handled).

This works well inside the main shell --- we use something similar with
a "Meta" character to quote characters special to the shell.  This will
probably continue.

In the line editor, being able to access a character by index is fairly
fundamental.  Having to count every time we need to access a location
would be a big change.  It's better to have an array of the right type.
In other places we will need to pass a wchar_t or even a wint_t, but
this is better than having a multibyte string for every character.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



Messages sorted by: Reverse Date, Date, Thread, Author