[squeak-dev] International text input on X11

tim Rowledge tim at rowledge.org
Tue Jun 7 00:36:17 UTC 2016


> On 06-06-2016, at 2:00 PM, Yoshiki Ohshima <Yoshiki.Ohshima at acm.org> wrote:
> 
> On Mon, Jun 6, 2016 at 1:19 PM, tim Rowledge <tim at rowledge.org> wrote:
>> 
>>> On 06-06-2016, at 11:38 AM, Yoshiki Ohshima <Yoshiki.Ohshima at acm.org> wrote:
>>> 
>>>> So, how on earth did I get here… and can I ever get back to plain old en_GB?
>>> 
>>> Do you have to?
>> 
>> Well, yes. When I was a mid-teen (around the time that electricity was invented) I could make a faltering conversation in English, Welsh, French, German, Russian or Latin. These days I can mange English ok and can just about remember how to pronounce Welsh. You’ll note that coping with Japanese is not in either list …
> 
> Oh, sorry.  I was facetious but not helpful.

That’s ok - I was being a little sarcastic too. It amazes me that humans can handle such a range of language features. I mean the the only two things I can think of the Japanese and English have in common is that humans use them and both are time-forward grammar. Welsh is fun because it has a few extra items in the alphabet but nothing scary looking - and it’s perfectly phonetic in both directions. Russian was interesting to try out because of the different alphabet, though it’s still nothing like the change to ideographic languages. Scratch does a decent job of handling the fonts via CairoPango & your UTF work, and even deals with right-to-left text ok. 

Please, don’t anyone ask me for boustrophedon support.

>> 
>> It seems to me that we’ve fixed the VM ok, and we know how to start it correctly to use the new option. I’m not at all sure whether it is sensible to use the -compositioninput flag for anyone not wanting the popup window; should the scratch startup script do some working out to decide this?
> 
> Yes.  The patch to the scratch script I sent to checks the environment
> variable XIM, and passes the -compositioninput flag only when there is
> a spec for it. 

That would be the - 
if echo $XMODIFIERS | grep '@im=' > /dev/null; then
+     VMOPTIONS="$VMOPTIONS -compositioninput"
+ fi
+ 
changes?

Could you send me the plain file? I just don’t get the unix diff format and it’s much easier for me to compare manually.

I’ve just noticed that attempting numeric input appears not to work because instead of a 0 character I get a 65296 (apparently unicode ‘full width 0’) char. www.codetable.net tells me there are fullwidth digits and halfwidth digits and I bet buried in there somewhere are half-wits. Thankfully it seems {big number} asCharacter digitValue does a good enough job of getting the number value and then we just have to more explicitly check for - and . If you take a look at StringFieldMorph>insertCharacter: you’ll see where the problem lies easily enough. To my amazement I can actually enter numbers and the arithmetic gets sorted out ok. Good job somebody!



tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Dukedom: aristocratic birth control




More information about the Squeak-dev mailing list