首页 文章

jekyll再生失败了unicode帖子

提问于
浏览
3

我尝试使用 unicode 帖子(带有 utf-8 编码的 russian 文本)重新创建我的 jekyll 博客并且因为以下原因而无法执行此操作:

D:\Dropbox\projects\blog>jekyll
Configuration from D:/Dropbox/projects/blog/_config.yml
Building site: . -> ./_site
C:/Ruby193/lib/ruby/1.9.1/rexml/text.rb:131:in `=~': incompatible encoding regexp match (UTF-8 regexp with IBM437 string) (Encoding::Compati
bilityError)
    from C:/Ruby193/lib/ruby/1.9.1/rexml/text.rb:131:in `!~'
    from C:/Ruby193/lib/ruby/1.9.1/rexml/text.rb:131:in `check'
    …

Full error log on pastebin

我的_config.yml: (full config on pastebin)

safe:        false
auto:        false
server:      false
server_port: 4000
baseurl:    /
…

我检查了 [error installing RDoc …][heroku installation problems] ,解决方案对我没用 .

我将提供任何补充信息来解决这个问题

3 回答

  • 3

    chcp 65001 无法在我的系统上运行,然后jekyll立即返回 .

    解决此错误的一种简单方法是避免帖子和页面的文件名中包含非ASCII字符 . 如果文件内容本身不是以BOM开头,那么文件内容本身可以是UTF-8而没有问题 .

  • 5

    在运行jekyll之前,cmd中的chcp 65001每次都会帮助我 . 但我认为这不是完整的解决方案

  • 2

    使用以下修复程序:https://github.com/bradleywright/jekyll/commit/576f97e2610ef3259a3ea778537d244bc438da20

    它对我有用 . 它只是一行中的变化,因此它强制在utf-8中读取文件

相关问题