MCPcopy Create free account
hub / github.com/FastLED/FastLED / _get_utf8_env

Function _get_utf8_env

ci/compiler/platformio_cache.py:46–55  ·  view source on GitHub ↗

Get environment with UTF-8 encoding to prevent Windows CP1252 encoding errors. PlatformIO outputs Unicode characters (checkmarks, etc.) that fail on Windows when using the default CP1252 console encoding. This ensures UTF-8 is used.

()

Source from the content-addressed store, hash-verified

44
45
46def _get_utf8_env() -> dict[str, str]:
47 """Get environment with UTF-8 encoding to prevent Windows CP1252 encoding errors.
48
49 PlatformIO outputs Unicode characters (checkmarks, etc.) that fail on Windows
50 when using the default CP1252 console encoding. This ensures UTF-8 is used.
51 """
52 env = os.environ.copy()
53 env["PYTHONIOENCODING"] = "utf-8:replace"
54 env["PYTHONUTF8"] = "1"
55 return env
56
57
58@dataclass

Callers 1

install_with_platformioFunction · 0.85

Calls 1

copyMethod · 0.45

Tested by

no test coverage detected