【发布时间】:2013-04-15 14:56:47
【问题描述】:
我在 Ruby on Rails 中使用了 AngularJS。我使用了带有自定义符号的货币过滤器。
<span>{{value|currency:'¥'}}<span>
过滤器在开发环境中运行良好。
¥1,000.00
但是,在生产模式下运行时,货币符号会转换为特殊字符。
�1,000.00
PS:我在所有文件中都使用了 UTF-8 编码。在production.rb中尝试了以下
config.assets.js_compressor = Sprockets::LazyCompressor.new { Uglifier.new(:mangle => false) }
知道如何解决这个问题吗?谢谢各位
【问题讨论】:
标签: ruby-on-rails filter angularjs