none
GB Pound sign in Powershell RRS feed

Answers

  • You asked how to enter a symbol not how to display a file.  The file must be in an encoding and character set that is supported by your PS outpu encoding.

    Save notepad in UTF-16LE and it will display correctly.

    Or

    Get file with correct encoding.

    Get-Content file -Encoding UTF8


    \_(ツ)_/

    • Marked as answer by FlyingFred Wednesday, January 22, 2020 10:43 AM
    Thursday, January 16, 2020 12:08 PM

All replies

  • Use the alt key and keypad to enter extended symbols.

    ALT+0163


    \_(ツ)_/

    Thursday, January 16, 2020 11:20 AM
  • I've managed to get Powershell to recognise my keyboard by adding -Command "chcp 1252" to the shortcut. However I've got a script that displays £. Notepad shows a £, Powershell ISE shows a £, Powershell displays a little box.
    Thursday, January 16, 2020 11:49 AM
  • You asked how to enter a symbol not how to display a file.  The file must be in an encoding and character set that is supported by your PS outpu encoding.

    Save notepad in UTF-16LE and it will display correctly.

    Or

    Get file with correct encoding.

    Get-Content file -Encoding UTF8


    \_(ツ)_/

    • Marked as answer by FlyingFred Wednesday, January 22, 2020 10:43 AM
    Thursday, January 16, 2020 12:08 PM
  • You asked how to enter a symbol not how to display a file.  The file must be in an encoding and character set that is supported by your PS outpu encoding.

    Save notepad in UTF-16LE and it will display correctly.

    Or

    Get file with correct encoding.

    Get-Content file -Encoding UTF8


    \_(ツ)_/

    Thanks, that pointed me in the right direction. I ended up creating an empty file in notepad and copying the contents from the old file into it.
    Wednesday, January 22, 2020 10:45 AM