You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Console.OutputEncoding by default returns a wrong value on Windows Nano Server #42959
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.
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.
Activity
danmoseley commentedon Oct 2, 2020
This just means that
::GetConsoleOutputCP()failed. In such a case we still create and return anEncodingabout 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.