[Seaside] [Q] WAKomEncoded equivalent thing for WAListener?

Lukas Renggli renggli at gmail.com
Sun Sep 9 17:22:48 UTC 2007


> >> I've used WAKomEncoded for my web app, and found that my application
> >> does not work with WAListener if there's Korean character in page/response.
> >
> > Yes, this is a problem with the current (bad) design of the server
> > adaptors: automatic encoding is only supported in the WAKom hierarchy.
> > It would be probably better if we moved this encoding transformation
> > as a strategy into the request/response so that it can be reused with
> > any server adapter.
> >
> Besides, this encoding problem, is WAListener a sort of classic WAKom
> when not streaming and also a streaming adaptor when needed ?

WAListener implements a minimal web server on its own. It uses the
request parsing of Kom though.

> In other
> word, could we use only WAListener (if no encoding stuff...) ? Is it
> what you do ?

WAKom is equivalent to WAListener. There are no equivalents for
WAKomEncoded, WAKomEncoded39 and WAKomEncodedSuperPlus ;-)

> > So far I was probably the only one using WAListener. As you maybe know
> > from earlier posts of mine, I don't trust the encoding of Squeak and
> > just keep all data in UTF-8 in my images.
> >
> What's the drawback of having UTF-8 data in the image ? you cannot
> "change" them in squeak nor inspect ?

In my experience this is usually not a problem. For example, #size
might not answer what you expect: it answers the bytes the string
consists of, not the number of actual characters. All the stream
methods, and #copyFrom:to:, #indexOf:, #findSubString:, #, etc. work
fine (for example all that is needed in the Pier parser). Data might
look scrambled in the inspectors, but you can easily convert it using
#utf8ToIso and #isoToUtf8.

Cheers,
Lukas

-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the seaside mailing list