minor justin case fix

This commit is contained in:
Miroslav Stampar 2012-02-23 15:19:20 +00:00
parent 086c3a3662
commit 0478e4166a
2 changed files with 8 additions and 3 deletions

View File

@ -3118,9 +3118,15 @@ def decodeHexValue(value):
value = value[2:] value = value[2:]
value = value.decode("hex") value = value.decode("hex")
if len(value) > 1 and value[1] == '\x00': if len(value) > 1 and value[1] == '\x00':
value = value.decode("utf-16-le") try:
value = value.decode("utf-16-le")
except UnicodeDecodeError:
pass
elif value and value[0] == '\x00': elif value and value[0] == '\x00':
value = value.decode("utf-16-be") try:
value = value.decode("utf-16-be")
except UnicodeDecodeError:
pass
return value return value
return applyFunctionRecursively(value, _) return applyFunctionRecursively(value, _)

View File

@ -20,7 +20,6 @@ from lib.core.common import expandAsteriskForColumns
from lib.core.common import extractExpectedValue from lib.core.common import extractExpectedValue
from lib.core.common import getPublicTypeMembers from lib.core.common import getPublicTypeMembers
from lib.core.common import initTechnique from lib.core.common import initTechnique
from lib.core.common import isNoneValue
from lib.core.common import isNumPosStrValue from lib.core.common import isNumPosStrValue
from lib.core.common import isTechniqueAvailable from lib.core.common import isTechniqueAvailable
from lib.core.common import parseUnionPage from lib.core.common import parseUnionPage