UCS-2 is a character encoding standard in which characters are represented by a fixed-length 16 bits (2 bytes)

With the encoding known you can decode properly and get the data as expected:

const data = [79, 0, 98, 0, 115, 0, 116, 0, 59, 0, 80, 0, 101, 0, 114, 0, 115, 0, 111, 0, 110, 0, 59, 0]
const dataBuffer = Buffer.from(data)
const utf16Decoder = new TextDecoder('UTF-16')

console.log(utf16Decoder.decode(dataBuffer)) // Obst;Person;

I think it's trying to decode as utf8 by default and getting upset at the unrenderable null bytes between every character:

Answer from Gavin on Stack Overflow
🌐
Bun
bun.com › guides › binary data › buffer to string
Convert a Buffer to a string | Bun Guides
The Buffer class provides a .toString() method that converts a Buffer to a string.
🌐
Toptal
toptal.com › external-blogs › adeva › convert-node-js-buffer-to-string
How to Convert Node.js Buffer to String | Toptal®
May 26, 2026 - The content of a Buffer may be quickly converted to a String using the toString() method:
Discussions

node.js - Javascript - How to convert buffer to a string? - Stack Overflow
Your buffer variable is already a string! ... I am trying to convert that 'string buffer value' from a buffer to a string. More on stackoverflow.com
🌐 stackoverflow.com
July 3, 2019
JS: How to convert ArrayBuffer to string?
Convert it to a Uint8Array, then convert that to a base64 string with btoa: https://stackoverflow.com/questions/9267899/arraybuffer-to-base64-encoded-string More on reddit.com
🌐 r/learnprogramming
1
1
May 2, 2023
How to make std::string to use existing char buffer?
Is there any way that I could get the std::string object to point to the existing address, char array, without it calling new internally? No. But this is the kind of problem C++17's std::string_view was made for. EDIT: Note, with string_view, you can't use methods that alter the internal array like replace. More on reddit.com
🌐 r/cpp_questions
9
5
July 24, 2018
How to convert buffer data to string?
Can you post your data and code? More on reddit.com
🌐 r/node
9
3
December 29, 2020
🌐
Bun
bun.sh › binary data › convert a buffer to a string
Convert a Buffer to a string - Bun
August 4, 2026 - The Buffer class provides a .toString() method that converts a Buffer to a string.
🌐
Medium
medium.com › @ryan_forrester_ › buffer-to-string-in-javascript-how-to-guide-b24027575419
Buffer to String in JavaScript (How To Guide) | by ryan | Medium
January 7, 2025 - The simplest and most common way to convert a buffer to a string in JavaScript is by using the toString method.
🌐
W3Schools
w3schools.com › nodejs › met_buffer_tostring.asp
Node.js buffer toString() Method
The toString() method returns the buffer object according to the specified encoding.
🌐
Daniel Lemire's blog
lemire.me › blog › 2023 › 12 › 08 › fast-buffer-to-string-conversion-in-javascript-with-a-lookup-table
Fast Buffer-to-String conversion in JavaScript with a Lookup Table – Daniel Lemire's blog
December 8, 2023 - If the buffer has length 3, then I have four possible candidate strings (age, ect, rtt, via). I can differentiate them by looking only at the first character. The logic is much the same: case 3: switch (s[0]) { case 97: case 65: // check that the buffer is equal to age and return it if so if ((s[1] == 103 || s[1] == 71) && (s[2] == 101 || s[2] == 69)) { return "age"; } break; case 101:case 69: // check that the buffer is equal to ect and return it if so if ((s[1] == 99 || s[1] == 67) && (s[2] == 116 || s[2] == 84)) { return "ect"; } break; case 114:case 82: // check that the buffer is equal to rtt and return it if so if ((s[1] == 116 || s[1] == 84) && (s[2] == 116 || s[2] == 84)) { return "rtt"; } break; case 118:case 86: // check that the buffer is equal to via and return it if so if ((s[1] == 105 || s[1] == 73) && (s[2] == 97 || s[2] == 65)) { return "via"; } break; default: break; }
Find elsewhere
🌐
Node.js
nodejs.org › api › buffer.html
Buffer | Node.js v26.10.0 Documentation
Node.js also supports the following binary-to-text encodings. For binary-to-text encodings, the naming convention is reversed: Converting a Buffer into a string is typically referred to as encoding, and converting a string into a Buffer as decoding.
🌐
Luart
luart.org › doc › sys › Buffer-conversion.html
Buffer to string conversion
Buffer can be converted to a string using the standard Lua function tostring().
🌐
Educative
educative.io › answers › what-is-the-nodejs-buffertostring-method
What is the Node.js Buffer.toString() method?
In Node.js, the Buffer.toString() method is used to decode or convert a buffer to a string, according to the specified character encoding type.
🌐
Mastering JS
masteringjs.io › tutorials › node › buffer-to-string
Using the Buffer `toString()` Function in Node.js - Mastering JS
August 21, 2020 - By default, toString() converts the buffer to a string using UTF8 encoding.
🌐
Bun
bun.sh › guides › binary data › arraybuffer to string
Convert an ArrayBuffer to a string | Bun Guides
Bun implements the Web-standard TextDecoder class for converting between binary data types and strings.
🌐
Medium
medium.com › hackernoon › https-medium-com-amanhimself-converting-a-buffer-to-json-and-utf8-strings-in-nodejs-2150b1e3de57
Converting a Buffer to JSON and Utf8 Strings in Nodejs | by Aman Mittal | HackerNoon.com | Medium
April 1, 2019 - Also, it by defaults converts to a utf-8 format string. The other way to convert a buffer to a string is using StringDecoder core module from Nodejs API.
🌐
Code Beautify
codebeautify.org › byte-to-string
Best Byte to String Online Converter
Byte to String Converter helps to convert Byte buffer to String, which help users to decode bytes into readable texts with free and easy to use tool.
🌐
Codegive
codegive.com › blog › js_buffer_to_string.php
Mastering js buffer to string (2024): Unlock Data Conversion Secrets & Avoid Common Pitfalls
When we talk about js buffer to string conversion, we mean taking this sequence of bytes and interpreting it as characters in a specific character encoding scheme (e.g., UTF-8, ASCII, Latin1, Base64, Hex). This process transforms the raw binary data into a sequence of characters that can be displayed, parsed, or processed as text. The ability to convert a Buffer to a string is indispensable for several reasons:
🌐
DEV Community
dev.to › kiani0x01 › converting-javascript-buffers-to-strings-2g68
Converting JavaScript Buffers to Strings - DEV Community
July 6, 2025 - The simplest way to convert a Buffer to a string is the built-in toString() method.
🌐
DEV Community
dev.to › melvin2016 › how-to-convert-a-string-to-buffer-and-vice-versa-in-node-js-5op
How to convert a String to Buffer and vice versa in Node.js - DEV Community
September 19, 2020 - The method accepts a valid string as the first argument. ... To convert a Buffer to a String, you can use the toString() in the Buffer object.
🌐
Melvin George
melvingeorge.me › blog › convert-string-buffer-nodejs
How to convert a String to Buffer and vice versa in Node.js | MELVIN GEORGE
September 19, 2020 - // buffer const str = "Hey. this is a string!"; const buff = Buffer.from(str, "utf-8"); // convert buffer to string const resultStr = buff.toString(); console.log(resultStr); //Hey.