Tweaked the wording of the unexpected-encoding warning.

- Legacy-Id: 13760
This commit is contained in:
Henrik Levkowetz 2017-07-03 11:38:03 +00:00
parent 274548f1b1
commit 08f0338555

View file

@ -32,7 +32,10 @@ class PlainParser(FileParser):
magic.magic_load(m.cookie, None)
filetype = m.from_buffer(content)
if not 'ascii' in filetype and not 'utf-8' in filetype:
self.parsed_info.add_error('A plain text ASCII document is required. Found an unexpected encoding: "%s"' % filetype)
self.parsed_info.add_error('A plain text ASCII document is required. '
'Found an unexpected encoding: "%s". '
'You probably have one or more non-ascii characters in your file.' % filetype
)
def parse_name(self):
self.fd.file.seek(0)