Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: UTF-8 input [was Re: PATCH: zle_params.c]
- X-seq: zsh-workers 20804
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- Subject: Re: UTF-8 input [was Re: PATCH: zle_params.c]
- Date: Thu, 10 Feb 2005 14:51:19 +0000
- In-reply-to: <200502101422.j1AEM3Zx005978@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <200501261806.j0QI6Q2d021854@xxxxxxxxxxxxxx> <20050129034740.GA21742@xxxxxxxxxxx> <20050130010754.6F985863A@xxxxxxxxxxxxxxxxxxxxxxxx> <1050130063525.ZM24312@xxxxxxxxxxxxxxxxxxxxxxx> <200502101422.j1AEM3Zx005978@xxxxxxxxxxxxxx>
On Feb 10, 2:22pm, Peter Stephenson wrote:
} Subject: Re: UTF-8 input [was Re: PATCH: zle_params.c]
}
} I think $KEYS is OK. The current intention is for the input to key
} bindings to remain multibyte strings (metafied where necessary).
} Modifying BUFFER and other parameters converts from multibyte strings to
} wide characters automatically; I've already written that bit (because it
} was easy). So if you feed back KEYS into the system from a function it
} will pass through the mbtowc stuff at the appropriate level.
So if, for example, I do
BUFFER="$LBUFFER$KEYS$RBUFFER"
this is going to convert LBUFFER and RBUFFER from wide chars to metafied
on expansion, and then convert the whole quoted string back to wide chars
upon assignment? Or am I missing something crucial, e.g. that BUFFER and
its L/R components are stored as raw bytes?
} I suspect we will want a flag such as ${(m)#KEYS} to treat the string
} as a multibyte character string instead of raw bytes and maybe a
} ${(M)#KEYS} not to.
(M) is already taken, as are (w) and (W).
I presume you mean (m) to be like (c) in that it works only with ${#...}.
Otherwise I'm even more confused.
} [...] argue for it to handle multibyte strings by default in a suitable
} locale, but when Perl did that it broke everything in sight.
I'm not arguing for that ... if anything, I'm arguing against it.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author