Skip to content
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

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

rainersigwald
Copy link
Member

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.

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.
@rainersigwald rainersigwald enabled auto-merge (squash) July 13, 2023 22:25
Copy link
Member

@JanKrivanek JanKrivanek left a 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

@rainersigwald rainersigwald merged commit efc6bcf into dotnet:main Jul 14, 2023
@rainersigwald rainersigwald deleted the ungarble-utf-8-output branch July 14, 2023 08:23
@JanKrivanek
Copy link
Member

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?

@rainersigwald rainersigwald mentioned this pull request Jul 14, 2023
rainersigwald added a commit to rainersigwald/msbuild that referenced this pull request Jul 14, 2023
Preserve the constraint in code as well as in the commit message for dotnet#9035.
@rainersigwald
Copy link
Member Author

rainersigwald commented Jul 14, 2023

Oh - I didn't realize the approve message doesn't block the automerge

Oh, boo, a comment in a file in the PR does block like that.

#9040

rainersigwald added a commit that referenced this pull request Jul 14, 2023
Preserve the constraint in code as well as in the commit message for #9035.
YuliiaKovalova pushed a commit to YuliiaKovalova/msbuild that referenced this pull request Jul 18, 2023
…#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.
YuliiaKovalova pushed a commit to YuliiaKovalova/msbuild that referenced this pull request Jul 18, 2023
Preserve the constraint in code as well as in the commit message for dotnet#9035.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: TerminalLogger doesn't render some special characters
3 participants