Closed neerfri closed 12 years ago
Thanks for the patch! Can you provide some test cases to make sure this doesn't break UTF8 in future commits?
Not so easy. As far as I know this will only happen in versions of ruby where UTF8 strings are mishandled.
Is there a way to test against this ?
On Wed, Feb 8, 2012 at 9:34 PM, Garrett Bjerkhoel < reply@reply.github.com
wrote:
Thanks for the patch! Can you provide some test cases to make sure this doesn't break UTF8 in future commits?
Reply to this email directly or view it on GitHub: https://github.com/dewski/json_builder/pull/18#issuecomment-3874333
This has been fixed by 1cb778b0ef25ae179ea5c92685bc4bafc8771d3d
I've had problems with UTF8 text in json responses. The problem is rooted in ruby's String#inspect that splices the last bytes of the string due to incorrect count of bytes. String#to_json handles this well.