What have you found for these years?

2009-11-21

rails 2.3.4 encoding bug

Encoding error in Ruby1.9 for templates

用 Hector E. Gomez Morales 的 patch,
不過改成這樣比較好:

source.force_encoding(Encoding.default_external) if
'1.9'.respond_to?(:force_encoding)

不要寫死 utf-8, 用 default_external,
utf-8 愛好者如我,當然是全設成 utf-8, 只是不要寫死...

這樣 rails 可能就能跑在 1.9 下了吧我猜?
你看到 2.3.4 都多久了,還有這麼嚴重的問題...

0 retries:

Post a Comment

Note: Only a member of this blog may post a comment.



All texts are licensed under CC Attribution 3.0