octopress / genesis-theme

A Jekyll theme build on Octopress Ink
MIT License
24 stars 16 forks source link

Incompatible character encodings: UTF-8 and IBM437 #30

Closed busches closed 9 years ago

busches commented 9 years ago

I created a new Jekyll site, added the gem to the config file and then set index.html to theme: theme:page and ran jekyll s, that works correctly. Then I updated the default post to theme: theme:post and received the following error:

  Liquid Exception: incompatible character encodings: UTF-8 and IBM437 in _layouts/default.html
jekyll 2.5.3 | Error:  incompatible character encodings: UTF-8 and IBM437

I found this issue: https://github.com/imathis/octopress/issues/413 and added the suggested encoding: UTF-8 to the _config.yml but to no avail.

Opening up includes\post_meta.html I see the encoding is UTF-8 w/o BOM, saving the post file with that encoding then results in the following error:

Error: undefined method `titlecase!' for nil:NilClass
Error: Run jekyll build --trace for more information.

Any ideas how to get the posts to render with the theme?

This is on Windows 7x64

Bundle list:

λ bundle list                           
DL is deprecated, please use Fiddle     
Gems included by the bundle:            
  * autoprefixer-rails (2.2.0.20140804) 
  * blankslate (2.1.2.4)                
  * bundler (1.9.9)                     
  * celluloid (0.16.0)                  
  * classifier-reborn (2.0.3)           
  * coffee-script (2.4.1)               
  * coffee-script-source (1.9.1.1)      
  * colorator (0.1)                     
  * execjs (2.5.2)                      
  * fast-stemmer (1.0.2)                
  * ffi (1.9.8)                         
  * hitimes (1.2.2)                     
  * jekyll (2.5.3)                      
  * jekyll-coffeescript (1.0.1)         
  * jekyll-gist (1.2.1)                 
  * jekyll-paginate (1.1.0)             
  * jekyll-sass-converter (1.3.0)       
  * jekyll-watch (1.2.1)                
  * json (1.8.2)                        
  * kramdown (1.7.0)                    
  * liquid (2.6.2)                      
  * listen (2.10.0)                     
  * mercenary (0.3.5)                   
  * octopress (3.0.6)                   
  * octopress-autoprefixer (1.0.1)      
  * octopress-date-format (3.0.3)       
  * octopress-deploy (1.2.4)            
  * octopress-escape-code (2.0.6)       
  * octopress-filters (1.3.3)           
  * octopress-hooks (2.6.1)             
  * octopress-include-tag (1.1.3)       
  * octopress-ink (1.1.4)               
  * octopress-solarized (1.1.2)         
  * octopress-tag-helpers (1.0.8)       
  * parslet (1.5.0)                     
  * posix-spawn (0.3.11)                
  * pygments.rb (0.6.3)                 
  * rb-fsevent (0.9.5)                  
  * rb-inotify (0.9.5)                  
  * redcarpet (3.2.3)                   
  * rubypants-unicode (0.2.5)           
  * safe_yaml (1.0.4)                   
  * sass (3.4.14)                       
  * timers (4.0.1)                      
  * titlecase (0.1.1)                   
  * toml (0.1.2)                        
  * uglifier (2.7.1)                    
  * wdm (0.1.0)                         
  * yajl-ruby (1.2.1)                   
busches commented 9 years ago

And of course after I create this issue, the next thing I read, http://joseoncode.com/2011/11/27/solving-utf-problem-with-jekyll-on-windows/, suggests setting the following command in the terminal chcp 65001 and it works! May be worthwhile to add it to the FAQ if you create one.