阅读背景:

utf8数据在mysql中看起来很好,但是在rails中却被破坏了

来源:互联网 

I'm setting a rails environment up for one of my colleagues, who's using a mac (in case that's relevant). I've pulled the data down from our live mysql database and made a local development database with that data. If i open the mysql console, and look at the data for a record which has extended charset characters in its name field, then it looks fine. However, in the rails console (and in a rails-generated web page) the encoding is broken: an endash is replaced by "—" for example.I'm setting a rails environment up for one of m




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: