On Monday, April 2, 2018 at 7:28:37 AM UTC-7, Satyanarayana Gandham wrote: > > Hi Jeremy, > > Thanks for the reply. > > I think the problem is with the data itself. My Database table (with > charset as utf8) contains "’" which I think is encoded improperly. > Since I know the source of problem(Not using utf8 as encoding when using > mysql gem), I could easily change the data (converting improerly encoded > data like "’" to "’") to work with any of mysql (with encoding=utf8) & > mysql2 gems. > > Can you please help me better understand what "encoding=utf8" does? > Because I am thinking of using it, with mysql2 gem, just to be safe. >
When creating a new connection, Sequel passes the :encoding option to Mysql2::Client.new, and also calls SET NAMES 'utf8'. See the MySQL database documentation and mysql2 gem documentation for what the effects of those operations are. Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
