This project is archived and is in readonly mode.

#2849 ✓resolved
Akira Matsuda

Encode JSON in UTF-8 instead of BINARY

Reported by Akira Matsuda | June 29th, 2009 @ 08:52 AM | in 2.x

Since default internal and external encodings are set to UTF-8 now (IMO, this is quite a good decision), JSON encoding doesn't have to be BINARY here.

And, String#encode! is enough for transcoding here because every JSON text is expected to be encoded in Unicode according to the JSON RFC.

Attached a patch.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Referenced by

Pages