Hiya! I'm trying to make my own Powershell prompt.
For some reason I cannot seem to make unicode appear in the prompt.
Currently I have:
fastfetch
fastfetch
$time = $(get-date -f "HH:mm")
$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8'
$PSDefaultParameterValues['Get-Content:Encoding'] = 'utf8'
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
$OutputEncoding = [System.Text.Encoding]::Unicode
function Prompt {
"$Env:UserName $(Get-Location) ►"
}
}```
Bare in mind I am using neovim to edit the file.
The weird thing is, when the function is run within the terminal, it's fine, it displays the unicode.
However when it's saved within the ps1 file, it looks like this:
```stell C:\Users\stell â–º```
(I am trying to avoid using Oh My Posh)
When it's run through the terminal(Wtf):