{"issue":{"state":"open","created_at":"2011-11-25T10:49:35Z","updated_at":"2011-11-25T12:49:51Z","user":{"gravatar_id":"93e1bb2a173b91477472d609cbde1683","id":882016,"url":"https://api.github.com/users/angryziber","login":"angryziber","avatar_url":"https://secure.gravatar.com/avatar/93e1bb2a173b91477472d609cbde1683?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":1,"body":"node-mysql encodes all queries using utf8. This works fine, if mysql server's default encoding is also set to utf8, but storing of international characters is broken otherwise.\r\n\r\nWhen opening a connection, the server specifies its default encoding, which is usually latin1 on new installations.\r\nnode-mysql can be fixed by sending SET NAMES 'utf8'; on connection if server uses something non-utf8.\r\n\r\nAs a workaround, to \"fix\" your mysql server, put 'default-character-set=utf8' into my.cnf/my.ini file.\r\n\r\nAnd (optionally) run this on an already existing database:\r\nalter database YOUR_DB character set utf8 collate utf8_general_ci;\r\nalter table YOUR_TABLE charset=utf8;\r\n\r\n","assignee":null,"id":2348283,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[],"number":143,"title":"node-mysql doesn't respect connection encoding","closed_at":null,"html_url":"https://github.com/felixge/node-mysql/issues/143","url":"https://api.github.com/repos/felixge/node-mysql/issues/143","milestone":null},"action":"created","comment":{"created_at":"2011-11-25T12:49:51Z","updated_at":"2011-11-25T12:49:51Z","user":{"gravatar_id":"23968f0ca75b13463d2db5343e5c2096","id":15000,"url":"https://api.github.com/users/felixge","login":"felixge","avatar_url":"https://secure.gravatar.com/avatar/23968f0ca75b13463d2db5343e5c2096?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"What could this module do to handle this? Sending `SET NAMES ...` automatically seems bad.","id":2874262,"url":"https://api.github.com/repos/felixge/node-mysql/issues/comments/2874262"}}