Permalink
Browse files

godrv by default sets MySQL NAMES variable to utf8

  • Loading branch information...
1 parent a31b785 commit 49cd60b207c5f91df248fb33455f4d628659ecdd @ziutek committed Jun 6, 2012
Showing with 2 additions and 1 deletion.
  1. +1 −1 README.md
  2. +1 −0 godrv/driver.go
View
@@ -438,7 +438,7 @@ This is improved part of previous example:
// Register initialisation commands
// (workaround, see http://codereview.appspot.com/5706047)
- godrv.Register("SET NAMES utf8")
+ godrv.Register("SET NAMES latin2") // Overrides default utf8
godrv.Register("CREATE TABLE IF NOT EXISTS my_table ( ... )")
// Create a connection handler
View
@@ -234,5 +234,6 @@ func Register(query string) {
}
func init() {
+ Register("SET NAMES utf8")
sql.Register("mymysql", &d)
}

0 comments on commit 49cd60b

Please sign in to comment.