Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Tools/i18n/msgfmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,15 @@ def make(filename, outfile):
print(msg, file=sys.stderr)
sys.exit(1)

# Check for UTF-8 BOM
if lines[0].startswith(b'\xef\xbb\xbf'):
print(
f"The file {infile} starts with a UTF-8 BOM which is not allowed in .po files.\n"
"Please save the file without a BOM and try again.",
file=sys.stderr
)
sys.exit(1)

section = msgctxt = None
fuzzy = 0

Expand Down
Loading