mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-11-24 18:44:55 +00:00
Fix compiling on non-UTF8 system, especially Windows (#903)
* Fix compiling on non-UTF8 system * Update Makefile * Revert Makefile changes
This commit is contained in:
parent
cf1cb1cfc5
commit
e83f58e841
@ -8,8 +8,8 @@ LANGUAGE_NAME = "GM9_LANGUAGE"
|
|||||||
VERSION = "GM9_TRANS_VER"
|
VERSION = "GM9_TRANS_VER"
|
||||||
|
|
||||||
parser = ArgumentParser(description="Creates the language.inl file from source.json")
|
parser = ArgumentParser(description="Creates the language.inl file from source.json")
|
||||||
parser.add_argument("source", type=FileType("r"), help="source.json")
|
parser.add_argument("source", type=FileType("r", encoding="utf-8"), help="source.json")
|
||||||
parser.add_argument("inl", type=FileType("w"), help="language.inl")
|
parser.add_argument("inl", type=FileType("w", encoding="utf-8"), help="language.inl")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
# Load the JSON and handle the meta values
|
# Load the JSON and handle the meta values
|
||||||
|
|||||||
@ -147,7 +147,7 @@ def main(source: pathlib.Path, dest: pathlib.Path) -> None:
|
|||||||
source: JSON to convert from.
|
source: JSON to convert from.
|
||||||
dest: TRF file to write.
|
dest: TRF file to write.
|
||||||
"""
|
"""
|
||||||
data = json.loads(source.read_text())
|
data = json.loads(source.read_text(encoding="utf-8"))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
language = get_language(data)
|
language = get_language(data)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user