Characters in Powershell not matching characters defined in theme #4274
|
Hi everybody, I recently setup Powershell 7 in Windows Terminal to use oh-my-posh and the FiraCode nerd font. After the initial setup everything looked fine. After serveral reboots my console suddenly looks like this: Versions:
The behavior is the same in Powershell 7 and 5 and in Windows Terminal and the standard windows console host. Windows Terminal is using the correct Font in the settings. It seems that oh-my-posh is displaying the wrong unicode character. The first symbol should be \ue0b6 but is \u00af. Any ideas? I am lost 😁. For Ref, here is the unicode string of my console prompt: ¯é Jan ¯é░¯é░ ¯¬â dev ¯é░¯é░ ¯«ó 35msÔáǯé░ ¯ê║ ¯é┤ ¯é ´Æë pwsh ¯é▓¯é▓ ¯ê» 100´èò ¯é▓¯é▓ 10:26:54 ¯é┤ |
Replies: 1 comment 1 reply
|
The encoding in your device/terminal/shell is wrong. You can try the same fix as indicated here. |

Hi Jan, thanks for your answer, I managed to figure it out, my powershell was running in constrained language mode which probably messed with the initialization of oh-my-posh. By changing the environment variable (__PSLockdownPolicy) from 4 (restrained) to 8 (full language) everything looks good again.
Really cool tool by the way, thank you very much for the effort :).