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

Markdown cannot contain not latin-1 characters #99

Closed
syohex opened this issue Feb 23, 2015 · 2 comments
Closed

Markdown cannot contain not latin-1 characters #99

syohex opened this issue Feb 23, 2015 · 2 comments
Labels

Comments

@syohex
Copy link

syohex commented Feb 23, 2015

Markdown cannot be rendered if markdown file has not latin-1 chacters(Japanese characters, emoji etc).

For example, README.md is here

% grip --version
Grip 3.1.0
% grip README.md

And I accessed http://localhost:5000 then I got following error(and stack trace)

builtins.UnicodeEncodeError

UnicodeEncodeError: 'latin-1' codec can't encode character '\u2318' in position 0: ordinal not in range(256)

How can I avoid this ? (Or is this bug ?)

Thanks for awesome tool.

@joeyespo joeyespo added the bug label Feb 24, 2015
@joeyespo
Copy link
Owner

Ah, yeah, this is indeed a bug.

I was able to take a look tonight. Seems grip wasn't actually encoding the Unicode text it read from the README before sending it off to GitHub, leaving requests to use the default encoding of ISO 8859-1 (latin-1). Just deployed a fix that encodes to UTF-8 and sets the appropriate charset.

Run a pip install --upgrade grip and let me know if this works for you.

Thanks for opening the issue, @syohex!

@syohex
Copy link
Author

syohex commented Feb 24, 2015

Thanks for quick fix.
I confirmed that this issue is fixed. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants