String>>asHtml and Character>>isoToSqueak ?

Avi Bryant avi at beta4.com
Mon Jun 21 20:24:52 UTC 2004


On Jun 21, 2004, at 11:55 AM, Ragnar Hojland Espinosa wrote:

> I cant get myself to understand this, perhaps someone could show me
> why this is not broken and bring some sense to my world? :)
>
>     Transcript show: 'company3' asHtml; cr.
>
> amusingly gives
>
>     companý³

Yup, that's broken.  Don't use #asHtml.  Incidentally it's also 
astoundingly slow, because it makes a new copy of the string for every 
entry in HtmlEntities.

You can look at the class side of WAAbstractHtmlBuilder in Seaside 2.5 
for a faster and safer approach.

Avi




More information about the Squeak-dev mailing list