From e5fdbab68b5b92977f98594af82d165376fc0add Mon Sep 17 00:00:00 2001 From: Thomas Perl Date: Thu, 3 Feb 2011 13:13:43 +0100 Subject: [PATCH] Convert UTF-8 strings to unicode --- minidb.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/minidb.py b/minidb.py index eb32450..7307a76 100644 --- a/minidb.py +++ b/minidb.py @@ -94,8 +94,10 @@ class Store(object): def convert(self, v): """Convert a value to its string representation""" - if isinstance(v, str) or isinstance(v, unicode): + if isinstance(v, unicode): return v + elif isinstance(v, str): + return v.decode('utf-8') else: return str(v) -- 2.11.4.GIT