[Vm-dev] Re: Pasting unicode (was Re: Pharo:: Re: Cuis update)

Juan Vuletich juan at jvuletich.org
Sat Apr 18 11:50:37 UTC 2009

Andreas Raab wrote:
> Bert Freudenberg wrote:
>> Below that the paste from ru.wikipedia. These are actual question 
>> marks (ASCII 63), the Mac VM does not paste Unicode even if setting 
>> SqueakEncodingType to UTF-8 (only the extended clipboard plugin does 
>> this).
> Fortunately, at least that part is very easy to fix. I asked our CEO 
> if we could release our clipboard support code back to the community 
> and he agreed, so find attched an sqMacUIClipBoard.c version which 
> does support Unicode copy/paste properly via UTF-8 (this should work 
> as a drop-in replacement to the existing sqMacUIClipBoard.c). Brought 
> to you by the friendly folks at Qwaq.
> Cheers,
>   - Andreas

Thanks Andreas! This will make a lot of people happy!

BTW, the image needs to deal with different VMs using various encoding 
for clipboard data. Currently, a check is made, to assume UTF-8 if on 
Windows, and MacRoman elsewhere. It seems Mac will support UTF-8 soon.

I think we need a new primitive, perhaps #clipboardEncoding, or 
#vmTextEncoding, that could answer UTF-8 / MacRoman / ASCII and may be 
others. That would ease supporting various VMs with the same image.

WRT keyboard events, it seems not to be necessary. VMs store Unicode 
keystrokes in different slots in the event buffer, than the one used for 
MacRoman. So, the image can tell, right?

What do you think?

Juan Vuletich

More information about the Vm-dev mailing list