Powershell Terminal encoding in VSCode

Viewed 3277

I am using VSCode editor for Powershell scripts. And I have the problem with paths, which contains cyrillic characters. For example code:

$users = 'C:\Users\Тестовый пользователь\Documents\userlist.csv'
foreach ($user in $users) {
    $u = Get-Content -LiteralPath $users
    Write-Host "Пользователь:" $u
}

return the error:

Cannot find path 'C:\Users\Ниармедк\Documents\userlist.csv"' because it does not exist.

1 Answers
Related