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

Skip to content

Commit c75560b

Browse files
committed
Minor bug fix (getting ? in < 0xf char cases)
1 parent 093a939 commit c75560b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/core/common.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2590,7 +2590,10 @@ def decodeIntToUnicode(value):
25902590
try:
25912591
# http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_ord
25922592
if Backend.getIdentifiedDbms() in (DBMS.MYSQL,):
2593-
retVal = getUnicode(hexdecode(hex(value)))
2593+
_ = "%x" % value
2594+
if len(_) % 2 == 1:
2595+
_ = "0%s" % _
2596+
retVal = getUnicode(hexdecode(_))
25942597
elif value > 255:
25952598
retVal = unichr(value)
25962599
else:

0 commit comments

Comments
 (0)