简体   繁体   中英

cyrillic character escaping problem on RAILS JSON + EXTJS

I have a problem with the escaping of the cyrillic characters in the rails JSON output:

{"success":true,"total":"2","offices":[{"address":"addr","created_at":"2011-06-03T11:55:09Z","description":"desc","id":1,"name":"Office 1","published":true,"updated_at":"2011-06-05T13:48:35Z"},{"address":"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd","created_at":"2011-06-03T12:32:19Z","description":"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd","id":2,"name":"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd 2","published":null,"updated_at":"2011-06-05T13:49:51Z"}]}

They are not properly decoded in EXTJS and result in grid is 2

The page encoding is UTF8. Mysql and Rails configs are set to UTF8

Any ideas ?

Any code? All I see is that your characters already distorted in json output (they're all the same, if you take a closer look - "\�\�\�\�\�\�").

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM