Ruby on Rails - £ sign troubles

前端 未结 3 1160
囚心锁ツ
囚心锁ツ 2021-01-15 14:26

I have <%= f.label :cost, \"Cost (£/m)\" %> in a form. When the form is rendered the \"£\" sign comes out as �. I am using utf-8 encoding. Why is this ha

3条回答
  •  广开言路
    2021-01-15 14:59

    Suggestion from my experience) :

    1. verify that your file erb is saved in utf-8
    2. I recomend you to use number_to_currency method

提交回复
热议问题