-
Notifications
You must be signed in to change notification settings - Fork 1.4k
TerminalLogger: Store output writer after setting it to UTF-8 #9035
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
TerminalLogger: Store output writer after setting it to UTF-8 #9035
Conversation
Fixes dotnet#9030 by capturing the stdout writer only _after_ setting the console encoding to support Unicode. The Console encoding setter works by discarding its internal writer and creating a new one with the new encoding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
Approving, but I have strong opinion that the PR description absolutely has to be a code comment above the Output
initialization line - otherwise some unintentional refactoring can regress this in the future
Oh - I didn't realize the approve message doesn't block the automerge :-/ (noted for self for the future) @rainersigwald - can you still consider adding the explicit comment to the code? |
Preserve the constraint in code as well as in the commit message for dotnet#9035.
Oh, boo, a comment in a file in the PR does block like that. |
…#9035) Fixes dotnet#9030 by capturing the stdout writer only _after_ setting the console encoding to support Unicode. The Console encoding setter works by discarding its internal writer and creating a new one with the new encoding.
Preserve the constraint in code as well as in the commit message for dotnet#9035.
Fixes #9030 by capturing the stdout writer only after setting the console encoding to support Unicode. The Console encoding setter works by discarding its internal writer and creating a new one with the new encoding.