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 (GitHub - celsodantas/br_populate: Arquivo seed contendo todas as cidades e estados do Brasil.) 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,
Diego Dillenburg Bueno
Graduando em Ciências da Computação
UNESP - Rio Claro
(12) 98116-7741
https://www.facebook.com/diegodillenburg
http://br.linkedin.com/in/diegodillenburg
https://github.com/diegodillenburg