Skip to content

Commit 08f0338

Browse files
committed
Tweaked the wording of the unexpected-encoding warning.
- Legacy-Id: 13760
1 parent 274548f commit 08f0338

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

ietf/submit/parsers/plain_parser.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ def parse_file_charset(self):
3232
magic.magic_load(m.cookie, None)
3333
filetype = m.from_buffer(content)
3434
if not 'ascii' in filetype and not 'utf-8' in filetype:
35-
self.parsed_info.add_error('A plain text ASCII document is required. Found an unexpected encoding: "%s"' % filetype)
35+
self.parsed_info.add_error('A plain text ASCII document is required. '
36+
'Found an unexpected encoding: "%s". '
37+
'You probably have one or more non-ascii characters in your file.' % filetype
38+
)
3639

3740
def parse_name(self):
3841
self.fd.file.seek(0)

0 commit comments

Comments
 (0)