octopress / genesis-theme

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

Run `chcp 65001` when building #13

Closed TiTi closed 9 years ago

TiTi commented 9 years ago

Hi,

On Windows, I got the following error when executing jekyll build: Liquid Exception: incompatible character encodings: CP850 and UTF-8 in feed-articles.xml

It works if I execute chcp 65001 before, as mentionned in http://jekyll-windows.juthilo.com/5-running-jekyll/

With Octopress 2, the command was automatically executed on Windows when doing rake generate:

C:\Users\TiTi\Desktop\octo2>rake generate
## Set the codepage to 65001 for Windows machines
## Generating Site with Jekyll
    write source/stylesheets/screen.css
Configuration file: C:/Users/TiTi/Desktop/octopress/_config.yml
            Source: source
       Destination: public
      Generating...
                    done.
 Auto-regeneration: disabled. Use --watch to enable.

C:\Users\TiTi\Desktop\octo2>

Could it be possible to also execute this command with Octopress 3, when using jekyll build?

I suppose this is more a Jekyll issue, but it could be nice to have that included rather than using a .bat to build the site...

maiertech commented 9 years ago

I have the same problem on Windows only it says its codepage IBM437.

parkr commented 9 years ago

I don't think it's something we'll do automatically, but that's eventually up to @imathis. I'd recommend setting up Vagrant with a Linux OS. Ruby in general just isn't super great on Windows, so using a Linux OS for your development is highly recommended. I'll recommend the latest version of Ubuntu to get you started. Vagrant and VirtualBox are free and are easy to set up. :)

imathis commented 9 years ago

Nope we're staying out of the rake task business. If you need to do something like that, I suggest you create your own Rakefile to automate it.