fix of a wrong assumption (e.g. decodeIntToUnicode(12345) has been returning a "09" instead of a single unicode character)

This commit is contained in:
Miroslav Stampar 2012-02-01 10:38:43 +00:00
parent 4d9dcbf5db
commit 2589521ecf

View File

@ -2682,7 +2682,7 @@ def decodeIntToUnicode(value):
Decodes inferenced integer value with usage of current page encoding
"""
try:
return struct.pack('B' if value<256 else '>H', value).decode(kb.pageEncoding or UNICODE_ENCODING)
return unichr(value)
except:
return INFERENCE_UNKNOWN_CHAR