Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bitextor-identifyMIME.py error #52

Closed
hieuhoang opened this issue Dec 5, 2018 · 2 comments
Closed

bitextor-identifyMIME.py error #52

hieuhoang opened this issue Dec 5, 2018 · 2 comments

Comments

@hieuhoang
Copy link
Contributor

cat 1 | ~/permanent/software/bitextor/bitextor-identifyMIME.py

Traceback (most recent call last):
File "/home/hieu/permanent/software/bitextor/bitextor-identifyMIME.py", line 41, in
magicoutput.append(base64.b64encode(base64.b64decode(content + "==").decode(magicoutput[1].split("=")[1].replace("unknown-8bit","iso-8859-1").replace('us-ascii','iso-8859-1')).encode("utf8")).decode("utf8"))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 16161: invalid continuation byte
1.gz

@hieuhoang
Copy link
Contributor Author

For now, I've hacked the script to write 'dunno' to the output stream when there is an encoding error
0396e24

@mespla
Copy link
Contributor

mespla commented Dec 19, 2018

I have added a second attempt to convert the file by using ISO-8859-1 by default. Should we better discard a file if te encoding cannot be identified properly? This is, insetad of printing it with dunno, just not including it in the ouptut of the script?

@lpla lpla closed this as completed Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants