0

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?

Rails beginner
  • 14,321
  • 35
  • 137
  • 257

1 Answers1

0

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.

Community
  • 1
  • 1
Malte
  • 1,200
  • 10
  • 18