Hi, I have the following statement inside an rhtml file %="ÄŸÄžÄŸ"%> These chars are from ISO-8859-9 and their byte values are F0, D0, F0 respectively, which are "LATIN SMALL LETTER G WITH BREVE" and "LATIN CAPITAL LETTER G WITH BREVE". When I run this code it gets: compile error C:/test/app/views/test/work.rhtml:1: unterminated string meets end of file C:/test/app/views/test/work.rhtml:1: syntax error, unexpected $end, expecting ')' Extracted source (around line #1): 1: <%="ï¿½ï¿½ï¿½"%> However when I debug the code using rdebug, I see that the following code in action_view\template_handlers\compileable.rb is called. ActionView::Base::CompiledTemplates.module_eval(render_source, file_name, -line_offset) Here the value of render_source printed by the debugger is as follows: "def _run_erb_47app47views47test47work46rhtml(local_assigns)\n_erbout = ''; _erb out.concat((\"Â-ÂºÂ-").to_s); _erbout\nend" ^ ^ | |---- it does not escape here |---- here it escapes " but The strange thing I noticed is above, where it escapes the first double quote but not the second. I thougt that the debugger may not be interpreting the characters correctly so checked the byte values by evaluating by hand like render_source, render_source, render_source. It gave me correct values as 240, 208 and 240 again. However, module_eval keeps giving compilation error although I cannot see and appearant reason why is fails. Can someone shed some light on it? Thanks.
on 2008-12-15 19:11