首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >windows8上的Jekyll有UTF8错误

windows8上的Jekyll有UTF8错误
EN

Stack Overflow用户
提问于 2015-04-30 16:22:19
回答 1查看 589关注 0票数 0

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

Zepu@ZEPUXI /E/Github/utf8 (master)

代码语言:javascript
运行
复制
$ jekyll serve

Configuration file: e:/Github/utf8/_config.yml

        Source: e:/Github/utf8
   Destination: e:/Github/utf8/_site
   Generating...
   Error reading file e:/Github/utf8/_posts/2015-04-11-jekyll_on_windows.md: invalid 
  byte sequence in UTF-8
  jekyll 2.4.0 | Error:  invalid byte sequence in UTF-8

这是一个英文博客截图

代码语言:javascript
运行
复制
$ 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在这里:

代码语言:javascript
运行
复制
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

我该怎么解决这个问题呢?谢谢!

EN

回答 1

Stack Overflow用户

发布于 2015-04-30 21:45:47

您能检查一下您的文件e:/Github/utf8/_posts/2015-04-11-jekyll_on_windows.md没有BOM

  1. Go在你的文本编辑器中,我们的集成开发环境为文件编码设置了一个锁。确保选择utf-8no BOM (记事本++在这方面做得很好)。
  2. 保存您的记事本
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29962610

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档