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

Console.OutputEncoding by default returns a wrong value on Windows Nano Server #42959

Closed
Tracked by #64487
ViktorHofer opened this issue Oct 1, 2020 · 4 comments
Closed
Tracked by #64487
Labels
area-System.Console backlog-cleanup-candidate An inactive issue that has been marked for automated closure. bug no-recent-activity os-windows-nano Nano Windows SKU
Milestone

Comments

@ViktorHofer
Copy link
Member

Encoding curEncoding = Console.OutputEncoding;

On Windows Nano Server curEncoding.EncodingName is "Codepage - 0" which looks like a default value. This might be a product issue where the Encoding can't be retrieved when pinvoking.

cc @eiriktsarpalis

@ViktorHofer ViktorHofer added bug os-windows-nano Nano Windows SKU labels Oct 1, 2020
@ViktorHofer ViktorHofer added this to the 6.0.0 milestone Oct 1, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.Console untriaged New issue has not been triaged by the area owner labels Oct 1, 2020
@ghost
Copy link

ghost commented Oct 1, 2020

Tagging subscribers to this area: @eiriktsarpalis, @jeffhandley
See info in area-owners.md if you want to be subscribed.

@jeffschwMSFT jeffschwMSFT removed the untriaged New issue has not been triaged by the area owner label Oct 1, 2020
@danmoseley
Copy link
Member

This just means that ::GetConsoleOutputCP() failed. In such a case we still create and return an Encoding about a nonexistent codepage 0. (We did this in .NET Framework too so I am not sure whether it would be a good idea to change it to throw instead.)

I am guessing this API is just stubbed out on Nano and perhaps we should just leave the code as is.

@adamsitnik adamsitnik modified the milestones: 6.0.0, 7.0.0 Jul 26, 2021
@jeffhandley jeffhandley added the backlog-cleanup-candidate An inactive issue that has been marked for automated closure. label Jul 9, 2022
@ghost
Copy link

ghost commented Jul 9, 2022

Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.

This process is part of our issue cleanup automation.

@jeffhandley jeffhandley modified the milestones: 7.0.0, Future Jul 9, 2022
@ghost ghost added the no-recent-activity label Jul 9, 2022
@ghost
Copy link

ghost commented Jul 23, 2022

This issue will now be closed since it had been marked no-recent-activity but received no further activity in the past 14 days. It is still possible to reopen or comment on the issue, but please note that the issue will be locked if it remains inactive for another 30 days.

@ghost ghost closed this as completed Jul 23, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Aug 22, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Console backlog-cleanup-candidate An inactive issue that has been marked for automated closure. bug no-recent-activity os-windows-nano Nano Windows SKU
Projects
None yet
Development

No branches or pull requests

6 participants