Categories extracted from the Front Matter of the same post file should always be inferred by YAML as having the same encoding. All my post files are UTF-8, but some categories are read by YAML as ASCII-8BIT, and this crashes site generation.
This is the error:
Configuration from /home/spectra/work/nardol_blog/_config.yml
Building site: . -> ./_site
/usr/local/rvm/gems/ruby-1.9.2-p0/gems/jekyll-0.7.0/lib/jekyll/post.rb:129:in `join': incompatible character encodings: UTF-8 and ASCII-8BIT (Encoding::CompatibilityError)
from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/jekyll-0.7.0/lib/jekyll/post.rb:129:in `url'
from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/jekyll-0.7.0/lib/jekyll/post.rb:207:in `to_liquid'
from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/jekyll-0.7.0/lib/jekyll/post.rb:175:in `render'
from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/jekyll-0.7.0/lib/jekyll/site.rb:135:in `block in render'
from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/jekyll-0.7.0/lib/jekyll/site.rb:134:in `each'
from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/jekyll-0.7.0/lib/jekyll/site.rb:134:in `render'
from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/jekyll-0.7.0/lib/jekyll/site.rb:77:in `process'
from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/jekyll-0.7.0/bin/jekyll:150:in `'
from /usr/local/rvm/gems/ruby-1.9.2-p0/bin/jekyll:19:in `load'
from /usr/local/rvm/gems/ruby-1.9.2-p0/bin/jekyll:19:in `'
It seems to have a common root with issue 188, but that issue deals with encoding problems in the content. Here I am talking about the Front Matter... I also think this stackoverflow question points to the same issue.
Nothing changed. I ended-up patching convertible.rb before the end of funcion read_yaml as a work-around:
data['categories'].each do |category|
... really ugly, I know. For now it works. It should be fixed in Ruby's YAML, IMHO.
Hey @spectra, did you ever get this fixed up?
@parkr, As I wrote back then, I used force_encoding. Anyway, after some time, I ended up not using jekyll at all, so I never went beyond that ugly fix.
This'll be fixed in YAML and I can't reproduce the error.