我有兴趣使用 Ruby on Rails 3 创建一个希伯来语网站。问题是当我将希伯来语放入我的视图时,我被告知它不受支持,我应该添加 UTF-8。
我已经为此工作了一段时间,但我似乎无法找到如何做到这一点。我也在使用 Sqlite3,我也想在那里保存希伯来语字符串。
我将如何实现这一目标?
我得到的错误代码是:
Your template was not saved as valid UTF-8. Please either specify UTF-8 as the encoding for your template in your text editor, or mark the template with its encoding by inserting the following as the first line of the template:...
编辑:
问题是我正在使用 Notepad++,尽管它们是 UTF-8 格式的文件,但它没有以 UTF-8 格式保存我的文件。通过更改文件格式解决。