Repository navigation
Invoke-WebRequest does not support UTF-8 (СКУД) #5528
Copy link
Copy link
Closed
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-AnsweredThe question is answered.The question is answered.WG-Cmdletsgeneral cmdlet issuesgeneral cmdlet issues
Description
Activity
Oliver Lipkau (@lipkau) Have you reproduced this issue in 6.0.0-rc? This repository is for PowerShell Core issues. if you have an issue with Windows PowerShell 5.1, please use the UserVoice.
- addedIssue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a
on Nov 22, 2017 Yes... I am waiting on Joel Bennett (@Jaykul) for the
$PSVersionTable(he tested it for me)VersionTable updated
Since this issue has some non-latin characters in it and is accessible via an API that returns application/json the following should be an equivalent repro:
$response = Invoke-WebRequest 'https://api.github.com/repos/PowerShell/PowerShell/issues/5528' Set-Content -Value $response.Content -Path c:\temp\export.txt -Encoding UTF8 -force
When I do that, I see
Схема СКУДin the file.Are you sure that 1) the API you are working with is actually returning UTF8 encoding and 2) the body of that content is actually encoded in utf8?
$response.BaseResponse.Content.Headers.ContentType.CharSetThis seems to be a Confluence API problem.
Closing this issue.- changed the title
[-]Invoke-WebRequest does not support UTF-8[/-][+]Invoke-WebRequest does not support UTF-8 (СКУД)[/+]on Nov 22, 2017 - addedResolution-AnsweredThe question is answered.The question is answered.
on Dec 1, 2017 - addedWG-Cmdletsgeneral cmdlet issuesgeneral cmdlet issuesand removed
on Jul 17, 2026
Metadata
Metadata
Assignees
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-AnsweredThe question is answered.The question is answered.WG-Cmdletsgeneral cmdlet issuesgeneral cmdlet issues
@## Steps to reproduce
Assuming you have a URI that returns json and contains a non-Latin char
My sample is a Confluence wiki page which I am requesting with REST
Expected behavior
Invoke-WebRequestis able to write the file with full support of the unicode chars of the source.In this example:
Схема СКУДActual behavior
The REST call should return a json like this:
instead, the content of
c:\temp\export.txt(see example ebove) contains:Environment data