I've realised I can't type some non-ASCII characters in the PowerShell console, all of which work fine in good old cmd.exe and should be supported by the code pages involved (it's a Spanish Windows edition with Spanish as only keyboard layout):

  • If I type it prints ?. When I hit enter I can see a normally looking euro sign in the error message:

    Test with '€'

  • If I type Á it doesn't print anything at all but I can print á just fine. Similarly, I can type lowercase ñ but not uppercase Ñ.

    Test with 'Á' and <code>á</code>

  • Interestingly, if I use clipboard to paste those chars I can see some of them:


I happens in every Windows 10 PCs I've tried, with every TTF font I've tried.

Console code page is 850:

Current code page

Both [System.Console]::InputEncoding and [System.Console]::OutputEncoding show the same output:

IsSingleByte      : True
BodyName          : ibm850
EncodingName      : Europa occidental (DOS)
HeaderName        : ibm850
WebName           : ibm850
WindowsCodePage   : 1252
IsBrowserDisplay  : False
IsBrowserSave     : False
IsMailNewsDisplay : False
IsMailNewsSave    : False
EncoderFallback   : System.Text.InternalEncoderBestFitFallback
DecoderFallback   : System.Text.InternalDecoderBestFitFallback
IsReadOnly        : True
CodePage          : 850

Any idea of where to start looking?

  • What about $OutputEncoding, [System.Console]::OutputEncoding and [System.Console]::InputEncoding? – JosefZ Dec 3 at 20:00
  • @JosefZ I've edited the question. – Álvaro González Dec 4 at 7:05
  • Maybe $OutputEncoding shows CodePage: 20127 (us-ascii)? Try changing it as $OutputEncoding = [System.Console]::OutputEncoding. – JosefZ Dec 4 at 17:47
  • @JosefZ You're right about the first part, it shows US-ASCII (is that meant to be the default?). But changing it to match [System.Console]::OutputEncoding doesn't change anything and there doesn't seem to be a similarly named $InputEncoding. – Álvaro González Dec 4 at 17:52
  • I've had the chance of testing in a Windows Server 2012 machine via Remote Desktop and Á can be typed but cannot. I have a strong feeling that it has never really worked at 100% but I didn't notice until I tried to set my full name in git credentials. Oh well... – Álvaro González 2 days ago

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.