We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c69f56 commit a212f0cCopy full SHA for a212f0c
1 file changed
lib/core/common.py
@@ -2943,16 +2943,17 @@ def decodeIntToUnicode(value):
2943
if isinstance(value, int):
2944
try:
2945
if value > 255:
2946
- if Backend.isDbms(DBMS.MSSQL):
2947
- encoding = "UTF-16-BE"
2948
- else:
2949
- encoding = conf.charset
2950
-
2951
_ = "%x" % value
2952
if len(_) % 2 == 1:
2953
_ = "0%s" % _
+ raw = hexdecode(_)
2954
2955
- retVal = getUnicode(hexdecode(_), encoding)
+ if Backend.isDbms(DBMS.MSSQL):
+ retVal = getUnicode(raw, "UTF-16-BE")
+ elif Backend.isDbms(DBMS.PGSQL):
+ retVal = unichr(value)
+ else:
2956
+ retVal = getUnicode(raw, conf.charset)
2957
else:
2958
retVal = getUnicode(chr(value))
2959
except:
0 commit comments