Hiesenbug with "unicode spew"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
tty
Reply | Threaded
Open this post in threaded view
|

Hiesenbug with "unicode spew"

tty
Hi All,

I discovered that the "unicode spew" was not what I thought it was.
When the "spew" happens it is because the html output is dumped within the
body tag like this:

<html>
<head></head>
<body>&lt;�!DOCTYPE
html&gt;&lt;�html&gt;&lt;�head&gt;&lt;�title&gt;Seaside&lt;�/title&gt;&lt;�meta
charset="utf-8"/&gt;&lt;�link rel="stylesheet" type="text/css"
href="/files/WADevelopmentFiles/development.css"/&gt;&lt;�/head&gt;&lt;�body
onload="onLoad()"&gt;&lt;�a
href="/waDebug?_s=ccLzvr_77iZO7bVN&amp;amp;_k=KdqQxjU4LkFiBg30&amp;amp;1"&gt;standard
dash&lt;�/a&gt;&amp;nbsp;&lt;�a h
</body>
</html>

Its wierd and its a heisenbug.

I created a copy of WACounter , named it WADebug and the callbacks "dash"
and "mdash" totally isolate the Character.

http://menmachinesmaterials.com/waDebug

*renderContentOn: html

        html anchor
                callback: [ self dash ];
                with: 'standard dash'.
        html space.
        html anchor
                callback: [ self ndash ];
                with: 'n-dash'.
        html break.
        html html: count.

dash
        count := '-'

ndash
        count := (Character value:8211) asString

*

What is really weird is that it works on the server when it did not work on
my workstation.
For some reason, it just started working on my Workstation.
I made a small edit to my Workstation, unrelated to that issue,  and it
stopped working.

I am running Seaside on
Squeak5.2
latest update: #18233


Anybody have a clue why it would mangle the output like that?

I will be trying a Pharo install possibly tomorrow to see if that negates
the bug.

cheers.

t






--
Sent from: http://forum.world.st/Seaside-General-f86180.html
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
tty
Reply | Threaded
Open this post in threaded view
|

Re: Hiesenbug with "unicode spew"

tty
Hi All,

First, my apologies for the multiple posts. When I did not see my message
appear, I assumed I had messed up and reposted.

I believe that the "Unicode Spew" is a result of  the parse taking longer
than the Seaside Render loop and/or errors in the parse not being handled.

If you go here: http://menmachinesmaterials.com/WikitextParser click the
Hamburger Icon->Database->Blade Runner, it creates the unicode spew every
time.

If I run the same parse within the image as a workspace Doit, it works just
fine.

Here is the bulky thing, it is a sub-message of renderContentOn:html

*renderParsedOn: html
        | wikiGrammar wikiParser input  actor s|

        actor := PEGWikiMediaGeneratorTables new.
        actor transcripton  
                ifTrue:[ Transcript clear].
                       
        wikicode isNil
                ifTrue:[input := '== Welcome To WikitextParserBrowser ==']
                ifFalse:[input := wikicode].

        wikiGrammar := PEGParser grammarWikiMediaTables reading positioning.
        wikiParser := PEGParser parserPEG parse: 'Grammar' stream: wikiGrammar
actor: PEGParserParser new.
        [[output := wikiParser parse: 'Page' stream: input actor: actor. ]
                on: Error
                do:[:ex | output := '
 Error parsing. see Wikicode tab for source
<code>', ex description, '</code>' ]]
                        ensure:[
                                        s := ((output  asString copyReplaceTokens: '<body>' with:'' )
copyReplaceTokens:'</body>' with:'') .
                                        s := s copyReplaceAll:'&gt;' with:'>' asTokens:false.
                                        s := s copyReplaceAll:'&lt;' with:'<' asTokens:false.
                                        html break;break.
                                        html html: s.
                                        ].*

I think the "Render Loop" just cannot handle that call when things go south.

Thank you all for your patience and advise.



--
Sent from: http://forum.world.st/Seaside-General-f86180.html
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside