You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
init: set PYTHONUTF8=1 for Python services (Windows reads files as cp1252) #464
On Windows a native Python service reads text files as the ANSI code page (cp1252) unless told otherwise: open(path) without encoding= uses locale.getpreferredencoding(). In the containers the same code runs on Linux with UTF-8, so the problem shows only under devstack.
Seen while setting up a Python stack: a seed job read its UTF-8 JSON fixtures as cp1252, every umlaut became mojibake, and the documents failed a downstream quality check. Nothing in the output pointed at the encoding.
Proposal
devstack init, for the Python apps it detects (Django, FastAPI, Flask), writes PYTHONUTF8 = "1" into the service's env (it is harmless on Linux and macOS, where UTF-8 is the default already), with a short comment why.
And/or the stack file reference (or the devstack-config skill) names it as a Windows pitfall for native Python services and jobs.
Activity
feat(init): set PYTHONUTF8=1 for Python services