cmake: Encode and decode in UTF-8 in build system
In order to make sure that the build works in folders that require a UTF
encoding, make sure that both CMake and the various Python scripts that
interact with each other on files use the same encoding, in this case
UTF-8.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
diff --git a/scripts/zephyr_module.py b/scripts/zephyr_module.py
index f384e81..8799ded 100755
--- a/scripts/zephyr_module.py
+++ b/scripts/zephyr_module.py
@@ -147,10 +147,10 @@
projects += args.extra_modules
if args.kconfig_out:
- kconfig_out_file = open(args.kconfig_out, 'w')
+ kconfig_out_file = open(args.kconfig_out, 'w', encoding="utf-8")
if args.cmake_out:
- cmake_out_file = open(args.cmake_out, 'w')
+ cmake_out_file = open(args.cmake_out, 'w', encoding="utf-8")
try:
for project in projects: