No, it's just more smalltalk coding, the utf8-plain-text bytes need to  
be translated into bytes according to

"Normalizes the string into the specified form as described in Unicode  
Technical Report #15."
and ensure we return the bytes as UTF8.

The FFI calls let the macintosh operating system deal with the messy  
details.


http://unicode.org/unicode/standard/reports/tr15/tr15-18.html
also see
http://developer.apple.com/qa/qa2001/qa1235.html

Say is that a precomposed and decomposed Unicode you have there,  
really what does squeak want? want does the operating system want.
Choices choices.

PS beware the utf8 to macroman or macroman to utf8 text converts in  
squeak, I don't think the one that came from etoys does the right thing
can't remember, it's named wrong, does utf8 to ascii or something...


On 11-Feb-09, at 7:29 AM, Michael Rueger wrote:

> Michael Rueger wrote:
>
>>> Well that *is* the extended clipboard support. Just need the  
>>> smalltalk code to make the proper primitive calls to the extended  
>>> clipboard plugin.
>>> You need the ClipboardExtendedPlugin.bundle
>
> Hmm, you still need FFI despite the plugin:
>
> readUTF8StringClipboardData
>       | bytes |
>       "utf8"
>
>       bytes := self readClipboardData: 'public.utf8-plain-text'.
>       bytes := MacCFString callMakeUTF8NormalizedStringViaByteString:  
> bytes asString.
>       ^bytes ifNil: [bytes] ifNotNil:
>               [bytes asString convertFromWithConverter: (UTF8TextConverter 
> new)]
>
>
>
> Michael

--
= 
= 
= 
========================================================================
John M. McIntosh <john...@smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
= 
= 
= 
========================================================================




_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to