Skip to content
Snippets Groups Projects
Commit 3d37c192 authored by Antoine Lambert's avatar Antoine Lambert
Browse files

browse/utils: Force content reencoding even when input one is detected as ascii

It exist cases where file badly detected input encoding as ascii which results
in display errors in browse.
parent cfd88fdb
No related branches found
No related tags found
No related merge requests found
......@@ -111,7 +111,7 @@ def _reencode_content(mimetype, encoding, content_data):
if encoding == 'unknown-8bit':
content_data = content_data.decode('utf-8', 'replace')\
.encode('utf-8')
elif 'ascii' not in encoding and encoding not in ['utf-8', 'binary']:
elif encoding not in ['utf-8', 'binary']:
content_data = content_data.decode(encoding, 'replace')\
.encode('utf-8')
elif mimetype.startswith('application/octet-stream'):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment