-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UTF-16 in tests output on Windows #108989
Comments
This message is coming from the C runtime, so we probably don't have any control over how it displays. At a guess, it's writing directly to the console, which is a UTF-16 API, and that's being poorly handled by the GitHub Actions runner that is intercepting the output. Unlikely we can do anything other than report it to Microsoft, and they will likely prioritise it very low as it's a debug-only error message that's usually going to appear in a message box. (Unimportant, but it copies fine for me from the normal view. I guess all the control characters get stripped out, but it's probably a browser difference - I'm on Edge.) |
It's probably an OS difference -- I'm on Linux. Clipboard is UTF-16 on Windows and UTF-8 on Linux. If we cannot do anything with this, close this issue. |
I don't know for sure that we can't do anything, I haven't checked. Remind me to check next week when I might have free time, or if someone else knows for sure they can chime in. |
To decrypt this string in Python, you can use
|
Well. I would suggest closing this issue. The code which logs the assertion error is not under the control of Python. @zooba: Or do you have an idea on how to control how CRT logs such error message? |
I had a look and it tries to output using |
When test crashes, the report about this is written to output encoded in UTF-16 (or UCS2). In other words, ASCII characters are intermixed with null bytes. The problem is that while the browser simply do not show null bytes, so you can read the message, you cannot copy it, because the content of clipboard is truncated at null bytes.
See for example https://github.com/python/cpython/actions/runs/6094370280/job/16535778004#step:5:1112
It was copied from the raw logs view. In normal view you do not see any
�
, but you cannot copy this line past the firstA
.The text was updated successfully, but these errors were encountered: