Displaying special characters in PowerShell

This topic contains 5 replies, has 2 voices, and was last updated by  Don Jones 2 years, 4 months ago.

  • Author
    Posts
  • #27757

    Vince Panuccio
    Participant

    I have tried setting different fonts and code pages in PowerShell but I cannot get the following characters to display.

    $bars = [Char[]] '_', '▂', '▃', '▄' ,'▅', '▆', '▇','█'

    The characers belong to the MS Gothic font set but setting PowerShell to use this (rather ugly) font still did not render correctly and instead displayed small hollow squares.

    Any help would be appreciated 🙂

  • #27758

    Don Jones
    Keymaster

    The PowerShell console can't display extended characters from double-byte character sets. The console app dates from the mid-80s.

  • #27789

    Vince Panuccio
    Participant

    That's a shame. I didn't know PowerShell was developed in the 80's.

    Why is it that Bash (a much older technology) can do this? https://github.com/holman/spark

  • #27791

    Don Jones
    Keymaster

    Ugh. What did I write? The console host was written then, which is why the PowerShell team wrote the ISE for v2. If you can't contribute positively to the conversation, at least don't troll.

  • #27799

    Vince Panuccio
    Participant

    I'm not trolling, just a bit of sarcasm.

    You should modify the rules of engagement to include "NO SARCASM".

  • #27803

    Don Jones
    Keymaster

    Roger.

You must be logged in to reply to this topic.