ich folgende Anfrage zu tun (mit Anfrage/Anfrage) gegen einen Web-Service:Node.js Anfrage dreht Umlaute
return request.postAsync({
url,
charset: 'Cp1252', // I also tried utf-8
encoding: null, //
// I also tried Cp1252 -> unknown encoding,
// I also tried utf-8 and nothing at all
headers: {
"Accept": "application/octet-stream, text, text/plain, text/xml",
"Accept-Encoding": "UTF-8",
'Content-Type': "text/plain; charset=Cp1252;", // also tried utf-8, ISO-8859-1
"User-Agent": "me"
}
}).spread((res, body) => {
body = body.toString(); // I also tried without toString();
let ws = fs.createWriteStream('hhh.csv');
ws.write(body);
ws.end();
Was ich auch tue, Umlaute in �
gedreht werden.
Das sind die Header der Web-Service sendet:
'content-type': 'text; charset=Cp1252',
'content-length': '1895980',
vary: 'Accept-Encoding,User-Agent'
ich das überhaupt ohne Glück für Tage bin versucht. Was mache ich falsch?
Hier ist eine Liste von Fragen/Antworten, die nicht mein Problem so weit lösen:
- Umlauts broken when doing get request
- Problems making http-post requests with German umlauts (ä ö ü) or special chars (ß) with Node.js
- Send umlauts from Node.js to iOS
- Automatic UTF-8 encoding in Node.js HTTP client
- Custom HTTP header value - trying to pass umlaut characters
- How to get UTF-8 in Node.js?
- How to get i18next-node to display umlauts the right way?
- How do I URl encode something in Node.js?
Kann es sein, dass eine der folgenden verursacht meine Eingabezeichenfolge nicht UTF-8 sein?
let hash = crypto.createHmac("sha256", this.options.Signer);
this.query['Signature'] = hash.update(stringToSign).digest("base64");
signer ist eine Zeichenfolge enthält 0-9
, a-z
, A-Z
, +
und /
.
this.query['Signature']
ist Teil der URL.
Was sind die genauen Zeichen, die Sie senden? Wie sind sie derzeit codiert und was ist der aktuelle Zeichensatz für sie? – zerkms
An der Stelle wo der Umlaut "noch" umlaut ist. – zerkms
"node js request macht Umlaute zu " "Was auch immer ich mache, Umlaute werden zu ." --- Was bedeuten diese Sätze dann? – zerkms