Skip to content

Commit

Permalink
when unpacking bytes to text, use errorMode ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
bitsgalore committed Jan 25, 2018
1 parent 9fb8f56 commit 376cf1c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion isolyzer/apple.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,11 @@ def parseMasterDirectoryBlock(bytesData):
bc.bytesToUShortInt(bytesData[18:20]))
shared.addProperty(properties, "blockCount",
bc.bytesToUInt(bytesData[20:24]))

charsVolumeName = bc.bytesToUnsignedChar(bytesData[36:37])

shared.addProperty(properties, "volumeName",
bc.bytesToText(bytesData[37:63]))
bc.bytesToText(bytesData[37:37 + charsVolumeName]))

return properties

Expand Down
3 changes: 2 additions & 1 deletion isolyzer/byteconv.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ def bytesToText(bytestring):

# Set encoding and error mode
enc = "utf-8"
errorMode = "strict"
#errorMode = "strict"
errorMode = "ignore"

try:
# Decode to utf-8
Expand Down

0 comments on commit 376cf1c

Please sign in to comment.