From f3ed61af5fd3f5370d1ff0fa2ab0f49b1c914674 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 25 May 2011 21:12:12 +0000 Subject: [PATCH] bug fix when using inference and kb.pageEncoding is None (like in binary cases) --- lib/core/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/common.py b/lib/core/common.py index 81a63bd8e..3acaf9dbc 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -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