![](/img/trans.png)
[英]Rails 2.3.5, Ruby 1.9, SQLite 3 incompatible character encodings: UTF-8 and ASCII-8BIT
[英]rails 2.3.5 with ruby 1.9.1p429 : incompatible character encodings: ASCII-8BIT and UTF-8
我尝试了utf8的ruby hack(来自: http : //gist.github.com/273741 )...,但仍然收到以下错误:ActionView :: TemplateError(不兼容的字符编码:ASCII-8BIT和UTF- 8)
对我来说奇怪的是,如果使用后动作(使用html搜索应用程序)检索的相同内容显示得很好……但是,使用get(使用html链接)则表明它们是字符不兼容!
你有什么想法吗? 是否有针对此问题的rails / ruby补丁?
谢谢,
我认为您是使用UTF-8而不是ASCII的模板编码(例如尝试)来问题com。
在Rails 3中,有一个新的配置:
# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.