![]() | 1 sparanoid 2012-01-24 20:40:49 +08:00 报错内容?我只用 Jekyll,没出现过这个问题 |
![]() | 2 justend OP @sparanoid 提示信息如下,谢谢回复 C:\Sites\octopress>bundle exec rake generate ## Generating Site with Jekyll unchanged sass/screen.scss Configuration from C:/Sites/octopress/_config.yml Building site: source -> public C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/jekyll-0.11.0/lib/jekyll/co nvertible.rb:29:in `read_yaml': invalid byte sequence in GBK (ArgumentError) from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/jekyll-0.11.0/ lib/jekyll/post.rb:39:in `initialize' from C:/Sites/octopress/plugins/preview_unpublished.rb:23:in `new' from C:/Sites/octopress/plugins/preview_unpublished.rb:23:in `block in r ead_posts' from C:/Sites/octopress/plugins/preview_unpublished.rb:21:in `each' from C:/Sites/octopress/plugins/preview_unpublished.rb:21:in `read_posts ' from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/jekyll-0.11.0/ lib/jekyll/site.rb:128:in `read_directories' from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/jekyll-0.11.0/ lib/jekyll/site.rb:98:in `read' from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/jekyll-0.11.0/ lib/jekyll/site.rb:38:in `process' from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/jekyll-0.11.0/ bin/jekyll:250:in `<top (required)>' from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/bin/jekyll:19:in `l oad' from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/bin/jekyll:19:in `< main>' |
![]() | 3 jjgod 2012-01-24 20:59:36 +08:00 "invalid byte sequence in GBK" 你应该检查程序为什么认为你的内容是 GBK,比如是不是某个配置的问题。 |
![]() | 4 justend OP 没有配置过任何东西,git clone最新的代码后,只是扔个post文件,然后在文件中写几个中文就出这问题了 |
![]() | 9 dofine 2012-01-24 21:53:42 +08:00 via Android 前几天也遇到这个问题,确实是通过在 ~/.bashrc 里 export LC_ALL 和 LANG 搞定的,win7 & mingw |
![]() | 10 bcxx 2012-01-24 22:06:41 +08:00 直接用 github page 的 jekyll, 没遇到任何中文问题。 尝试将 _config.yml 编码改为 utf-8? |
![]() | 11 justend OP 我用mac上的文本编辑器编辑后写中文一切ok... 暂时就只能用mac写了 -_- 用windows的编辑器就不行,试过editplus,gedit,notepad plus 等,转换utf-8格式也是不行。 |
![]() | 13 ywjno 2012-01-25 12:33:31 +08:00 octopress的话,请把生成的.markdown文件编码给改成”UTF-8无BOM格式” |
![]() | 14 amycs 2012-01-30 15:25:54 +08:00 我也遇到这个问题。。jekyll 没有用 octopress。。win 下面怎么转换/改配置 都不行 (-) |
![]() | 15 amycs 2012-01-31 14:32:25 +08:00 我的问题解决了 self.cOntent= File.read(File.join(base, name), :encoding => "utf-8") https://github.com/imathis/octopress/issues/232 |
![]() | 16 moistrot 2012-03-08 09:43:08 +08:00 windows写就是悲剧。麻烦的很。还是用mac或者linux写起来舒服 |
![]() | 17 chendeshen 2012-05-04 17:51:29 +08:00 把全部文件都用utf-8保存,解决所有问题,亲测有效。 |
![]() | 18 9hills 2012-05-04 17:59:33 +08:00 直接用cygwin吧。 |
![]() | 19 joshualeung 2012-05-04 22:54:58 +08:00 1,markdown文件如果出现了中文请另存为UTF-8格式且去掉BOM头。 2, yaml的冒号后要有空格。 3, 把设置环境变量里的zh_CN改成en_US 再有问题我也不知道了。 |
20 sampeng 2012-05-04 23:07:24 +08:00 windows的悲剧。。。。这种玩意就是给类linux系统用的。。。windows很憋屈的 |
![]() | 21 Banana_Co 2012-11-05 22:15:07 +08:00 以上 @amycs , :encoding => "utf-8" 中的 "utf-8" 应该为 'utf-8' 单引号,亲测通过。 |
![]() | 22 AlfredZhao 2012-11-09 16:52:23 +08:00 看来还是用Mac写吧,在公司就老老实实写代码,写博客也算私活,哈哈哈 |
23 mytharcher 2012-11-09 17:22:29 +08:00 可以用<prose.io>写 |
![]() | 24 gdm 2014-01-08 14:57:41 +08:00 jekyll 的话,本地根本不用装啊,装个 git 就行了, push 到 github 他会自动编译 |