[Pharo-dev] Bug in ZnUTF8Encoder

Igor Stasenko siguctua at gmail.com
Wed Apr 2 07:18:15 EDT 2014


nextPut: character toStream: stream
...
code < 65535 ifTrue: [
...

should be

code < 65536 ifTrue: [

because 3-byte encoding can fit 16 bits, which is range
0...65535
but not
0...65534

-- 
Best regards,
Igor Stasenko.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20140402/d2689da2/attachment-0002.html>


More information about the Pharo-dev mailing list