[Seaside-dev] encoding/decoding Streams

Philippe Marschall philippe.marschall at gmail.com
Thu Jul 31 07:38:20 UTC 2008


2008/7/31 Paolo Bonzini <bonzini at gnu.org>:
> I have two questions:
>
> 1) Would it make sense to change WACodec>>#encode: and WACodec>>#decode: to
> accept streams instead of Strings?

The servers I had to do with deal with Strings and not Streams. So
this doesn't look like a win. What would make semantically make sense
that #encode: takes a String and returns a ByteArray. And the reverse
for #decode:. The problem is that you'd have to convert again to a
String for the servers.

> 2) The tests for codecs assume that the source encoding is ISO-8859-1.

I don't see what you mean here.

>  This
> is fine for testing purposes, but not necessarily for deployment. Would it
> make sense then to change the constructor so that it can take a source and
> destination encoding?  Or is there something I'm missing?

I assume the current tests cause a problem somewhere. Can you elaborate?

Cheers
Philippe


More information about the seaside-dev mailing list