[Seaside-dev] codecs overhauled (again)

Philippe Marschall philippe.marschall at gmail.com
Sun Jun 7 15:03:42 UTC 2009


Hi

As a reaction to recent discussion on this list I made some changes to
the way codes work.

ByteArray >> #seasideString does no longer do any decoding
If you want to go from a ByteArray to a String you should always use a
WACodec. That's why ByteArray >> #seasideString should answer
something else so that users can catch errors early on.

All codecs can now be instantiated with WACodec class >> forEncoding:
If you have existing codec subclasses you'll have to implement
#supportsEncoding: and #privateForEncoding: on the class side. If you
don't like the names, now's the time to speak up.
This made it possible to move a whole lot of utf-8 tests from Squeak
to the portable area.

Additionally I added tests that the non-shortest form for UFT-8 should
be rejected. You don't have to pass these (Squeak/Pharo don't),
they're merely there for completeness.

Sorry this took so long.

Cheers
Philippe


More information about the seaside-dev mailing list