summary refs log tree commit diff
path: root/synapse/storage/_base.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-03-25 17:15:20 +0000
committerErik Johnston <erik@matrix.org>2015-03-25 17:15:20 +0000
commit0e8f5095c7e7075b249ad53a9f60a4d2fdeeaaed (patch)
tree39bdcca49ae0eabf09b3a98e2c4b810e0c68692f /synapse/storage/_base.py
parentEscape non printing ascii character (diff)
downloadsynapse-0e8f5095c7e7075b249ad53a9f60a4d2fdeeaaed.tar.xz
Fix unicode database support
Diffstat (limited to 'synapse/storage/_base.py')
-rw-r--r--synapse/storage/_base.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py
index 1ea39bc0ad..76ec3ee93f 100644
--- a/synapse/storage/_base.py
+++ b/synapse/storage/_base.py
@@ -755,6 +755,8 @@ class SQLBaseStore(object):
             return None
 
         internal_metadata, js, redacted, rejected_reason = res
+        js = js.decode("utf8")
+        internal_metadata = internal_metadata.decode("utf8")
 
         start_time = update_counter("select_event", start_time)
 
@@ -779,9 +781,11 @@ class SQLBaseStore(object):
             sql_getevents_timer.inc_by(curr_time - last_time, desc)
             return curr_time
 
+        logger.debug("Got js: %r", js)
         d = json.loads(js)
         start_time = update_counter("decode_json", start_time)
 
+        logger.debug("Got internal_metadata: %r", internal_metadata)
         internal_metadata = json.loads(internal_metadata)
         start_time = update_counter("decode_internal", start_time)