This project is archived and is in readonly mode.
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
-
Repository July 2nd, 2009 @ 12:22 AM
- State changed from new to resolved
(from [49824e8ad64be17d6b8a0356bc30342aecc72216]) JSON.escape returns UTF-8 strings
[#2849 state:resolved] http://github.com/rails/rails/commit/49824e8ad64be17d6b8a0356bc3034...
-
Repository July 2nd, 2009 @ 12:27 AM
(from [5217c16b094a07919348b52aa164ca2fd26b5d5e]) JSON.escape returns UTF-8 strings
[#2849 state:resolved] http://github.com/rails/rails/commit/5217c16b094a07919348b52aa164ca...
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
- Nobody is watching this ticket.
Attachments
Tags
Referenced by
- 2849 Encode JSON in UTF-8 instead of BINARY [#2849 state:resolved] http://github.com/rails/rails/com...
- 2849 Encode JSON in UTF-8 instead of BINARY [#2849 state:resolved] http://github.com/rails/rails/com...