【发布时间】:2011-02-01 19:17:52
【问题描述】:
我有兴趣使用 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 格式的文件。通过更改文件格式解决。
【问题讨论】:
-
请添加具体的代码和错误信息/stacktraces。
-
“代码”只是在视图中添加一个希伯来语单词。我在视图中添加了错误代码。
-
这听起来像是文件编码问题。你用的是什么编辑器?
标签: ruby-on-rails-3 hebrew right-to-left