Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Encode JSON in UTF-8 instead of BINARY

#2849

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.

Reported by Akira Matsuda · June 29th, 2009 @ 08:52 AM

State: resolved
Milestone: 2.x
Assigned to: nobody
Importance: none