I am using cmder
console with powershell
and creating a custom prompt. So I creae a task that looks like this:
*PowerShell -ExecutionPolicy Bypass -NoLogo -NoExit -new_console:d:"%USERPROFILE%"
Now inside Microsoft.PowerShell_profile.ps1
I create a prompt that looks like:
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
function prompt
{
Write-Host "➜" -nonewline -foregroundcolor Magenta
}
Now the prompt outputs:
âžœPS>
So my ➜
is not outputting correct. So I copy
âžœPS>function prompt { Write-Host "➜" -nonewline -foregroundcolor Magenta }
and paste it right into cmder
prompt and now the prompt outputs
➜PS>
as it should. How can I get cmder
to output UTF8
at the command prompt when putting it in Microsoft.PowerShell_profile.ps1
?