I have problems when rewriting the Danish letters in view files as Æ Ø Å and I get this error in view: Your template was not saved as valid UTF-8. I have changed the configuration file to Danish, but I still get the error.
I have seen that all of the rails files are saved as ANSI.开发者_运维问答 Do I need to change all the files to UTF-8 or are there a better way?
This question may be related to yours.
Your view files' encoding may be broken. For example, there could somehow be an UTF-8 BOM left at the beginning, but the remaining file is encoded in ANSI.
- Try converting it explicitly.
- if this doesn't help try another editor and saving it there.
- Check the file contents with a hex editor to make sure no BOM is present.
Btw, if you have to convert all files from the project, you can try using a utility like iconv.
精彩评论