Permalink
Browse files

string value return as is (not convert to unicode string) in Python 2.x

  • Loading branch information...
1 parent eec2a05 commit 882051ae928516c34f946b6a2e3aa56d86dbc044 @nakagami committed Jul 18, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 firebirdsql/fbcore.py
View
@@ -240,7 +240,10 @@ def _parse_time(self, raw_value):
def value(self, raw_value):
if self.sqltype in (SQL_TYPE_TEXT, SQL_TYPE_VARYING):
- return self.bytes_to_str(raw_value)
+ if PYTHON_MAJOR_VER==3:
+ return self.bytes_to_str(raw_value)
+ else:
+ return raw_value
elif self.sqltype in (SQL_TYPE_SHORT, SQL_TYPE_LONG, SQL_TYPE_INT64):
n = bytes_to_bint(raw_value)
if self.sqlscale:

0 comments on commit 882051a

Please sign in to comment.