scripts: snippets: Use UTF-8 to write CMake files
UTF-8 is not always the default encoding on some platforms, but it's the only reliable way to store encoded strings for filenames using non-ASCII characters. Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
parent
16fa99a887
commit
fde1a239c9
1 changed files with 1 additions and 1 deletions
|
|
@ -311,7 +311,7 @@ def write_cmake_out(snippets: Snippets, cmake_out: Path) -> None:
|
|||
detail and are not meant to be used outside of snippets.cmake.'''
|
||||
if not cmake_out.parent.exists():
|
||||
cmake_out.parent.mkdir()
|
||||
with open(cmake_out, 'w') as f:
|
||||
with open(cmake_out, 'w', encoding="utf-8") as f:
|
||||
SnippetToCMakePrinter(snippets, f).print_cmake()
|
||||
|
||||
def main():
|
||||
|
|
|
|||
Loading…
Reference in a new issue