[英]Rails view error “invalid byte sequence in US-ASCII” error after upgrading Ruby to 1.9.2
Running Rails 2.3.9 and just upgraded to Ruby 1.9.2p0. 运行Rails 2.3.9,并刚刚升级到Ruby 1.9.2p0。 I have been putting:
我一直在说:
# encoding: utf-8
in a bunch of my .rb files where ever "£" character is used, and this seems to be working. 在我的.rb文件中使用“£”字符的地方,这似乎起作用了。 But i just got my first view error:
但我刚收到第一个错误:
invalid byte sequence in US-ASCI
for this line of code: 对于这一行代码:
<%= number_to_currency(product.price, :unit => "£", :precision => 0) %>
I don't think its a coincidence that the "£" character is involved again. 我认为再次涉及“£”字符并不是巧合。 Any ideas on how to solve this please?
有关如何解决这个问题的任何想法吗?
Thanks 谢谢
我降级到Ruby版本1.8.7
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.