bug fix when using inference and kb.pageEncoding is None (like in binary cases)

This commit is contained in:
Miroslav Stampar 2011-05-25 21:12:12 +00:00
parent 5369657cd5
commit f3ed61af5f

View File

@ -2397,7 +2397,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)
return struct.pack('B' if value<256 else '>H', value).decode(kb.pageEncoding or UNICODE_ENCODING)
except:
return INFERENCE_UNKNOWN_CHAR