Reputation: 751
i have been working on jekyll on my personal website and for my blogs, i have come across a problem with UTF-8 encoding.
It works perfectly on my local machine but it doesn't work well in production. https://github.com/freedomgw/thehacklife/blob/gh-pages/_posts/2013-12-14-the-power-of-ajax.md
This is what it actually looks like on live.. http://thehacklife.com/posts/the-power-of-ajax/
I am just not entirely sure how to fix this on github pages... since github are the ones hosting the site. Also, I am using sublime and I am saving it in UTF-8 encoding in markdown format.
Any suggestions are appreciated
Upvotes: 10
Views: 5236
Reputation: 30815
I had the same issue with new posts (auto-converted old ones worked fine, though). The resolution was to add
layout: post
inside the post.markdown file; example:
---
title: 'My title'
layout: post
---
page content
This will automatically add the UTF-8 charset header mentioned in the other answer / comment.
Upvotes: 0
Reputation: 11643
I had the same issue. My apostrophes were showing up as ’ .
The solution is to declare the encoding explicitly with <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
Upvotes: 16