load_yaml: _load_yaml(): Specify UTF-8 encoding
open() without an encoding argument decodes the file with the platform's locale-dependent default, so the same YAML file can be decoded differently (or fail) on hosts with different locale settings. YAML files are expected to be UTF-8, so say so explicitly. Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.84.2 Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
f737c15a0d
commit
717b69f5d8
1 changed files with 1 additions and 1 deletions
|
|
@ -346,7 +346,7 @@ def _load_yaml(path: str | Path, optional: bool, seen: set[Path]) -> dict[str, A
|
|||
seen.add(path)
|
||||
try:
|
||||
try:
|
||||
with open(path) as f:
|
||||
with open(path, encoding = 'utf-8') as f:
|
||||
loaded = yaml.safe_load(f)
|
||||
if loaded is None:
|
||||
ret: dict[str, Any] = {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue