-
Notifications
You must be signed in to change notification settings - Fork 513
Characters like "ä/ü/ö" don't get saved right #3010
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
Comments
Please take a look at this doc that we wrote about configuring your editor encoding correctly |
Thank you! It's now solved with windows-1252 encoding! |
Yeah, it would be nice to help users preempt encoding issues, it's just hard to (1) detect that they are issues and (2) hard to notify the user in an appropriate way given that the extension just sits between VSCode (which controls the file encoding) and PowerShell (which controls the parse encoding). Some followup questions:
|
Thank you for caring! Hm that's a good question. I think I would like to get a small notification that contains a link to the docs when you start to type special characters and haven't changed anything in terms of encoding. Or maybe do it like you do with echo and cd. If that's in your code you'll get asked to change it to Write-Host or Set-Location respectively. Hope this helps a little |
Ah interesting. Now that I think about it, I suspect the best way for us to surface this is with a PSScriptAnalyzer rule actually. See PowerShell/PSScriptAnalyzer#1436. |
System Details
Windows 10 Pro 2004
VSCode 1.50.0
[email protected]
System Details Output
Issue Description
When writing characters like ä,ü,ö and saving the file, those characters will become corrupted. If you then open the file in PS IDE you can see it, even though they're still displayed fine in vscode (even after reopening). When replacing them in PS IDE they'll be replaced with � in vscode. Butt executing the script shows that they are set correctly now. I attached 2 powershell documents to show it off, one's been edited with powershell IDE and one with vscode.
Expected Behaviour
Saving the file won't result in ä,ö,ü getting replaced by different characters
Actual Behaviour
'ä' for eg. will be replaced by 'ä' and 'Ä' with 'Ä'. The latter is obviously particularly bad as it hinders your script from running.
Attached Logs
Powershell-Logs.zip
Saved-Scripts.zip
The text was updated successfully, but these errors were encountered: