Hello you all, hope you’re all having some nice holidays!
Here is the deal with me: incompatible character encodings: UTF-8 and ASCII-8BIT
I used a seed (https://github.com/celsodantas/br_populate) to populate my DB with cities and states of my country, so I can fill a select box for registering, but when I try to exhibit it I get this error:
incompatible character encodings: UTF-8 and ASCII-8BIT
this is one of my select_boxes:
<%= f.collection_select(:birth_state, State.all, :id, :name, {:prompt => “State”}, {:class=> ‘form-control’}) %>
And also I’m using a mysql database, with the mysql gem, and I have seen some records like:
<City id: 5560, name: “Xambio**\xC3\xA1**”, capital: false, state_id: 27,…>
Making me think it’s a problem cause of special portuguese characters like ç, á, à, ã… I have heard also that mysql/rails doesn’t convert automatically the encodings or something like that, but honestly I have no clue on how doing that. If anyone got a clue, happy to hear it.
Thank you all in advance!
Happy holidays,