[squeak-dev] Linux input testers needed (was: Re: Problem with typing Czech characters in Squeak 3.10 on Ubuntu 9.04)

Andreas Raab andreas.raab at gmx.de
Tue Aug 18 05:22:52 UTC 2009


Folks -

Armed with the input from Yoshiki, here is an attempt at addressing the 
problem of decomposed unicode input. I decided to do the handling a 
little differently from Etoys by providing a UnicodeInputInterpreter 
that does the composition in HandMorph since all the hooks were already 
available.

[Yoshiki - out of curiosity, what is the reason why in the Etoys image 
this level of input conversion is not managed via the input interpreter 
but rather separately in ParagraphEditor?]

I need some people who can test this stuff though. So Michal or anyone 
else who does m17n input on Linux, please try the following:
1) Verify that your platform generates non-composed input (see the 
original message below)
2) Load the attached code. It will go and fetch the Unicode data and 
install the compositions mappings in Unicode.
3) Install the new input converter using:
      World primaryHand keyboardInterpreter: UnicodeInputInterpreter new.
4) Type the same sequence(s) as in 1).

If everything goes as it should, you should see the composed character. 
If it doesn't, it would be interesting to see what the state of the 
input event queue is at that point in time (print out the contents of 
"sensor eventQueue" inside of UnicodeInterpreter>>nextCharFrom:firstEvt:).

Change Set:		UnicodeInput-ar
Date:			17 August 2009
Author:			Andreas Raab

Simplified handling for decomposed Unicode input. 
UnicodeInputInterpreter deals with the composition based on the 
composition operations provided by Unicode:
- Unicode>>isComposed: aCharacter
- Unicode>>isComposable: aCharacter
- Unicode>>compose: baseChar with: compositionChar
- Unicode>>decompose: composedChar
See the method comments for more information.

If this works okay for people, I'll push it into the trunk.

Cheers,
   - Andreas



Michal Perutka wrote:
> 2009/8/14 Andreas Raab <andreas.raab at gmx.de <mailto:andreas.raab at gmx.de>>
> 
>     Michal Perutka wrote:
> 
>         I can type lower case Czech letters ě š č ř ž ý á í é ů ú - the
>         keyboard keys with these letters works. But when I press a key
>         with diacritical mark + some character key, I get only the
>         character followed by a question mark, e? s? c? for example. So
>         I am not able to type Czech upper case characters (like Ě Š Č etc.).
> 
>         Where is the problem ? In Squeak VM (I use last 3.10-6 version)
>         or in Squeak itself? Please help.
> 
> 
>     I don't know too much about Linux input handling but it looks like a
>     mismatch between VM and image (i.e., that the VM is reporting two
>     codes that the image needs to merge and that the image doesn't
>     really know what to do with it).
> 
>     To track this down, you might start by looking at the incoming
>     events in EventSensor (but VERY carefully; screwing up there is a
>     great recipe for a force-quit-restart cycle ;) and see if the event
>     codes look reasonable to you. Also check out the other input
>     converters - some of them might already be doing what you need.
> 
>     Cheers,
>      - Andreas
> 
> 
> Thanks.
> 
> So, in EventSensor>>processKeyboardEvent: I inserted  a line
> Transcript show: evt asString; show: String cr.
> (or I can insert that line in 
> ISO88592InputInterpreter>>nextCharFrom:firstEvt:, the result is the same)
> 
> Then, when I type á (=225), I get
> #(2 2841355 225 1 0 225 0 0)
> #(2 2841355 225 0 0 225 0 0)
> #(2 2841506 225 2 0 225 0 0)
> 
> When I type acute accent key and then a (=97), first I get
> #(2 2862057 180 2 0 0 0 0)
> 
> then
> #(2 2872015 97 1 0 97 0 0)
> #(2 2872015 97 0 0 97 0 0)
> #(2 2872015 769 1 0 769 0 0)
> #(2 2872015 769 0 0 769 0 0)
> #(2 2872191 97 2 0 97 0 0)
> 
> and as result I get a?, not á
> 
> But what next?
> 
> Cheers,
> Michal
> 
> 
> ------------------------------------------------------------------------
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: UnicodeInput-ar.2.cs
Type: text/x-csharp
Size: 7525 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090817/12f144e9/UnicodeInput-ar.2.bin


More information about the Squeak-dev mailing list