commit | 26b784f5da4b9e05742e72adc29b0e21e0d87455 | [log] [tgz] |
---|---|---|
author | Jerry.Chen <jerry.chen@touchgui.com> | Tue Apr 25 11:43:43 2023 +0800 |
committer | Petteri Aimonen <jpa@github.mail.kapsi.fi> | Tue Apr 25 08:51:26 2023 +0300 |
tree | 67d6eeb44eba75375927f5f58133fb7cf7adb6f5 | |
parent | 91fb301dabb83beb28f2ad266be6aaee7a1a4e00 [diff] |
ref |> Modified The generated code uses utf-8 encoding by default.
diff --git a/generator/nanopb_generator.py b/generator/nanopb_generator.py index fb75cf7..3b79948 100755 --- a/generator/nanopb_generator.py +++ b/generator/nanopb_generator.py
@@ -2499,7 +2499,7 @@ if dirname and not os.path.exists(dirname): os.makedirs(dirname) - with open(path, 'w') as f: + with open(path, 'w', encoding='utf-8') as f: f.write(data) def main_plugin():