[Seaside] WAResponce, XML response and BOM
Philippe Marschall
philippe.marschall at gmail.com
Thu Mar 6 06:01:06 UTC 2008
2008/3/6, Ron Teitelbaum <Ron at usmedrec.com>:
> Hi Petr,
>
> The string can not be sent over http, the change is due to
> String>>encodeForHTTP
That doesn't make any sense. #encodeForHTTP is for urls, certainly not
for the body of the response. Seaside has it's own implementation of
#encodeForHTTP so there shouldn't even be any senders of it. I rather
looks like you are using an "encoded" server adapter who is unaware of
the BOM and tries to encode the BOM into utf-8. Doing the BOM by hand
you most certainly do not want an "encoded" server adapter.
Cheers
Philippe
> You can translate the string back to its original form by doing
>
> String>>unescapePercents
>
> 16rEFBBBF asByteArray asString encodeForHTTP = '%C3%AF%C2%BB%C2%BF'
>
> 16rEFBBBF asByteArray asString encodeForHTTP unescapePercents asByteArray
> hex = 'EFBBBF'
>
> Hope that helps,
>
>
> Ron Teitelbaum
>
>
> > -----Original Message-----
> > From: Petr Fischer
> >
> > Hi,
> >
> > I am using Seaside with FusionCharts. XML data file for FusionCharts
> > is generated by this code:
> >
> >
> > url := (html urlForAction: [
> > self session returnResponse:
> (Seaside.WAResponse
> > new
> > contentType: 'text/xml';
> > nextPut: 239 asCharacter;
> > nextPut: 187 asCharacter;
> > nextPut: 191 asCharacter;
> > nextPutAll: chart xmlString;
> > yourself)
> > ]).
> >
> > 239, 187 and 191 characters is BOM mark for UTF-8 (EF BB BF) - but
> > this 3 characters are messed in responce to "C3 AF C2 BB C2 BF" - what
> > is wrong?
> >
> > Thanks very much for suggestions, Petr Fischer (VW7.6dev, mac os x)
> > _______________________________________________
> > seaside mailing list
> > seaside at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
More information about the seaside
mailing list