Help converting buffer to string encoding not matching debug output

I can't seem to get a buffer to convert into a string like the debug node is showing.
My buffer is:

[64,242,199,249,162,6]

The desired string is:

@òÇù¢

The string i'm getting is:

@rGy"

The buffer for the string I'm getting is:

[64,86,69,121,34,6]

I'm using msg.payload = msg.payload.toString("ascii") to convert the buffer and I have tried all the different encoding option I could find. It seems like only certain characters are converting properly.
2023-05-12_10-13-39

try

msg.payload = String.fromCharCode(...msg.payload);
1 Like

Thank you!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.