Hello,

sorry for the really late reply, had some internet troubles where I was.

I have researched about the collation, but I see that my database is ok, as
when I input records manually it saves without any problems special
characters, what I'm thinking that is happening is that the data I'm
populating comes from a JSON request, and it's coming encoded in ASCII-8BIT
I guess. The trouble I'm having is actually on how to convert the strings
before I save them on database. The code for the rake can be checked at
https://github.com/celsodantas/br_populate/blob/master/br_populate.rb

I believe it has something to do with it.

Thanks for the help



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>


2014-12-30 15:22 GMT-02:00 Hassan Schroeder <hassan.schroe...@gmail.com>:

> On Tue, Dec 30, 2014 at 3:50 AM, Diego Dillenburg Bueno
> <diegodillenb...@gmail.com> wrote:
> >
> > 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,..>
>
> You need to make sure your database (or at least the tables you're
> using for your app) is set up with the appropriate "character set" and
> "collation" for the language(s) you're using.
>
> google: mysql collation portugues brasil
>
> for some specific references; also read the MySQL docs for the DB
> version you're running, e.g.
>
> http://dev.mysql.com/doc/refman/5.5/en/charset-charsets.html
>
> HTH,
> --
> Hassan Schroeder ------------------------ hassan.schroe...@gmail.com
> http://about.me/hassanschroeder
> twitter: @hassan
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yC4%2Bha1CmCMcE4bH-Bnp6w3Y2oCrUYg_weLezH7W1pemA%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAOHSkmENCDZxvq95YZgTQ2KHtPLwrV4i9BKumKcqKd6uE%2B-eCg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to