From 7e5d30cda4e468735e2df2b6821192c9e30ed832 Mon Sep 17 00:00:00 2001 From: "H.Ogino" Date: Mon, 4 Nov 2019 16:49:14 +0100 Subject: [PATCH] idf.py: add encoding option Merges https://github.com/espressif/esp-idf/pull/4106 Signed-off-by: Sergei Silnov --- tools/idf_py_actions/tools.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/idf_py_actions/tools.py b/tools/idf_py_actions/tools.py index bde47bd41..4d01b705c 100644 --- a/tools/idf_py_actions/tools.py +++ b/tools/idf_py_actions/tools.py @@ -2,6 +2,7 @@ import os import re import subprocess import sys +from io import open from .constants import GENERATORS from .errors import FatalError @@ -96,7 +97,7 @@ def _parse_cmakecache(path): CMakeCache entries also each have a "type", but this is currently ignored. """ result = {} - with open(path) as f: + with open(path, encoding='utf-8') as f: for line in f: # cmake cache lines look like: CMAKE_CXX_FLAGS_DEBUG:STRING=-g # groups are name, type, value