Setting explicit locale in Endpoint

Not sure this can be fixed from the PU side or if it’s just fundamental powershell’ish

When using Powerhsll 5.1 to get data from an Endpoint, it seems that charset ISO-8859-1 is implied rather than UTF-8, unless it’s explicitly set in the HttpWebresponse-object.

Using Powershell 7, UTF-8 is correctly used. There are ugly hacks on the clientside to convert this, but I’m asking if its possible to set on the server-side in New-PSUEndpoint so no hack is needed on the clientside (making oneliners with invoke-restmethod is possible)

I’ve tried adding charset=utf-8 in the header but its a no go.
Also tried switching between 5.1 and 7 on the PU-server with

Set-PSUSetting -ApiEnvironment '7.1'

Below snippets reproduces the scenario

New-PSUEndpoint -Url "/rest_test" -Endpoint {

Response in 5.1:

Förnamn Tårta
-------- ------
Ãrjan   Räka

Response in 7.1

Förnamn Tårta
------- -----
Örjan   Räka 
Product: PowerShell Universal
Version: 1.5.14