mac vm 3.7.1b1 (testing)
Yoshiki Ohshima
Yoshiki.Ohshima at acm.org
Sat Dec 20 11:31:38 UTC 2003
John,
> > Let me see if I understand this... Before the change, the code in
> > the EventKeyDown/Up event is different from the EventKeyChar and
> > *after* the change, the code in the three events are the same?
>
> Yes
>
> >
> > When the VM is running with an older image, the right thing for à
> > (224 in latin1/unicode, 136 in macroman) is to generate:
> >
> >> EventKeyDown
> >> charCode = 136
> >> EventKeyChar
> >> charCode = 136
> >> EventKeyUp
> >> charCode = 136
> >
> > right?
>
> No, its
> EventKeyDown
> charCode = 224
> EventKeyChar
> charCode = 136
> EventKeyUp
> charCode = 224
>
> which is what pre 3.7.0.bx VMs would generate.
Ah. but I meant that (136, 136, 136) looks more correct. Isn't it?
> > Too bad I don't have any Mac available around me. (Probably I
> > should try tomorrow at the Glendale office.)
> >
> > I thought you added a primitive to change the encoding? The default
> > behavior of VM should be compatible with the older image.
>
> I didn't add a primitive, I think you are thinking of the encoding for
> file names, path names, and vm path which is
> set as a plist parm so it's correct as the application starts up.
I'll take a look at this.
> Multibyte character in this case means getting a unicode string from
> the input
> manager as a result of using the input text method which results in a
> keyboard event which has
> more than one character as a result. Before 3.7.0 I would only grab the
> first character, in 3.7.0b1-b3
> I would process 1 or more characters as a EventKeyChar event.
Ok. At least the VM doesn't drop the information, we can work
around it.
> > Do you mean by 'for each unicode character' that the bytes of
> > UTF-8? or single UTF-32/16 value?
>
> We get back a string of typedef UInt16 UniChar;
> I'd guess that is 16 bits UTF-16?
Yes. I presume that when a character bigger than 16-bit is input,
the VM returns two UInt16 values. That is good.
The Mac OS X support of my Japanese support is still in flux anyway, so this
VM change isn't hurt not many people. A few early adaptors can check
how it works.
Thank you again,
-- Yoshiki
More information about the Squeak-dev
mailing list
|