isaiah / transit-erlang

transit format for erlang
MIT License
43 stars 12 forks source link

Transit-erlang cannot encode a specific binary string #5

Closed jlouis closed 10 years ago

jlouis commented 10 years ago

Generating the string <<239, 183, 144>> fails the isomorphism test. This is a valid utf8 string, but it doesn't give the correct result.

.......................................................Failed! After 14536 tests.
<<240,146,183,131,242,159,136,128,239,183,147,225,187,153,241,188,144,185,240,
  151,139,142,242,170,137,181,240,167,171,167,241,151,180,172,239,128,146,240,
  187,149,152,241,138,187,129,240,190,170,173,243,159,160,132,243,167,132,188>>
Shrinking.....(5 times)
<<239,183,144>>
false
isaiah commented 10 years ago
1> jsx:decode(jsx:encode(<<239, 183, 144>>)).
<<239,191,189>>

This is also because of jsx.