On GemStone 3.3 and beyond, the hack of changeClassTo: to convert strings to UTF8 fails. Moreover, #_encodeAsUTF8intoString was added into the system so we should use that.
The new code should be:
GRUtf8CodecStream>>nextPutAll:
binary
ifTrue: [ stream nextPutAll: aString asString ]
ifFalse: [ stream nextPutAll: aString _encodeAsUTF8intoString ]
Utf8>>asString
^ self decodeToUnicode
The whole discussion of this fix is in a thread "Again, Corrup Error preventing debugging real seaside exception" on the GLASS mailing list.
I am a bit out of time right now to setup everything to make a PR, but I will see if I have time later.