3

I try to regerate my jekyll blog with unicode post (russian text with utf-8 encoding) and cannot to do it because of:

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

My _config.yml: (full config on pastebin)

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

I checked [error installing RDoc …] and [heroku installation problems] and solutions was not helpful for me.

I will provide any addition information to solve this problem

Community
  • 1
  • 1
Vladimir Starkov
  • 19,264
  • 8
  • 60
  • 114

3 Answers3

5

chcp 65001 did not work on my system, then jekyll returns immediately.

A simple way to work around this error is to avoid non ASCII characters in file names of the posts and pages. The file content itself can be UTF-8 without problem, if it does not start with a BOM.

472
  • 51
  • 1
  • 2
3

chcp 65001 in cmd helps me everytime before running jekyll. But I think it is not full solution

Vladimir Starkov
  • 19,264
  • 8
  • 60
  • 114
2

Use the following fix: https://github.com/bradleywright/jekyll/commit/576f97e2610ef3259a3ea778537d244bc438da20

It worked for me. It is just a change in a line so that it forces files to be read in utf-8

fizban
  • 21
  • 1