Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Regression in UTF-8 support
- X-seq: zsh-workers 21764
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Regression in UTF-8 support
- Date: Mon, 26 Sep 2005 19:37:03 +0100
- In-reply-to: <200509252005.41824.arvidjaar@xxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Organization: Cambridge Silicon Radio
- References: <200509252005.41824.arvidjaar@xxxxxxxxxx>
Andrey Borzenkov <arvidjaar@xxxxxxxxxx> wrote:
> I did not really need Russian filenames until recently; with quite
> unexpected results. The following is in UTF; please compare file listing
> with completion listing (ignore obvious formatting error):
>...
> so something mangles characters (d184 -> d183, d18b -> d183 etc), moreover,
> parsing stops at this character (d183)
I think this improves matters, but whether it's the whole thing I don't
know. It's a simple interface issue. I'm now less convinced I should have
let stringaszleline() operate in place.
Index: Src/Zle/zle_hist.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_hist.c,v
retrieving revision 1.27
diff -u -r1.27 zle_hist.c
--- Src/Zle/zle_hist.c 15 Aug 2005 10:01:50 -0000 1.27
+++ Src/Zle/zle_hist.c 26 Sep 2005 18:34:59 -0000
@@ -75,6 +75,8 @@
static void
zletext(Histent ent, struct zle_text *zt)
{
+ char *duptext;
+
if (ent->zle_text) {
zt->text = ent->zle_text;
zt->len = ent->zle_len;
@@ -82,8 +84,10 @@
return;
}
- zt->text = stringaszleline((unsigned char *)ent->text, 0,
+ duptext = ztrdup(ent->text);
+ zt->text = stringaszleline((unsigned char *)duptext, 0,
&zt->len, NULL, NULL);
+ zsfree(duptext);
zt->alloced = 1;
}
--
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.
**********************************************************************
Messages sorted by:
Reverse Date,
Date,
Thread,
Author