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 Support Again #290
Comments
Hm I can't reproduce this.
Am I missing something? |
So weird. That code works for me as well. The only place it is breaking is on Heroku. When I run your code locally or on the Heroku console, it work as well. However, within the app itself (which is considerably more complex) it breaks. Obviously not a Liquid issue. Thanks for looking into it. |
I have the same issue with ruby 2.1.1, rails 4.0.4 and liquid master/3.0.0. Did you solve your problem? What was the issue there? |
That one was a bear to figure out. I was using liquid to generate emails. It turned out to be a problem with the mail gem. When I created a friendly email address, the mail gem would mutate the argument and convert it from UTF-8 to ASCII-8BIT. Then liquid would get the mutated argument breaking the rendering process. Here's the offending code that I changed to fix it: Old:
New:
See details here: mikel/mail#621. It is currently still an open issue. |
thanks for your reply. I'm rendering HTML templates with liquid tags that are stored in a database. If i am running my code on the rails console everything is fine, but in the browser it's giving me that exception. Usually when i have öäü's or so in the text. That happened after a rails 3.2 -> 4 migraton. I'll try your advice with dup and give feedback! |
It looks like both #185 and #192 were both reverted so I'm opening this issue up again. I'm running Ruby 2.0 and Liquid 2.6.0.
I have a drop that includes:
I get the following error on rendering the template:
When I examine the object after render it looks like this:
If I test the encoding of the string beforehand it is UTF-8 yet after the render fails it is ASCII-8BIT. Any ideas?
The text was updated successfully, but these errors were encountered: