I am working on an application in which the ruby sidekiq process calls a third party and parses data in a database.
I use the sequel ad my orm.
I get some weird characters in the results, for example:
"Tweets en Ingl \ xE9s y en Espa \ xF1ol"
When it tries to save to postgres, the following error will occur:
Sequel :: DatabaseError: PG :: CharacterNotInRepertoire: ERROR: invalid byte sequence for encoding "UTF8": 0xe9 0x73 0x20
The strange thing is that the string considers UTF-8, if I check the encoding name, it says:
name.encoding.name #UTF-8
What can I do to make the data in the correct format for postgres?
ruby encoding postgresql sequel
dagda1
source share