iso8859-1
Boris Gaertner
Boris.Gaertner at gmx.net
Fri Nov 15 21:05:10 UTC 2002
jean-marie.zajac <jean-marie.zajac at laposte.net> wrote
Subject: iso8859-1
> Thanks, several thanks to Boris Gaertner for the fix on Scamper. It's
> really better and I can now read the accentuated HTML pages. This
> resolved 95 % of my problem.
> Obviously, the user is never completely satisfied; my text persist to
> display some ' ' in the middle of nowhere.
> Just a little fix for me ?
>
Oh, I gave you a very bad fix. It translated the accented characters
but it introduced a new problem with ' '. That is my fault. Please
drop may change. Here is how you can do it:
1. Open a class hierarchy browser
2. Select class 'HtmlParser'
3. select the class protocol.
4. select the method #parseTokens:
5. call up the menu of the method name view and select to option 'versions'
6. A violet window opens. In its upper view, you see two lines.
one begins with BG (this is my faulty 'improvement'), one begins
with 'bolot 12/1/1999' (this is the original method of Bolot)
7. To restore Bolots version, select the line that begins with 'bolot
12/1/1999' ,
call up the menu and select option 'revert to selected version'
You may wish to remove the change of HtmlParser class>>parseTokens:
from you changes set.
Next, file in the attachment of this mail. (It changes two methods:
String>>replaceHtmlCharRefs and HtmlText>>initialize:).
In String>>replaceHtmlCharRefs I added the translation of the
decoded character denotation (e.g. ' ') from iso to Squeak
and in HtmlText>>initialize: I had to remove the call of isoToSqueak.
The reason is that the entire text stream is converted much earlier in
Scamper>>displayTextHtmlPage:. It is wrong to convert substrings
a second time as this is done in HtmlText>>initialize:. The intention
in HtmlText>>initialize: is certainly to convert only characters that were
introduced by String>>replaceHtmlCharRefs but this has to be done
in String>>replaceHtmlCharRefs.
In new first attempt to fix the problem I replaced access to a twice
converted string with access to a once converted string, but that was
a flaw. One has to avoid the second character translation altogether.
Yoshiki posted a very interesting reaction to my mail from Nov 14, 2002.
I will need some time to answer, but I will answer.
My apologies for the confusion.
Greetings, Boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ISO8859.4.cs
Type: application/octet-stream
Size: 2880 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20021115/586cd78c/ISO8859.4.obj
More information about the Squeak-dev
mailing list
|