diff options
author | Robert Guetzkow <gitcommit@outlook.de> | 2020-11-04 12:45:36 +0300 |
---|---|---|
committer | Robert Guetzkow <gitcommit@outlook.de> | 2020-11-04 15:20:10 +0300 |
commit | f7320c3bf159f14f0c39f88b2302a6e64e7eef76 (patch) | |
tree | ba965d0939ed886560e22e1a79e04dfc203999b7 /release/scripts/modules | |
parent | 31a620b9420cab6292b0aa1ea21c9dd1cf70b8bc (diff) |
Fix T82292: Set encoding for keymap export to UTF-8
Keymaps have previously been exported with an encoding dependent
on the current system locale. This caused issues when the
keymap contained non-ASCII characters, for instance in a string
property for an operator.
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D9449
Diffstat (limited to 'release/scripts/modules')
-rw-r--r-- | release/scripts/modules/bl_keymap_utils/io.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/release/scripts/modules/bl_keymap_utils/io.py b/release/scripts/modules/bl_keymap_utils/io.py index e850661d6c6..091cdbc2642 100644 --- a/release/scripts/modules/bl_keymap_utils/io.py +++ b/release/scripts/modules/bl_keymap_utils/io.py @@ -164,7 +164,7 @@ def keyconfig_export_as_data(wm, kc, filepath, *, all_keymaps=False): # not essential, just convenient to order them predictably. export_keymaps.sort(key=lambda k: k[0].name) - with open(filepath, "w") as fh: + with open(filepath, "w", encoding="utf-8") as fh: fw = fh.write # Use the file version since it includes the sub-version |