In Pier on Seaside 3, if I use a utf-8 encoded Comanche Adapter, I receive a walkback "MNU: ByteArray>>isByteString"
The error is generated from:
GRPharoUtf8CodecStream>>nextPutAll
nextPutAll: aString
binary
ifTrue: [ stream nextPutAll: aString asString ]
ifFalse: [
aString isByteString
ifTrue: [ self encodeFast: aString ]
ifFalse: [ self encodeDefault: aString ] ]
while trying to serve "style.css" which originates from:
PRStructure>>defaultEnvironment
^ (PRPage named: 'environment')
addChild: ((PRFile named: 'style.css')
filename: 'style.css';
mimetype: 'text/css';
contents: '/* blueprint patches */........
To reproduce:
1 Download the one-click 3.0a5 release from
seaside.st2 Select utf-8 encoding on the WAComancheAdapter (right click within Seaside Control Panel -> Encoding...)
3 Browse to localhost:8080/pier
There seem to be a number of places where a fix could be made, but I'm not sure which (if any) would be the most appropriate:
* MAFileModelHandler>>handleFiltered - the GRPharoUtf8CodecStream response stream is created, without utf-8 encoding, a GRNullCodecStream is created instead.
* PRFile>>contents: perhaps PRFile shouldn't always convert the contents to a ByteArray
* Perhaps ByteArray should implement isByteString.
Any thoughts?
Nick
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki