Getting this error in rails: `ActionView::Template::Error (code converter not found (UTF-8 to UTF-16))`
- by Victor S
I've started getting the following error in one of my views for some reason, I don't get it in development, but only in production.
Here is a snippet of the backtrace, any ideas?
ActionView::Template::Error (code converter not found (UTF-8 to UTF-16)):
19: [title, summary.gsub(/^/, " "), nil].join("\n\n")
20: end
21: end.join
22: sections = sections.force_encoding('UTF-8').encode('UTF-16', :invalid => :replace).encode('UTF-8') if sections.respond_to?(:force_encoding)
23: %>
24:
25: <%= raw sections %>