I’m trying to setup my charset in a html view in a RoR application.
I configured already the charset by meta equiv tag:
**meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″ **
It didn’t work, so i tried to change my .htaccess (its a RoR application running under apache) but here is my problem. Normally i could use the following statement:
AddType ‘text/html; charset=ISO-8859-1’ html
But the problem is that, as everybody knows, RoR has no “file extension” and that breaks this .htaccess solution. Anybody knows another way to set a charset in a layout template or view ?
Have your Rails application set the
Content-typeheader, and then you won’t need to worry about what Apache is doing.You may also want to add
to the page itself, so that if someone saves it to disk, it will load with the correct charset.