jekyll: Windows Incompatible character encodings: Windows-1252 and UTF-8, even though all files are UTF-8 (No BOM)

  • I believe this to be a bug, not a question about using Jekyll.
  • I updated to the latest Jekyll (or) if on GitHub Pages to the latest github-pages
  • I read the CONTRIBUTION file at https://jekyllrb.com/docs/contributing/

  • I am on (or have tested on) Windows 10+ (Windows issue only)

  • I was trying to build.

My Reproduction Steps

For the respository schpaper/schpaper.github.io, the build fails on Windows due to incompatable encodings. I have run many commands, including dos2unix and iconv to convert all files to utf-8. I have also tried running the build (Using bundle exec jekyll build) in Git Bash and CMD, with CMD using 'chcp 65001`, and the build still fails due to the following error:

bundle exec jekyll build
Configuration file: D:/shafe/Documents/Dev/schpaper.github.io/_config.yml
            Source: D:/shafe/Documents/Dev/schpaper.github.io
       Destination: D:/shafe/Documents/Dev/schpaper.github.io/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
  Liquid Exception: incompatible character encodings: Windows-1252 and UTF-8 in /_layouts/club.html
jekyll 3.3.0 | Error:  incompatible character encodings: Windows-1252 and UTF-8

The Output I Wanted

This build should not fail. None of the files have BOM headers, and they are all UTF-8.

/cc @jekyll/build and @jekyll/windows

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 15 (5 by maintainers)

Most upvoted comments

thats a bug, you need to delete _site folder evrytime befor running jekyll, it’s borring but it works!