3.10 - Mac OS X Leopard - accent chars and keyboard input

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
39 messages Options
12
Reply | Threaded
Open this post in threaded view
|

3.10 - Mac OS X Leopard - accent chars and keyboard input

Petr Fischer-3
Hi,

what is wrong with keyboard support of accent characters under "Squeak  
3.8.18beta1U" mac VM?
There is no support for VM parameters "-encoding", "-textenc", "-
eventenc" (is UTF-8 default on Mac?).
Keyboard input for accent (czech) characters is wrong. I am using 3.1O  
image and WAKomEncoded39.
All accent characters entered by keyboard are treated as "Character  
value: 0".

I am really confused about international keyboard support for about  
year (on linux before, on a mac now) :(

Any tricks? Thanks, pf





smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: 3.10 - Mac OS X Leopard - accent chars and keyboard input

Edgar J. De Cleene



El 2/7/08 8:52 AM, "Petr Fischer" <[hidden email]> escribió:

> (is UTF-8 default on Mac?).
No using John VM's.
Mac is like Unix but have differences .
I thinking as in 3.11 we should build new .sources, maybe its's time to do
UTF8 the default.

And I don't wish another Traits / No Traits or <- vs := war please...

Edgar





Reply | Threaded
Open this post in threaded view
|

Re: 3.10 - Mac OS X Leopard - accent chars and keyboard input

Petr Fischer-3
Can I solve mac keyboard input problem now by some tricks? Thanks, pf

On 7.2.2008, at 13:58, Edgar J. De Cleene wrote:

>
>
>
> El 2/7/08 8:52 AM, "Petr Fischer" <[hidden email]>  
> escribió:
>
>> (is UTF-8 default on Mac?).
> No using John VM's.
> Mac is like Unix but have differences .
> I thinking as in 3.11 we should build new .sources, maybe its's time  
> to do
> UTF8 the default.
>
> And I don't wish another Traits / No Traits or <- vs := war please...
>
> Edgar
>
>
>
>
>
>



smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: 3.10 - Mac OS X Leopard - accent chars and keyboard input

SergeStinckwich
In reply to this post by Petr Fischer-3
Petr Fischer a écrit :

> Hi,
>
> what is wrong with keyboard support of accent characters under "Squeak
> 3.8.18beta1U" mac VM?
> There is no support for VM parameters "-encoding", "-textenc",
> "-eventenc" (is UTF-8 default on Mac?).
> Keyboard input for accent (czech) characters is wrong. I am using 3.1O
> image and WAKomEncoded39.
> All accent characters entered by keyboard are treated as "Character
> value: 0".
>
> I am really confused about international keyboard support for about year
> (on linux before, on a mac now) :(


You mean keyboard input inside the image or via a form inside a web
browser ?

I'm using the same VM.

--
Serge Stinckwich
http://doesnotunderstand.free.fr/


Reply | Threaded
Open this post in threaded view
|

Re: 3.10 - Mac OS X Leopard - accent chars and keyboard input

Vladimir Pogorelenko
In reply to this post by Petr Fischer-3
>
> I am really confused about international keyboard support for about  
> year (on linux before, on a mac now) :(
>

I'm much agree on it. This is one of the major reason which stops me  
and a lot of users from using Squeak.

I was happy using unicode support on win in 3.10. But after that I  
switched to Mac. Don't even know what about linux.

Unicode is major, and I think it's a big barrier for non-english new  
comers.

Reply | Threaded
Open this post in threaded view
|

Re: 3.10 - Mac OS X Leopard - accent chars and keyboard input

Petr Fischer-3
In reply to this post by SergeStinckwich
I mean keyb. input inside image (while developing - entering texts,  
labels...). pf

On 7.2.2008, at 14:01, Serge Stinckwich wrote:

> Petr Fischer a écrit :
>> Hi,
>> what is wrong with keyboard support of accent characters under  
>> "Squeak 3.8.18beta1U" mac VM?
>> There is no support for VM parameters "-encoding", "-textenc", "-
>> eventenc" (is UTF-8 default on Mac?).
>> Keyboard input for accent (czech) characters is wrong. I am using  
>> 3.1O image and WAKomEncoded39.
>> All accent characters entered by keyboard are treated as "Character  
>> value: 0".
>> I am really confused about international keyboard support for about  
>> year (on linux before, on a mac now) :(
>
>
> You mean keyboard input inside the image or via a form inside a web  
> browser ?
>
> I'm using the same VM.
>
> --
> Serge Stinckwich
> http://doesnotunderstand.free.fr/
>
>
>



smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: 3.10 - Mac OS X Leopard - accent chars and keyboard input

Edgar J. De Cleene
In reply to this post by Petr Fischer-3



El 2/7/08 9:52 AM, "Petr Fischer" <[hidden email]> escribió:

> Can I solve mac keyboard input problem now by some tricks? Thanks, pf
>
> On 7.2.2008, at 13:58, Edgar J. De Cleene wrote:

Sure.
I try to help.
You try one of Unix VM ? (not the John ones)
I have old Mac PPC with Tiger, repeat again which John VM , and the exact
trouble.

Edgar



Reply | Threaded
Open this post in threaded view
|

Re: 3.10 - Mac OS X Leopard - accent chars and keyboard input

SergeStinckwich
In reply to this post by Petr Fischer-3
Petr Fischer a écrit :
> I mean keyb. input inside image (while developing - entering texts,
> labels...). pf
>
First of all, you need a Unicode font in order to read them.

--
Serge Stinckwich
http://doesnotunderstand.free.fr/


Reply | Threaded
Open this post in threaded view
|

Re: 3.10 - Mac OS X Leopard - accent chars and keyboard input

Petr Fischer-3
In reply to this post by Edgar J. De Cleene

On 7.2.2008, at 16:11, Edgar J. De Cleene wrote:

> Sure.
> I try to help.
> You try one of Unix VM ? (not the John ones)


I did the test of unix vm "Squeak-3.9-8".

1) If I drag&drop image on vm application bundle icon -> it hangs (and  
eats 100% of cpu forever)
2) If I run squeak binary from Terminal (inside the vm app bundle) ->  
it works (under X11)
3) with parameter "-encoding UTF-8" and default fonts -> no keyboard  
input (just nothing when I press accent keys)

Any other tricks or extra parameters?

Thanks for collaboration, pf

>
> I have old Mac PPC with Tiger, repeat again which John VM , and the  
> exact
> trouble.
>
> Edgar
>
>
>
>



smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: 3.10 - Mac OS X Leopard - accent chars and keyboard input

Petr Fischer-3
In reply to this post by SergeStinckwich
tried with Squeak-3.9-8 (mac unix vm) and internal Bitstream Vera Sans  
and Verdana from Windows (is it unicode?)

pf

On 7.2.2008, at 15:52, Serge Stinckwich wrote:

> Petr Fischer a écrit :
>> I mean keyb. input inside image (while developing - entering texts,  
>> labels...). pf
>>
> First of all, you need a Unicode font in order to read them.
>
> --
> Serge Stinckwich
> http://doesnotunderstand.free.fr/
>
>
>



smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: 3.10 - Mac OS X Leopard - accent chars and keyboard input

José Luis Redrejo
Petr, don't waste your time: It just does not work.

A colleague of mine and me have been trying to solve this issue, and talked with some of the squeak core developers. There have been very few answers and no one possitive, sometimes they have told me that it worked or it "should" work, or at least that it worked under OLPC. And it's not true.

I have one OLPC on my desk since some days ago and it does not work in spanish, this olpc owner is from Germany and he has also tested it doesn't work on german either.

So, in brief:
- not using UTF-8 encoding worked in the past, but since last year updates it doesn't work anymore
- using UTF-8 has never worked and it doesn't work now.

I'm afraid vm developers believe it works because composing keys works, but dead keys do not work and we can not assume that children or teachers will have to type alt+xxx whenever they want to use an accent.

So, until somebody with enough knowledge works on it, it's broken on any unix-like vm.

Sorry for the news, but as I said before, I've spent far too much time since September on this issue and haven't been able to make it work or convinced any skilled developer to work on it. It seems that, if it works under english and japanesse, that's enough. I have no idea how do they pretend to use OLPC with squeak on portuguesse, spanish, french or german spoken countries....


Regards
José L.






2008/2/7, Petr Fischer <[hidden email]>:
tried with Squeak-3.9-8 (mac unix vm) and internal Bitstream Vera Sans
and Verdana from Windows (is it unicode?)

pf

On 7.2.2008, at 15:52, Serge Stinckwich wrote:

> Petr Fischer a écrit :
>> I mean keyb. input inside image (while developing - entering texts,
>> labels...). pf
>>
> First of all, you need a Unicode font in order to read them.
>
> --
> Serge Stinckwich
> http://doesnotunderstand.free.fr/
>
>
>








Reply | Threaded
Open this post in threaded view
|

Re: 3.10 - Mac OS X Leopard - accent chars and keyboard input

SergeStinckwich
In reply to this post by Petr Fischer-3
There was a discussion about this topic at the beginning of the month :

http://article.gmane.org/gmane.comp.lang.smalltalk.squeak.general/122004

--
Serge Stinckwich
http://doesnotunderstand.free.fr/


Reply | Threaded
Open this post in threaded view
|

Re: 3.10 - Mac OS X Leopard - accent chars and keyboard input

José Luis Redrejo


2008/2/7, Serge Stinckwich <[hidden email]>:
There was a discussion about this topic at the beginning of the month :

http://article.gmane.org/gmane.comp.lang.smalltalk.squeak.general/122004

--
Serge Stinckwich
http://doesnotunderstand.free.fr/




Right, I participated in that thread, but it was left without solution. Danil Osipchuk did a great work digging in the vm sources, and it seemed that vm was about to be ready to handle dead keys but not finished.
The last email of the thread was this:  http://lists.squeakfoundation.org/pipermail/squeak-dev/2008-January/124248.html

So it seems the vm returns two different codes when pressing accents, what does not make sense and is not understood by the image.

No more progress since then.

Regards.
José L.


Reply | Threaded
Open this post in threaded view
|

Re: 3.10 - Mac OS X Leopard - accent chars and keyboard input

Danil Osipchuk-2
In reply to this post by José Luis Redrejo
José,

The problem is that it is hard to make a solution in this area for somebody who is using another language. So, if you find a native speaking person who can understand current implementation of i17n in squeak - it should not take a lot of time to come to conclusion if there are missing features or bugs on a VM side or not.
As to me, I have to say that keyboard input is not handled perfectly or at least consistently accross different VM platforms (I ended with distinct InputInterpeters for linux and windows for Russian), but I managed to get it working.

Even I may try to make an attempt to check accented characters on linux (no garantees though) if anybody tells me if this http://www.tux.org/~balsa/linux/deadkeys/index.html is revelant to the issue or not

cheers,
  danil
2008/2/7, José Luis Redrejo <[hidden email]>:
Petr, don't waste your time: It just does not work.

A colleague of mine and me have been trying to solve this issue, and talked with some of the squeak core developers. There have been very few answers and no one possitive, sometimes they have told me that it worked or it "should" work, or at least that it worked under OLPC. And it's not true.

I have one OLPC on my desk since some days ago and it does not work in spanish, this olpc owner is from Germany and he has also tested it doesn't work on german either.

So, in brief:
- not using UTF-8 encoding worked in the past, but since last year updates it doesn't work anymore
- using UTF-8 has never worked and it doesn't work now.

I'm afraid vm developers believe it works because composing keys works, but dead keys do not work and we can not assume that children or teachers will have to type alt+xxx whenever they want to use an accent.

So, until somebody with enough knowledge works on it, it's broken on any unix-like vm.

Sorry for the news, but as I said before, I've spent far too much time since September on this issue and haven't been able to make it work or convinced any skilled developer to work on it. It seems that, if it works under english and japanesse, that's enough. I have no idea how do they pretend to use OLPC with squeak on portuguesse, spanish, french or german spoken countries....


Regards
José L.






2008/2/7, Petr Fischer <[hidden email]>:
tried with Squeak-3.9-8 (mac unix vm) and internal Bitstream Vera Sans
and Verdana from Windows (is it unicode?)

pf

On 7.2.2008, at 15:52, Serge Stinckwich wrote:

> Petr Fischer a écrit :
>> I mean keyb. input inside image (while developing - entering texts,
>> labels...). pf
>>
> First of all, you need a Unicode font in order to read them.
>
> --
> Serge Stinckwich
> <a href="http://doesnotunderstand.free.fr/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://doesnotunderstand.free.fr/
>
>
>












Reply | Threaded
Open this post in threaded view
|

Re: 3.10 - Mac OS X Leopard - accent chars and keyboard input

Andreas.Raab
danil osipchuk wrote:
> As to me, I have to say that keyboard input is not handled perfectly or
> at least consistently accross different VM platforms (I ended with
> distinct InputInterpeters for linux and windows for Russian), but I
> managed to get it working.

What did you have to change on Windows? The Windows VM should not report
dead keys itself but rather the composed character, e.g., typing umlaut
and then a should result directly in ä. Does this work for you or did
you have to change something?

Cheers,
   - Andreas

Reply | Threaded
Open this post in threaded view
|

Re: 3.10 - Mac OS X Leopard - accent chars and keyboard input

Randal L. Schwartz
In reply to this post by Danil Osipchuk-2
>>>>> "danil" == danil osipchuk <[hidden email]> writes:

danil> The problem is that it is hard to make a solution in this area for
danil> somebody who is using another language. So, if you find a native
danil> speaking person who can understand current implementation of i17n in
danil> squeak - it should not take a lot of time to come to conclusion if
danil> there are missing features or bugs on a VM side or not.

i17n?

  localhost.local:~ % perl -lne 'print if /^i.{17}n$/' /usr/share/dict/words
  impossibilification
  intellectualization
  interstratification

or did you mean i18n:

  localhost.local:~ % perl -lne 'print if /^i.{18}n$/' /usr/share/dict/words
  institutionalization
  intercrystallization
  interdifferentiation
  internationalization

Of which the last one is probably your intention.

Although I kinda like intellectualization. :)

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[hidden email]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Reply | Threaded
Open this post in threaded view
|

Re: 3.10 - Mac OS X Leopard - accent chars and keyboard input

José Luis Redrejo
In reply to this post by Andreas.Raab


2008/2/7, Andreas Raab <[hidden email]>:
danil osipchuk wrote:
> As to me, I have to say that keyboard input is not handled perfectly or
> at least consistently accross different VM platforms (I ended with
> distinct InputInterpeters for linux and windows for Russian), but I
> managed to get it working.

What did you have to change on Windows? The Windows VM should not report
dead keys itself but rather the composed character, e.g., typing umlaut
and then a should result directly in ä. Does this work for you or did
you have to change something?

Cheers,
   - Andreas


That's exactly what the unix vm doesn't do and should do. As I told in a previous mail, it did it in the past when UTF-8 was not used in the machine locales. Now, even in that case it fails. It seems that ,after some work was done in the vm to get selections and copy & paste working with UTF-8, the keyboard input resulted totally broken in the unix vm.

Regards.

José L.




Reply | Threaded
Open this post in threaded view
|

Re: 3.10 - Mac OS X Leopard - accent chars and keyboard input

Danil Osipchuk-2
In reply to this post by José Luis Redrejo


Right, I participated in that thread, but it was left without solution. Danil Osipchuk did a great work digging in the vm sources, and it seemed that vm was about to be ready to handle dead keys but not finished.
The last email of the thread was this:  <a href="http://lists.squeakfoundation.org/pipermail/squeak-dev/2008-January/124248.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.squeakfoundation.org/pipermail/squeak-dev/2008-January/124248.html

So it seems the vm returns two different codes when pressing accents, what does not make sense and is not understood by the image.

Here is a short summary. Recent VMs (mac, unix and windows) all have two fields in the event buffer where they store the keycode - 3th ("old") and 6th - ("new"-unicode). Behaviour though is not consistent - I think linux VM has bugs with the 6th field for navigation keys - left,right,down,up arrows and home/end. They seem to be just plainly wrong. Also when a character outside of ascii region is pressed - 3rd field contains 0. So you need to use both fields in InputInterpeter ( here is the linux version of InputInterpeter for Russian):

keyCode: sensor firstEvt: evtBuf

    | keyCode |
    keyCode := evtBuf third.
    "trust the old field if it is control code - a workaround for inconsistency in unix VM, where evt sixth is wrong for movement arrows, home and end "
    (keyCode > 0 and: [keyCode < 16r21]) ifTrue: [^keyCode].

    "otherwise rely on the ucs field"
    ^evtBuf sixth.

Now for windows, it gives you always correct keycodes in the 6th field for ascii region, unicode and movement keystrokes (at least for Russian). When symbol is outside of the ascii range - 3th fied contains something unrelated with the ascii code < 128 - old implementation for Win1251 locale has been broken therefore too. But we don't care if we have can use 6th field. Unfortunetely mouse wheel movement stores zero there - and again you have to look at the 3rd field.

So, here is input interpreter for Russian on windows:

keyCode: sensor firstEvt: evtBuf
   
    " when mouse wheel is rolling the sixth field is not filled  - return the third field instead"
    evtBuf sixth = 0 ifTrue: [^evtBuf third].
    "otherwise use the ucs field strictly"
    ^evtBuf sixth.

The logic of analyzing two fields is incompatible between windows and linux - hence to input interpreters.

Now about accents. If my guess is right and one can distinguish between accent modifiers and chars which are being modified - one can build up a custom InputInterpeter for, lets say Spanish, and I may try to do this. Two questions though -
 1) is it supposed by design that deadkeys are handled on the smalltalk side?
 2) is the information about dead keys available *somewhere* in the event buffer ( because last time when I checked if I pressed deadkey modifier  the 6th field was zeroed on linux, and I forgot to check the 3rd). I also have not tried accented characters on windows yet.

cheers,

  Danil




No more progress since then.

Regards.
José L.






Reply | Threaded
Open this post in threaded view
|

Re: 3.10 - Mac OS X Leopard - accent chars and keyboard input

Danil Osipchuk-2
In reply to this post by José Luis Redrejo


2008/2/7, José Luis Redrejo <[hidden email]>:


2008/2/7, Andreas Raab <[hidden email]>:
danil osipchuk wrote:
> As to me, I have to say that keyboard input is not handled perfectly or
> at least consistently accross different VM platforms (I ended with
> distinct InputInterpeters for linux and windows for Russian), but I
> managed to get it working.

What did you have to change on Windows? The Windows VM should not report
dead keys itself but rather the composed character, e.g., typing umlaut
and then a should result directly in ä. Does this work for you or did
you have to change something?


I didn't check this  (that thread was about linux). See another mail about changes I did (they are not so big but inconsistent with linux).

That's exactly what the unix vm doesn't do and should do. As I told in a previous mail, it did it in the past when UTF-8 was not used in the machine locales. Now, even in that case it fails. It seems that ,after some work was done in the vm to get selections and copy & paste working with UTF-8, the keyboard input resulted totally broken in the unix vm.


Yes, this is the question - should the VM handle this or not?

cheers
  Danil


Reply | Threaded
Open this post in threaded view
|

Re: 3.10 - Mac OS X Leopard - accent chars and keyboard input

Petr Fischer-3
In reply to this post by José Luis Redrejo
No fun (really, I am not C or VM internals hacker). Next station:  
Seaside under VisualWorks... :(

On 7.2.2008, at 16:23, José Luis Redrejo wrote:

> Petr, don't waste your time: It just does not work.
>
> A colleague of mine and me have been trying to solve this issue, and  
> talked with some of the squeak core developers. There have been very  
> few answers and no one possitive, sometimes they have told me that  
> it worked or it "should" work, or at least that it worked under  
> OLPC. And it's not true.
>
> I have one OLPC on my desk since some days ago and it does not work  
> in spanish, this olpc owner is from Germany and he has also tested  
> it doesn't work on german either.
>
> So, in brief:
> - not using UTF-8 encoding worked in the past, but since last year  
> updates it doesn't work anymore
> - using UTF-8 has never worked and it doesn't work now.
>
> I'm afraid vm developers believe it works because composing keys  
> works, but dead keys do not work and we can not assume that children  
> or teachers will have to type alt+xxx whenever they want to use an  
> accent.
>
> So, until somebody with enough knowledge works on it, it's broken on  
> any unix-like vm.
>
> Sorry for the news, but as I said before, I've spent far too much  
> time since September on this issue and haven't been able to make it  
> work or convinced any skilled developer to work on it. It seems  
> that, if it works under english and japanesse, that's enough. I have  
> no idea how do they pretend to use OLPC with squeak on portuguesse,  
> spanish, french or german spoken countries....
>
>
> Regards
> José L.
>
>
>
>
>
>
> 2008/2/7, Petr Fischer <[hidden email]>: tried with  
> Squeak-3.9-8 (mac unix vm) and internal Bitstream Vera Sans
> and Verdana from Windows (is it unicode?)
>
> pf
>
> On 7.2.2008, at 15:52, Serge Stinckwich wrote:
>
> > Petr Fischer a écrit :
> >> I mean keyb. input inside image (while developing - entering texts,
> >> labels...). pf
> >>
> > First of all, you need a Unicode font in order to read them.
> >
> > --
> > Serge Stinckwich
> > http://doesnotunderstand.free.fr/
> >
> >
> >
>
>
>
>
>
>
>



smime.p7s (3K) Download Attachment
12