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
Ruby 1.9 character encoding changes #188
Comments
In my case i was getting the following error:
And solved the problem declaring the following locale in my shell: export LC_ALL=en_US.UTF-8 |
Just got bitten by this after recently switching to 1.9 as my default Ruby. Thanks for the patch. |
I think I'm running into this problem, but only when running the jekyll command via SSH, not if I run jekyll directly on the host machine. Jekyll also runs without errors on the client machine — it's only over SSH that I encounter this problem:
I haven't tried lmmendes' fix yet (sorry, how/where do I declare those locales, and just on the host machine, or both?) but does anybody have any ideas why SSH is creating these problems? Thanks. |
Put these two lines to .bashrc:
|
Thanks Kwpolska. I ended up having to put those lines in my .profile, but they did the trick. |
I just got the similar error. Thanks. |
@dengwh, for Windows set the same environment variables. In your cmd.exe, type
|
I'm trying to get a post-receive hook to work on Arch Linux with Ruby 1.9 and I'm getting this ASCII error. I've tried adding the UTF-8 settings to my .profile, but I'm still getting the error. I assume the git hook doesn't use my .profile, though. Any further suggestions? EDIT: I just applied to patch to this file and it works fine now. Duh... and Thank you! |
This fix worked for me, whereas the others didn't: http://stackoverflow.com/a/8274677/1303499 |
I had a text file with a |
Merged in #718. |
Liquid Exception: invalid byte sequence in UTF-8 in index.html |
With Ruby 1.8, incorrect UTF-8 encoded characters are silently ignored. If you have a post with incorrect UTF-8 characters in the content body, they will show up in your rendered page as question marks (unknown characters).
A user upgrading from Ruby 1.8 to Ruby 1.9 who's site seemed to be working fine would get a weird error when trying to render their site (assuming it had incorrectly encoded UTF-8 characters):
This doesn't really help the user fix the problem post. This commit will at least display the problem post so that the user knows what needs to be fixed for the site to render successfully.
This is mainly an issue of how Ruby decides to handle String encodings by default. You can read more about it here: http://blog.grayproductions.net/articles/ruby_19s_string
The text was updated successfully, but these errors were encountered: