Fix unicode support

This commit is contained in:
Erik Johnston 2015-04-02 10:06:22 +01:00
parent e24c32e6f3
commit 779f7b0f44
22 changed files with 193 additions and 168 deletions

View file

@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from synapse.storage import prepare_database
import types
@ -28,3 +29,14 @@ class MariaEngine(object):
if isinstance(param, types.BufferType):
return str(param)
return param
def on_new_connection(self, db_conn):
pass
def prepare_database(self, db_conn):
cur = db_conn.cursor()
cur.execute(
"ALTER DATABASE CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci"
)
db_conn.commit()
prepare_database(db_conn, self)