incorrect string value

12 views
Skip to first unread message

fugee ohu

unread,
Nov 5, 2018, 2:19:00 PM11/5/18
to Ruby on Rails: Talk
I imported some sms messages with emoticons in them and even though I'm setup for utf8 encoding such as foreign languages, these emoticons raise 'incorrect string value' error

belgoros

unread,
Nov 8, 2018, 3:27:19 AM11/8/18
to Ruby on Rails: Talk


On Monday, 5 November 2018 20:19:00 UTC+1, fugee ohu wrote:
I imported some sms messages with emoticons in them and even though I'm setup for utf8 encoding such as foreign languages, these emoticons raise 'incorrect string value' error

Hi, have you defined on the very first line of your ruby file UTF encoding as follows:

# encoding: utf-8

 

Tales Cione

unread,
Nov 8, 2018, 5:23:00 AM11/8/18
to rubyonra...@googlegroups.com
You say when you are importing to DB? Usually you should have utf8mb4 as your encoding in that case :)
--
Tales.


--
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-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/4bcb0f35-045f-48da-8560-d98da0d7571e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rob Jonson

unread,
Nov 9, 2018, 6:58:23 AM11/9/18
to Ruby on Rails: Talk


On Monday, 5 November 2018 19:19:00 UTC, fugee ohu wrote:
I imported some sms messages with emoticons in them and even though I'm setup for utf8 encoding such as foreign languages, these emoticons raise 'incorrect string value' error

Reply all
Reply to author
Forward
0 new messages