[squeak-dev] UTF8 methods and portability

Levente Uzonyi leves at elte.hu
Wed Dec 30 05:28:08 UTC 2009


On Wed, 30 Dec 2009, K. K. Subramaniam wrote:

> Hi,
>
> The methods named squeakToUTF8 appears regressive in the light of forks and
> variants of Squeak and Smalltalk.
>
> Is there any specific reason against calling it asUTF8" and so on? The methods
> are not widely used yet to deserve leaving them in the image with a deprecated
> flag.

String >> #squeakToUtf8 has 'ar 6/3/2007' timestamp in my image, which 
means it's not that new (it's also included in the 3.10.2 release).
This method (as it's name suggests) converts a String from squeak's 
internal representation to utf-8. Similar methods are #squeakToIso, 
#squeakToMac, #utf8ToIso, etc.
#asUtf8 would be ok if strings knew their encoding, but they don't.

>
> Is there any idiomatic way to bulk rename a method (implementation and
> senders) in an image? Doing a search and replace is tediously slow.
>

OmniBrowser has tools for these kind of refactorings (ParseTreeRewriter).


Levente

> TIA .. Subbu
>
>
>



More information about the Squeak-dev mailing list