由 Yard 和西班牙口音生成的文档
我正在使用 Yard 生成文档,并且我的所有评论都是用西班牙语写的。问题在于 Yard 生成的文档包含 � 而不是西班牙口音。
我使用过“yardoc”命令。 我正在使用 ruby 1.8.7 (2011-02-18 patchlevel 334) [i386-mingw32] 和 Rails 3.0.7 在 Windows 7 上运行
I'm generating documentation with Yard, and all my comments have been written in Spanish. The problem is that the documentation generated by Yard contains � instead of Spanish accents.
I've used "yardoc" command.
I'm using ruby 1.8.7 (2011-02-18 patchlevel 334) [i386-mingw32] and Rails 3.0.7
Running on Windows 7
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能您的源文件采用 ISO Latin 1 编码,而 Yard 希望它们采用 UTF-8 编码。
您可以指示 Yard 以 ISO Latin 1 而不是默认的 UTF-8 格式读取文件,但我强烈建议您将源文件重新编码为 UTF-8 文件。任何像样的文本编辑器都应该能够通过一两次点击来完成此操作。
Probably your source files are encoded in ISO Latin 1 while Yard expects them to be in UTF-8.
You could instruct Yard to read your files in ISO Latin 1 instead of the default UTF-8, but I strongly suggest you to re-encode your source files as UTF-8 files. Any decent text editor should be able to do that with one or two clicks.