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

Philippe Marschall philippe.marschall at gmail.com
Mon Sep 10 04:39:43 UTC 2007


2007/9/9, Lukas Renggli <renggli at gmail.com>:
> > >> 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 was once one. ;-)

>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.

And anything that includes upper/lower case and whitespaces (outside
ASCII) does not work.

> All the stream
> methods, and #copyFrom:to:, #indexOf:, #findSubString:, #, etc. work
> fine

Only for ASCII strings/characters of course.

> (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.

Only for Latin1 strings of course.

Cheers
Philippe


> Cheers,
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>


More information about the seaside mailing list