Help! Character confusion?! A [BUG]?

Sean Charles scharles at nildram.co.uk
Tue Apr 9 22:00:07 UTC 2002


I've written an extension that allows me to copy the contents of a code pane
using the yellow button menu to the clipboard as HTML. The HTML honours the
contents of the pane with respect to colour, emphasis etc so that when I
paste the (primitive) clipboard into my HTML editor and switch to the
preview pane I see pretty printed Smalltalk. I need this for some tutorials
I am hoping to post on my website (when? er...um...) and I though that
boring old monochrome code snippets needed some pepping up. The
modifications work just fine except that I am struggling (it's almost 11pm
here in the UK as I type this  :O) and Mr.SleepyHead is calling and I can't
figure it out.

Basically, there seems to be a problem either with one or more of,
    String class HtmlEntities table
    Character>>isoToSqueak
    Character>>squeakToIso

I noticed that after calling String>>asHtml and previewing the *real* web
browser page, the following characters came out incorrectly:

123456 comes out as 123 superscripted, 456 as normal i.e.

    123
         456        sort of thing, and...

abcd....xyz comes out as abcd...x'y-accute'z.

I have stared and stared at the code but it's all going fuzzy. Help please!
The quick way to see the problems are to do a print-it on:

'xyz' asHtml --> gives --> 'xýz'
'123456' asHtml --> gives --> '¹²³456'

Help please...
Sean Charles.

(Of course, this may be correct and I should just go to bed earlier...)





More information about the Squeak-dev mailing list