[Seaside-dev] ByteArray>>seasideString
Michael Lucas-Smith
mlucas-smith at cincom.com
Wed Apr 22 15:31:20 UTC 2009
Philippe Marschall wrote:
> 2009/4/22 Michael Lucas-Smith <mlucas-smith at cincom.com>:
>
>> What encoding do you assume the bytes to be in when you call this?
>>
>
> The implementation assumes latin-1. That doesn't mean that this makes
> a lot of sense. To go from a ByteArray to a String you should use
> WACodec so my proposal is to change the implementation to return
> something like #printString. If that breaks something then it was
> bugged anyway.
>
>
Along those lines, the WAGenericCodec assumes you go from string to
string, when it really should go from bytearray to string to bytearray -
encoded it's just bytes, decoded it's a string.
I'd be in favour of dumping attempts to turn strings directly in to
bytes like this and also be in favor of making the codec transform
between bytes and strings. How do other people feel about this?
Michael
More information about the seaside-dev
mailing list