Hi, I’m a newcomer to Ruby and to Rails, and am having a problem with
Now, I know ruby doesn’t handle unicode…but, characters like Ã©
and Ã§ (ccedil) are part of the iso-8859-1 charset, so it shouldn’t be a
But, for some reason, the string functions still seem to hang on those
As an example, in a brand new rails app, with a single model “Post”
to a database with id, title, and body, I generate a scaffold, and
new entry with an accented character in the title.
Then, in the show.rhtml view, I add the .reverse method as follows:
<% for column in Post.content_columns %>
<%= column.human_name %>: <%=h @post.send(column.name).reverse %><% end %>
The entire title is reversed, as expected, except the Ã© (eacute)
is now ?? (two question marks).
My MySQL DB is set up with latin-1 as the default. I don’t get what’s