On Monday 21 February 2005 17:29, Peter Stephenson wrote: > Borzenkov Andrey wrote: > > The problem seems to be that currently zle returns to zsh array of > > wchar_t; a nd zsh of course has no idea what to do with it (and treats it > > as array of ch ar anyway). I started to attempt to fix it but then I > > realized I do not know (and there is nothing in patch) what was intended: > > > > - convert wchar_t to something else (mbchar back? UTF-8?) before passing > > it t o main zsh code. > > This should happen already. zleread() now calls zlegetline() (instead > of just returning the line it had already assembled) which calls > zlelineasstring() in zle_utils.c. For ZLE_UNICODE_SUPPORT this should > convert the wchar_t array to a metafied multibyte string as used by the > rest of the shell. > right, missed this. > I haven't tested the combined effect of the patches so far at all, since > I know there are bits that aren't fixed up yet. attached patch makes it so far as being able to start zsh -f and really input something. The relevant parts are actually selfinsert (wchar_t != wint_t) and zlelineasstring (length was computed incorrectly and final NULL metafied). Everything else is just part of yesterday's futile attempts :) Oh, and for some reasons mbrtowc(&outchar, &cnull, 1, &ps) segfaulted on me (Mandrake cooker). I can't commit it as for some reason ssh access to CVS hangs. -andrey