Title: Convert weird chars into their proper version · Issue #1089 · PowerShell/PSScriptAnalyzer · GitHub
Open Graph Title: Convert weird chars into their proper version · Issue #1089 · PowerShell/PSScriptAnalyzer
X Title: Convert weird chars into their proper version · Issue #1089 · PowerShell/PSScriptAnalyzer
Description: Summary of the new feature I saw this reddit thread https://www.reddit.com/r/PowerShell/comments/9rlj00/why_does_visualstudio_code_keep_borking_my_scripts/ and it reminded me having those problems as well. Basically when you copy/paste c...
Open Graph Description: Summary of the new feature I saw this reddit thread https://www.reddit.com/r/PowerShell/comments/9rlj00/why_does_visualstudio_code_keep_borking_my_scripts/ and it reminded me having those problems ...
X Description: Summary of the new feature I saw this reddit thread https://www.reddit.com/r/PowerShell/comments/9rlj00/why_does_visualstudio_code_keep_borking_my_scripts/ and it reminded me having those problems ...
Opengraph URL: https://github.com/PowerShell/PSScriptAnalyzer/issues/1089
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Convert weird chars into their proper version","articleBody":"**Summary of the new feature**\r\n\r\nI saw this reddit thread https://www.reddit.com/r/PowerShell/comments/9rlj00/why_does_visualstudio_code_keep_borking_my_scripts/ and it reminded me having those problems as well. Basically when you copy/paste code from different websites it looks good but chars like `-` or `'` or `\"` often have weird version of it and it looks like gibberish after you run it.\r\n\r\nOn website:\r\n```powershell\r\nSet-ADUser $user –replace @{EmployeeType=”$newemployeetype”} -WhatIf\r\n```\r\n\r\nWhen pasted it looks almost the same...\r\n\r\nBut when run I often see complains and output displays this:\r\n```powershell\r\nSet-ADUser $user –replace @{EmployeeType=â€$newemployeetypeâ€} -WhatIf\r\n```\r\n\r\nIt's also visible when you do something in Word (I know I know), Outlook or other software like that. \r\n\r\nIn word:\r\n\r\n\r\n\r\nAfter paste\r\n\r\n\r\n\r\nAfter run:\r\n\r\n\r\n\r\nThis is related to how polish languages treats double quotes. But I am sure it's similar on a lot of websites, wrong templates, old outdated Microsoft resource websites?\r\n\r\nAlso right now VSCode doesn't regognize this as a problem until it's too late. Normally on errors it would show \"red\" file but here.. everything is great. \r\n\r\n\r\n\r\nAs opposed to:\r\n\r\n\r\n\r\n\r\n**Proposed technical implementation details (optional)**\r\n\r\nI had this conversation with @tylerl0706 on twitter: https://twitter.com/TylerLeonhardt/status/1055859999086235648 and one of proposed implementations was to utilize format on paste, format on save, format on... where it would magically replace those weird chars into their equivalent versions. \r\n\r\n\r\n","author":{"url":"https://github.com/PrzemyslawKlys","@type":"Person","name":"PrzemyslawKlys"},"datePublished":"2018-10-26T18:21:39Z","url":"https://github.com/PowerShell/PSScriptAnalyzer/issues/1089"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2758b5dc-162d-2cee-e05b-03a33e2755c1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ED7E:2B73A8:8F0F39:C95F20:6AFE1B66 |
| html-safe-nonce | 238964915b7ff79e44a19c063949e3f6a6031edf7fdc2323862ef56394f735e4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDdFOjJCNzNBODo4RjBGMzk6Qzk1RjIwOjZBRkUxQjY2IiwidmlzaXRvcl9pZCI6IjU4NDMyMjQ5OTQyMTcwNzM1MTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7ad8d29bbdd926d397f0c4ddb0949384296eb5d04b42c6bebe5cec127a6c6808 |
| hovercard-subject-tag | issue:374495079 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PSScriptAnalyzer/1089/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f8f40876d449401da3cd493ac50827a9d4d9fe691cdd77c247c351fa9b222b15/PowerShell/PSScriptAnalyzer/issues/1089 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f8f40876d449401da3cd493ac50827a9d4d9fe691cdd77c247c351fa9b222b15/PowerShell/PSScriptAnalyzer/issues/1089 |
| og:image:alt | Summary of the new feature I saw this reddit thread https://www.reddit.com/r/PowerShell/comments/9rlj00/why_does_visualstudio_code_keep_borking_my_scripts/ and it reminded me having those problems ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | PrzemyslawKlys |
| hostname | github.com |
| expected-hostname | github.com |
| None | d0525ab1464526bf4532a5551aa348cf100dff75ef808a96fc67a08b1d946aa9 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PSScriptAnalyzer git https://github.com/PowerShell/PSScriptAnalyzer.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 33149177 |
| octolytics-dimension-repository_nwo | PowerShell/PSScriptAnalyzer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 33149177 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PSScriptAnalyzer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | fef3993a71fa20f7be8e167132fbf9619bc66e12 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width