From a72d73804ed388710edba09df6be499269874f97 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sat, 10 May 2014 01:31:44 +0200 Subject: [PATCH] Revert of 925517489041b39b2d22ea3ce2e5a7661d4f4c26 (bug was introduced with it) --- 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 aed3675e4..3dc3308fc 100755 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -1992,7 +1992,7 @@ def getUnicode(value, encoding=None, system=False, noneToNull=False): try: return unicode(value, encoding or kb.get("pageEncoding") or UNICODE_ENCODING) except UnicodeDecodeError, ex: - return value[:ex.start] + "".join(INVALID_UNICODE_CHAR_FORMAT % ord(_) for _ in value[ex.start:ex.end]) + value[ex.end:] + value = value[:ex.start] + "".join(INVALID_UNICODE_CHAR_FORMAT % ord(_) for _ in value[ex.start:ex.end]) + value[ex.end:] else: try: return unicode(value)