Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux. The console crashes if you use functions and the script is in a folder in Cyrillic. #1306

Closed
themaximax opened this issue Apr 30, 2018 · 4 comments

Comments

@themaximax
Copy link

Description of the problem
If the script is in the folder with the folder name in Cyrillic, the powershell console stops working, and the functions should be used in the script.

If the script is written without functions, then the integrated console works fine. Also, the integrated console works if there is no Cyrillic in the location path, regardless of whether it contains functions or not.

I attach 2 logs, one with an error (in a folder in Cyrillic), the second without an error (a folder in Latin).

My system
Visual Studio Code v1.22.2 64-bit
PowerShell Extension v1.7.0
Operating System: Ubuntu Linux 16.04 64-bit

logs.zip

@themaximax themaximax changed the title Linux. Throws out the console if you use the functions and the script is in a folder in Cyrillic. Linux. The console crashes if you use functions and the script is in a folder in Cyrillic. Apr 30, 2018
@TylerLeonhardt
Copy link
Member

Thanks for the report! We'll look into it.

@TylerLeonhardt
Copy link
Member

Can someone with this issue give this workaround a try that @mklement0 supplied:

$OutputEncoding = [console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding

@mklement0
Copy link
Contributor

@tylerl0706:

Actually, on Unix-like platforms there is no need for this workaround, as these are the default values there.

I can confirm that the issue still exists in VSCode 1.25.0 / PowerShell extension 1.7.0 and that it is indeed - curiously - tied to whether the script file contains at least 1 function definition or not (the encoding of the script doesn't seem to matter).

@rjmholt
Copy link
Contributor

rjmholt commented Sep 29, 2018

@themaximax I believe we have fixed this in the most recent release: #1513.

Please re-open if you see the issue recur in 1.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants