Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jekyll regeneration failed with unicode posts

Tags:

ruby

jekyll

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

like image 546
Vladimir Starkov Avatar asked Jun 30 '26 07:06

Vladimir Starkov


2 Answers

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.

like image 84
472 Avatar answered Jul 05 '26 15:07

472


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

like image 28
Vladimir Starkov Avatar answered Jul 05 '26 15:07

Vladimir Starkov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!