twister: fix utf-8 encoding for device handler
Fixed bug for when yaml contains utf-8 special character
Changed handler.log to be utf-8
Signed-off-by: Pavlo Havrylyuk <pavlo.havrylyuk@infineon.com>
diff --git a/scripts/pylib/twister/scl.py b/scripts/pylib/twister/scl.py
index bbd9f6d..25a3210 100644
--- a/scripts/pylib/twister/scl.py
+++ b/scripts/pylib/twister/scl.py
@@ -41,7 +41,7 @@
:return: dictionary representing the YAML document
"""
try:
- with open(filename, 'r') as f:
+ with open(filename, 'r', encoding='utf-8') as f:
return yaml.load(f, Loader=SafeLoader)
except yaml.scanner.ScannerError as e: # For errors parsing schema.yaml
mark = e.problem_mark