[英]cyrillic character escaping problem on RAILS JSON + EXTJS
I have a problem with the escaping of the cyrillic characters in the rails JSON output: 我在rails JSON输出中转写西里尔字母时遇到问题:
{"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 它们在EXTJS中未正确解码,并导致grid为 2
The page encoding is UTF8. 页面编码为UTF8。 Mysql and Rails configs are set to UTF8 Mysql和Rails配置设置为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 - "\�\�\�\�\�\�"). 我所看到的是,您的字符已经在json输出中失真了(如果仔细看,它们都是一样的-“ \\ ufffd \\ ufffd \\ ufffd \\ ufffd \\ ufffd \\ ufffd”)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.