You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the content is non-ascii this causes characters to be converted to '???'
Expected behavior
Non-ascii characters in the response body remain unchanged
Actual behavior
Non-ascii characters become '???'
Error details
Environment data
Name Value
---------
PSVersion 7.6.0
PSEdition Core
GitCommitId 7.6.0
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0,2.0,3.0,4.0…}
PSRemotingProtocolVersion 2.4
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Prerequisites
Steps to reproduce
When you call .ToString() on a response from Invoke-WebRequest the code here assumes ascii in the content body
https://github.com/PowerShell/PowerShell/blob/45a80d9a4894802a61637cc7c8843bc66b0bcc5d/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebResponseObject.Common.cs#L187C13-L187C69
If the content is non-ascii this causes characters to be converted to '???'
Expected behavior
Non-ascii characters in the response body remain unchangedActual behavior
Non-ascii characters become '???'Error details
Environment data
Visuals
No response