I get the following error: [ActionView :: Template :: Error (incompatible character encodings: ASCII-8BIT and UTF-8)]
Here is the magazine ...
Completed 500 Internal Server Error in 318ms
Jan 09 23:29:19 burro app/web.1: ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8):
Jan 09 23:29:19 burro app/web.1: 97:
Jan 09 23:29:19 burro app/web.1: 98: </tr>
Jan 09 23:29:19 burro app/web.1: 99: <% end %>
Jan 09 23:29:19 burro app/web.1: 100: </tbody>
Jan 09 23:29:19 burro app/web.1: 101: </table>
Jan 09 23:29:19 burro app/web.1: 102:
HERE CODE:
<td><%= row.notes.force_encoding("utf-8") %></td>
</tr>
<% end %>
Do I have all this in the correct rb and erb files?
<%
config.encoding = "utf-8"
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8
@data.each do |sr|
sr.notes = sr.notes.to_s.force_encoding("UTF-8")
end
The data in db is encrypted, so I cannot run a query on MongoDB data to find out which special character causes a problem when displaying records?
source
share