@_r_a_l_f_ Ich weiß nicht ob ich eine Lösung habe, weil ich glaube, dass das Problem ist, dass ich nicht wirklich die Originalquelle habe. Vielleicht musst Du den Buffer exportieren.
Ich hab hier trotzdem mal ein function Node - mit dem NodeJS Modul iconv erstellt:
Spoiler
[
{
"id": "67ff42a946daac45",
"type": "inject",
"z": "94499721ca4a903a",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "msgText",
"payload": "Au�entemperatur������� St�rung",
"payloadType": "str",
"x": 370,
"y": 580,
"wires": [
[
"6fbcd04977e304fd"
]
]
},
{
"id": "6fbcd04977e304fd",
"type": "function",
"z": "94499721ca4a903a",
"name": "function 2",
"func": "var Iconv = iconv.Iconv;\nvar conv = new Iconv('CP1250','UTF-8');\n// msg.payload = conv.convert(Buffer.from(msg.payload));\nmsg.payload = conv.convert(msg.payload).toString();\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [
{
"var": "iconv",
"module": "iconv"
}
],
"x": 520,
"y": 580,
"wires": [
[
"7aad120c21e94f8e"
]
]
},
{
"id": "7aad120c21e94f8e",
"type": "debug",
"z": "94499721ca4a903a",
"name": "debug 2",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 680,
"y": 580,
"wires": []
}
]
Du kannst ja mehrere Codepages verwenden, vielleicht funktioniert ja eine.
https://www.npmjs.com/package/iconv
var Iconv = iconv.Iconv;
var conv = new Iconv('CP1250','UTF-8');
// msg.payload = conv.convert(Buffer.from(msg.payload));
msg.payload = conv.convert(msg.payload).toString();
return msg;