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 happening?
相关问题
- Question marks after images and js/css files in ra
- Using :remote => true with hover event
- Eager-loading association count with Arel (Rails 3
- How to specify memcache server to Rack::Session::M
- Why am I getting a “C compiler cannot create execu
相关文章
- Ruby using wrong version of openssl
- Right way to deploy Rails + Puma + Postgres app to
- AWS S3 in rails - how to set the s3_signature_vers
- Difference between Thread#run and Thread#wakeup?
- how to call a active record named scope with a str
- How to add a JSON column in MySQL with Rails 5 Mig
- “No explicit conversion of Symbol into String” for
- form_for wrong number of arguments in rails 4
Either send your page with UFT-8 encoding, or send the pound sign as
£
(or£
if you're sending XML rather than HTML).Are you outputting HTML? If so you need to escape the character
<%= f.label :cost, "Cost (£/m)" %>
Suggestion from my experience) :