Utf 8 windows8上的Jekyll出现UTF8错误

Utf 8 windows8上的Jekyll出现UTF8错误,utf-8,jekyll,Utf 8,Jekyll,谢谢!我在windows9上安装了jekyll,但当我在中文博客上服务jekyll时,它显示utf8错误,但当我在纯英文博客上服务jekyll时,它工作了! 这是我的截图 $ jekyll serve Configuration file: e:/Github/rifyll-master/rifyll-master/_config.yml Source: e:/Github/rifyll-master/rifyll-master Destination: e:/Github

谢谢!我在windows9上安装了jekyll,但当我在中文博客上服务jekyll时,它显示utf8错误,但当我在纯英文博客上服务jekyll时,它工作了! 这是我的截图

$ jekyll serve
Configuration file: e:/Github/rifyll-master/rifyll-master/_config.yml
        Source: e:/Github/rifyll-master/rifyll-master
   Destination: e:/Github/rifyll-master/rifyll-master/_site
  Generating...
                done.
 Please add the following to your Gemfile to avoid polling for changes:
 gem 'wdm', '>= 0.1.0' if Gem.win_platform?
 Auto-regeneration: enabled for 'e:/Github/rifyll-master/rifyll-master'
 Configuration file: e:/Github/rifyll-master/rifyll-master/_config.yml
 Server address: http://0.0.0.0:4000/
 Server running... press ctrl-c to stop.
Zepu@ZEPUXI/E/Github/utf8(主)

这是一个英文博客截图

$ jekyll serve
Configuration file: e:/Github/rifyll-master/rifyll-master/_config.yml
        Source: e:/Github/rifyll-master/rifyll-master
   Destination: e:/Github/rifyll-master/rifyll-master/_site
  Generating...
                done.
 Please add the following to your Gemfile to avoid polling for changes:
 gem 'wdm', '>= 0.1.0' if Gem.win_platform?
 Auto-regeneration: enabled for 'e:/Github/rifyll-master/rifyll-master'
 Configuration file: e:/Github/rifyll-master/rifyll-master/_config.yml
 Server address: http://0.0.0.0:4000/
 Server running... press ctrl-c to stop.
所以我的中文博客_config.yml在这里:

encoding: UTF-8

# Dependencies
markdown:            rdiscount
highlighter:         pygments


# Permalinks
#
# Use of `relative_permalinks` ensures post links from the index work
permalink:           pretty
relative_permalinks: true

我怎样才能解决这个问题?谢谢

你能检查一下你的windows.md上的文件
e:/Github/utf8/\u posts/2015-04-11-jekyll\u是否没有
BOM

  • 进入文本编辑器,我们的IDE为文件编码设置了一个漏洞。是 务必选择
    utf-8
    no-BOM
    (记事本++做得很好)
  • 保存您的文档
  • Jekyll服务——跟踪

  • 我使用的ruby版本是2.0.0