Finally working inference against MySQL/international letters (even chinese)

This commit is contained in:
Miroslav Stampar
2012-12-19 10:44:02 +01:00
parent 0037d52098
commit 92e338251a
2 changed files with 3 additions and 3 deletions

View File

@@ -2503,7 +2503,7 @@ def decodeIntToUnicode(value):
try:
# http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_ord
if Backend.getIdentifiedDbms() in (DBMS.MYSQL,):
retVal = getUnicode(struct.pack('B' if value < 256 else '>H', value))
retVal = getUnicode(hexdecode(hex(value)))
elif value > 255:
retVal = unichr(value)
else: