Minor bug fix (getting ? in < 0xf char cases)

This commit is contained in:
Miroslav Stampar 2013-02-11 21:16:35 +01:00
parent 093a93938c
commit c75560ba69

View File

@ -2590,7 +2590,10 @@ 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(hexdecode(hex(value)))
_ = "%x" % value
if len(_) % 2 == 1:
_ = "0%s" % _
retVal = getUnicode(hexdecode(_))
elif value > 255:
retVal = unichr(value)
else: