Diff

util/sql.lua @ 6532:a966efeb6cb3

mod_storage_sql2, util.sql: Set character encoding on every connect
author Kim Alvefur <zash@zash.se>
date Thu, 11 Dec 2014 09:18:39 +0100
parent 5919:d1cc67ed0767
child 6730:7889515bac86
line wrap: on
line diff
--- a/util/sql.lua	Tue Dec 09 19:36:34 2014 +0100
+++ b/util/sql.lua	Thu Dec 11 09:18:39 2014 +0100
@@ -156,6 +156,7 @@
 	dbh:autocommit(false); -- don't commit automatically
 	self.conn = dbh;
 	self.prepared = {};
+	self:set_encoding();
 	return true;
 end
 function engine:execute(sql, ...)