Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UTF-8 issues? #429

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

UTF-8 issues? #429

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

Comments

@maul-esel
Copy link

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

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

@alexandru
Copy link

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).

@maul-esel
Copy link
Author

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 :(

@alexandru
Copy link

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?

@maul-esel
Copy link
Author

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.

@alexandru
Copy link

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

@maul-esel
Copy link
Author

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

@isaacsanders
Copy link

You should probably add the meta tag for charset.

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

@maul-esel
Copy link
Author

@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.

@isaacsanders
Copy link

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:
#429 (comment)

Sincerely,

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

@edipofederle
Copy link

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
Copy link

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
Copy link

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

@jekyll jekyll 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.
Projects
None yet
Development

No branches or pull requests

7 participants