开发者

Mysql2 gem not working with UTF8

I've switched my Rails app from the Mysql gem to Mysql2, but now UTF8 fields aren't working; specifically, the character á is coming out as á. The character appears correctly in the MySQL console, when using PHP, and when using the Mysql gem. I have set encoding: utf8 in my database.yml file.

Potentially helpful

When I inspect it character-for-character in the console, I see that á is 开发者_如何学运维"\303\241" (using the Mysql gem) but á is "\303\203\302\241" (using the Mysql2 gem).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜