UTF-8 issues? #429

Closed
maul-esel opened this Issue Oct 30, 2011 · 12 comments

Comments

Projects
None yet
7 participants
Contributor

maul-esel commented Oct 30, 2011

Could it be that Jekyll has issues with UTF-8?

Or is this a problem with Github Pages / the markdown engine / in my layout ?

Looking at this file here: https://raw.github.com/maul-esel/ahkbook/gh-pages/en/_posts/2011-10-30-What-Version-To-Choose.markdown

Off the top of my head, try including any complex value within double-quotes, as otherwise you may break the YAML parsing being done. So try something like this:

---
title: "What AutoHotkey version should I choose?"
layout: default
permalink: "/en/What-Version-To-Choose.html"
---

If that doesn't work, just wanted to say that UTF-8 pages work fine for me in Jekyll 0.11. Here's a sample: http://alexn.org/blog/2011/10/25/a-fi-parinte-1.html -> https://github.com/alexandru/alexn.org/blob/master/_posts/2011-10-25-a-fi-parinte-1.html

If my advice doesn't work, tell me and I'll try building your website locally (right now I don't have the time).

Contributor

maul-esel commented Oct 31, 2011

Hi, thanks for your tip.
I might be a fool, but it seems it doesn't work at all: it just displays the 404 page (I tried with both single and double quotes).

If you could try to build it locally, that would be very nice. I tried to do so, but I didn't even succeed to install Jekyll :(

Ok, I'll get back to you.

But you should install Jekyll. Why haven't you? Are you on Windows or something?
"gem install jekyll" does not work?

Contributor

maul-esel commented Oct 31, 2011

I'm on Windows, but I'm trying to do it in a VM with Ubuntu and get

ERROR:  While executing gem ... (Errno::EACCES)
Permission denied - /var/lib/gems

all the time. I'm very new to Ubuntu, so I'll try some more things.

Right, that's because you're trying to install these gems globally.
Do "sudo gem install jekyll".

Contributor

maul-esel commented Oct 31, 2011

It's installing it now, thanks! That will also save me some time because I can see what it looks like before pushing.

You should probably add the meta tag for charset.

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
Contributor

maul-esel commented Nov 2, 2011

@isaacsanders: I don't think this fixes the entire thing:

  • The first problem is that Jekyll seems not to recognize the YAML properly - it creates the page in 2011/10/30 and ignores the permalink setting.
  • The other one is that the signs are not displayed correctly. This can be fixed by your tip, thanks!

The other problem seems to have been caused by some strange special character between the dashes. Trying it again from Ubuntu makes it work!

So this "issue" has been solved.

maul-esel closed this Nov 2, 2011

Cool! Glad I could help.

On Wed, Nov 2, 2011 at 9:12 AM, maul-esel <
reply@reply.github.com>wrote:

@isaacsanders: I don't think this fixes the entire thing:

  • The first problem is that Jekyll seems not to recognize the YAML
    properly - it creates the page in 2011/10/30 and ignores the permalink
    setting.
  • The other one is that the signs are not displayed correctly. This can be
    fixed by your tip, thanks!

The other problem seems to have been caused by some strange special
character between the dashes. Trying it again from Ubuntu makes it work!

So this "issue" has been solved.

Reply to this email directly or view it on GitHub:
mojombo#429 (comment)

Sincerely,

Isaac Sanders
Section C-4B Vice Chief, Order of the Arrow
Vice Chief of Administration, Tecumseh #65
Eagle Scout

for me things like this "você" or "começo" don't works, it is replaced by "voce" and "comeco". This happen in a new blog that i created just now sugin jekyll bootsrap, any suggestion? Thanks

n0wa11 commented Dec 22, 2012

Sorry for jumping into the topic late.

I am trying to catch the conclusion.

I understand, in 你好.md,

---
title: "你好"
layout: default
permalink: "/hello"
---

is a working solution.

Just want to want to confirm Jekyll doesn't handle UTF-8 title/URL conversion by default, as my tests show.

Is there a plug-in that handles the conversion?

PS: Jekyll is not friendly where there are symbols like + in the file name.

guneysus commented Nov 2, 2013

I am also have trouble with UTF-8, let me explain how i solved:

  1. Save the 2000-1-1-My-Post.md in UTF-8 Without BOM
    NOT UTF-8 !!!
  2. Do not use unicode characters (and spaces) in the post file name
  3. Encode Title in the post meta info to html entities, like
    Ahmed &#350;eref
---
layout: post
title: Ahmed &#350;eref
---

Here the text, you can use any unicode text here.
  ¥ · £ · € · $ · ¢ · ₡ · ₢ · ₣ · ₤ · ₥ · ₦ · ₧ · ₨ · ₩ · ₪ · ₫ · ₭ · ₮ · ₯ · ₹

Note: I used the python snippet from Convert UTF-8 with BOM to UTF-8 with no BOM in Python to remove BOM from my unicode files.

And used to encode unicode titles to html entities Convert HTML entities to Unicode and vice versa

jekyllbot locked and limited conversation to collaborators Feb 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.