Replies: 1 comment 6 replies
-
Are you perhaps redirecting stdout? As per python docs on sys.stderr, "On Windows, UTF-8 is used for the console device. Non-character devices such as disk files and pipes use the system locale encoding (i.e. the ANSI codepage)." This seems consistent between unfrozen python and a frozen application (made with v5.13.2), at least on my test system; i.e., |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I would need some help to understand a problem I'm facing with stdout encoding as the observed behavior doesn't match my expectation.
I have a console application bundle with pyinstaller v5.13.2. I can't use v6 for compatibility reason. That application print text to the console using
sys.stdout.write("some unicode string")
. This is working well in my staging environment with Windows 10 english version. With additional debugging, I can confirm the stdout encoding is set to utf-8 and errors is set to surrogateescape.But, when deploying the same binary to different Windows environment. The encoding of stdout is not set to utf-8. Instead it it set to cp1252. It might be related to the fact it's a french installation ?
Expected behavior:
Current behavior:
Could someone clarify so I make proper change to the application in order to get it fixed ?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions