[Vm-dev] Unix UTF8 input
martinkuball at web.de
Tue Jun 12 19:21:33 UTC 2007
Am Sunday 10 June 2007 schrieb Chris Petsos:
> > On Jun 10, 2007, at 22:00 , Martin Kuball wrote:
> > > Well, the last time I looked at the code the unix vm didn't support
> > > multibyte key events. So you won't have any luck with setting the
> > > eventenc. Some time ago I submitted a patch to make this work. It
> > > obviously never made it into the vm. And I can't blame anyone
> > > because the
> > > code was bad. I have improved it a bit since than. So if there is
> > > interest
> > > and if somebody tells me where to send it I will submit the patch
> > > again.
> Yes...please Martin...post it to the mail list...
Here you go. The patch changes the input event handling method to process
multibyte characters. Basically there are two changes. First: in the event
handler the individual bytes are accumulated and than the recode method is
called. Second: if you use an utf8 locale the utf8 input encoding is set
to UTF8 (see sqUnixCharConv.c).
If you want to use a different encoding you can overide the automatic
choice by using -eventenc parameter. For available encodings see
The patch has to be applied to platforms/unix/vm-display-X11/sqUnixX11.c.
If you find any bugs or have questions or suggestions for improvement
please tell me.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 8102 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20070612/915ce52e/sqUnixX11.bin
More information about the Vm-dev