This project is archived and is in readonly mode.
Make utf8 partial rendering from within a content_for work in ruby1.9
Reported by Johan Sørensen | February 16th, 2009 @ 01:12 PM | in 3.x
rendering utf8 content from a partial being rendered in a content_for(:foo) block fails on Ruby 1.9, because of encoding mismatch (ASCII_8BIT vs UTF_8).
Comments and changes to this ticket
-
Michael Koziarski March 9th, 2009 @ 05:57 AM
- Assigned user set to Jeremy Kemper
Assigning to jeremy as he's the 1.9 compat guy.
Are there going to be other instances where we need to do this 'force to utf8' stuff? Perhaps we should define a no-op method we can call in 1.8 with a 1.9 method which does the force? Alternatively use foo.mb_chars internally?
-
Johan Sørensen March 9th, 2009 @ 02:53 PM
I haven't found any other places it's needed, but granted I've only been running this particular app where I found that issue on 1.9 for a few weeks. Other things might appear in other apps.
-
Johan Sørensen April 28th, 2009 @ 12:26 PM
TextHelper #concat should always deal with utf8 content while we're at it
-
Jeremy Kemper May 28th, 2009 @ 08:01 AM
- State changed from new to incomplete
-
dennis_probst (at mac) November 30th, 2009 @ 08:20 PM
- Tag cleared.
Hey guys,
I have this UTF-8 issue and need to fix it, but I don't know how to use these .patch files. Can someone point me to where I can find information about using .patch files (on Mac).
thanks in advance!
-
JasonKing March 12th, 2010 @ 12:22 AM
What's pending on this issue Jeremy?
When you say "non-utf8" encodings - do you mean
ASCII_8BIT
andUS_ASCII
? Ie. does the patch not work with ASCII?Or do you mean other, less common, encodings?
-
Jeremy Kemper March 12th, 2010 @ 02:03 AM
I mean any encoding that isn't utf8. Ruby supports many and this breaks all of them.
-
Ilya April 28th, 2010 @ 10:17 AM
The path is good only for template that include pure utf-8 text and thus fail to be rendered. If you have something like <%= text %> where variable "text" is utf-8 it will fail in "concat" anyway.
I tried to patch ERB/Compiler/compile but didn't really succeeded at this.
Maybe someone will come with a better solution.
Of course TextHelper patch works for those who use <% concat text %>. -
Santiago Pastorino February 2nd, 2011 @ 04:41 PM
- State changed from incomplete to open
- Importance changed from to
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino February 2nd, 2011 @ 04:41 PM
- State changed from open to stale
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 2188 Encoding error in Ruby1.9 for templates This patch is the result of my research for my proposal f...