Mac-Roman to UTF8 project converter

Ned Konz ned at squeakland.org
Sat Mar 12 17:58:17 UTC 2005


On Saturday 12 March 2005 8:35 am, Hilaire Fernandes wrote:
> Hello,
>
> There are a few tutorial projects whichi had been translated from
> English to French (at http://www.ofset.org/~hilaire). It was done over a
> Squeak-image 3.7, therefore the encoding system should be something like
> mac-roman.
> Opening such project in Squeak-image 3.8 is not terrifc as the non-ascii
> part of the mac-roman encoding system is just ignored, therefore
> accented chararcter get out.
>
> Is there any way to import such projects within a 3.8 squeak image with
> an encoding system conversion on the fly?
>
> Hilaire Fernandes

You can do it after the fact:

project := Project named: 'Astuces diverses'.
project world allMorphsDo: [ :m | m isTextMorph ifTrue: [ m newContents: (m 
contents squeakToIso) ] ifFalse: [ (m isKindOf: StringMorph) ifTrue: [ m 
contents: (m contents squeakToIso) ]]].

Don't do this more than once, though; it'll change the high characters into 
something else!

Still, it seems as if the import should have converted the strings (I think).

-- 
Ned Konz
http://bike-nomad.com/squeak/



More information about the Squeak-dev mailing list