Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
This paste will be private.
Index: SQL.tmbundle/Support/lib/connectors/mysql.rb =================================================================== --- SQL.tmbundle/Support/lib/connectors/mysql.rb (revision 7751) +++ SQL.tmbundle/Support/lib/connectors/mysql.rb (working copy) @@ -98,6 +98,9 @@ if args[0] != :INIT then real_connect(*args) end + + encoding = query('SELECT @@character_set_database AS server').fetch_hash + query('SET NAMES utf8;') if encoding["server"] != 'latin1' end def real_connect(host=nil, user=nil, passwd=nil, db=nil, port=nil, socket=nil, flag=nil)
From the Design Piracy series on my blog: