[etoys-dev] composition input change

Bert Freudenberg bert at freudenbergs.de
Thu Oct 14 21:50:55 EDT 2010


On 14.10.2010, at 18:15, K. K. Subramaniam wrote:

> On Friday 15 Oct 2010 1:23:10 am Bert Freudenberg wrote:
>> What I'm worried about is this: If the locale is "de_DE.UTF-8" then the
>> image will use Latin1Environment and UTF32InputInterpreter. That
>> interpreter expects either a utf32 keycode or MacRoman. But if the VM now
>> sends UTF-8 instead of setting the utf32 field, it would break, no?
> Recent VMs generate keycodes in evtBuf sixth taking encoding into account for 
> latin-1 but not Indic languages. In 
> M17nInputInterpreter>>nextCharFrom:firstEvt:, I check for evtBuf sixth before 
> falling back to UTF-8 so it should not affect Latin-1 input.

But currently M17nInputInterpreter is not used for latin-1 languages so this is irrelevant.

> In any case, compositionInput uses direct method by default. For instance, I 
> use UIM which defaults to direct method (us_intl layout). When I need to type 
> an Indic character, I press SHIFT-CTRL to switch languages and SHIFT-SPACE to 
> toggle on composite encoding for three-byte Indic characters and toggle it off 
> for accented characters like ü or é.

The question is how the VM passes key events to the image with the "direct method" if compositioninput is enabled. If it uses the utf32 field in a single event is fine. If it uses utf-8 via multiple events it is not.

> If you have access to de_DE.UTF-8 systems, please give M17n a try. Just turn 
> on composition input and add 'de' to M17nEnvironment>>supportedLanguages and 
> do:
>    LanguageEnvironment resetKnownEnvironments; clearDefault.
>    HandMorph clearInterpreters.
> 
> If input breaks, it is a major defect.
> 
> Subbu

We're constantly talking past each other ;)

You were saying that without further changes to the image, it is safe for us to enable composition input, if LANG specifies UTF-8 encoding.

The case I am worried about (see above) is if the VM uses composition input but the image does not use your m17n input interpreter, which would be the case for most European languages.

I am out of country so cannot easily test this. And x2sqKeyCompositionInput() is too complex to just verify the source is sane.

- Bert -




More information about the etoys-dev mailing list