#227 ✓resolved
Jan Molic

Hardcoded "SET NAMES UTF8" in mysql_adapter.create_connection should be variable

Reported by Jan Molic | April 30th, 2008 @ 07:41 AM

There is hardcoded "SET NAMES UTF8" in MySQL adapter.create_connection(). I would prefer to set the encoding in database's setup:

DataMapper::Database.setup( {
  :adapter  => 'mysql',
  :host     => 'foo',
  :encoding => 'LATIN2'
} )

Now my workaround is this

def adapter.create_connection()
  conn = super()
  cmd = conn.create_command( "SET NAMES LATIN2" )
  cmd.execute_non_query
  conn
end

Comments and changes to this ticket

  • Sam Smoot

    Sam Smoot May 2nd, 2008 @ 04:29 AM

    • Milestone cleared.
    • Assigned user set to “Paul Sadauskas (Rando)”

    This is resolved in DO 0.9.0. Couldn't say for sure if it's reflected in the migrations though. I'll ask Rando or Ben on IRC.

  • Sam Smoot

    Sam Smoot May 8th, 2008 @ 04:42 PM

    • State changed from “new” to “resolved”

    Right, doesn't apply to the new migrations in dm-core.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Pages