encode patch explicitly with utf-8-sig (unicode with marker for unicode

This commit is contained in:
Fabian Dill 2020-03-22 20:04:30 +01:00
parent d31e54e5cd
commit 7cab5b5baf
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ def generate_patch(rom: bytes, metadata=None) -> bytes:
patch = bsdiff4.diff(get_base_rom_bytes(), rom)
patch = yaml.dump({"meta": metadata,
"patch": patch})
return patch.encode()
return patch.encode(encoding="utf-8-sig")
def create_patch_file(rom_file_to_patch: str, server: str = "") -> str: