Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 70215a9

Browse files
committed
Patch for an Issue #847
1 parent c6a8fee commit 70215a9

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

lib/core/common.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2809,14 +2809,11 @@ def decodeIntToUnicode(value):
28092809

28102810
if isinstance(value, int):
28112811
try:
2812-
# http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_ord
2813-
if Backend.getIdentifiedDbms() in (DBMS.MYSQL,):
2812+
if value > 255:
28142813
_ = "%x" % value
28152814
if len(_) % 2 == 1:
28162815
_ = "0%s" % _
2817-
retVal = getUnicode(hexdecode(_))
2818-
elif value > 255:
2819-
retVal = unichr(value)
2816+
retVal = getUnicode(hexdecode(_), encoding="UTF-16" if Backend.isDbms(DBMS.MSSQL) else None)
28202817
else:
28212818
retVal = getUnicode(chr(value))
28222819
except:

0 commit comments

Comments
 (0)