Title: Invoke-WebRequest should support -Encoding parameter for default character set · Issue #19226 · PowerShell/PowerShell · GitHub
Open Graph Title: Invoke-WebRequest should support -Encoding parameter for default character set · Issue #19226 · PowerShell/PowerShell
X Title: Invoke-WebRequest should support -Encoding parameter for default character set · Issue #19226 · PowerShell/PowerShell
Description: Summary of the new feature / enhancement This is a follow up to #19156 Other cmdlets use an "-Encoding" parameter, eg Get-Content. It would be nice if this was used for the default encoding character set when the character set is not pre...
Open Graph Description: Summary of the new feature / enhancement This is a follow up to #19156 Other cmdlets use an "-Encoding" parameter, eg Get-Content. It would be nice if this was used for the default encoding charact...
X Description: Summary of the new feature / enhancement This is a follow up to #19156 Other cmdlets use an "-Encoding" parameter, eg Get-Content. It would be nice if this was used for the default encodi...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/19226
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Invoke-WebRequest should support -Encoding parameter for default character set","articleBody":"### Summary of the new feature / enhancement\n\nThis is a follow up to https://github.com/PowerShell/PowerShell/issues/19156\r\n\r\nOther cmdlets use an \"-Encoding\" parameter, eg Get-Content. It would be nice if this was used for the default encoding character set when the character set is not present in the ContentType and the body is some form of string rather than binary. This would be better than treating certain MIME types as somehow special.\n\n### Proposed technical implementation details (optional)\n\nThe Invoke-WebRequest refers to a default character set but it is not clear how this is determined, and the behaviour is different between 7.3.3 and powershell-7.4.0-preview.1\r\n\r\nThe concept is to use the \"-Encoding\" parameter to specify the default character set if it is not present in the MIME type.\r\n\r\nAn example is \"application/json\" is technically a binary encoding so should not have the charset in the ContentType. \r\n\r\nIt would be better to use an explicit \"-Encoding\" parameter than maintain a list of special MIME types that need particular character set encodings.","author":{"url":"https://github.com/rhubarb-geek-nz","@type":"Person","name":"rhubarb-geek-nz"},"datePublished":"2023-02-26T10:46:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":18},"url":"https://github.com/19226/PowerShell/issues/19226"}
| 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:22a68cb3-cda0-4337-b9ec-5bf7ea670735 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B914:2E9211:3DEE36:546A20:6A553BB5 |
| html-safe-nonce | 046b624b238ffab2b9bc7c2c33d2f40b6a595105e4f2782cc9fe5ae63a742229 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTE0OjJFOTIxMTozREVFMzY6NTQ2QTIwOjZBNTUzQkI1IiwidmlzaXRvcl9pZCI6IjM4Njg1MDA3Mjc3NDA4NDA4ODUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5ffa341dbebf5c05b33f1e345294d1757a6e138a4451eb51a916e7327c11fdd5 |
| hovercard-subject-tag | issue:1600009205 |
| 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/PowerShell/19226/issue_layout |
| twitter:image | https://opengraph.githubassets.com/59a17108b7fd8fca477477b5cfea835faae172b06c32b3c8d859a01e6bb91e44/PowerShell/PowerShell/issues/19226 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/59a17108b7fd8fca477477b5cfea835faae172b06c32b3c8d859a01e6bb91e44/PowerShell/PowerShell/issues/19226 |
| og:image:alt | Summary of the new feature / enhancement This is a follow up to #19156 Other cmdlets use an "-Encoding" parameter, eg Get-Content. It would be nice if this was used for the default encoding charact... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rhubarb-geek-nz |
| hostname | github.com |
| expected-hostname | github.com |
| None | fbd8fce4d63ac394c5405faa20aa50d5c9e56b979ac43ee1b26f8e7c47c4cd89 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| 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 | 811f50b757204c6a1b4da0ea780075b3e1cc9e57 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width