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:

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.
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
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
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
How to convert buffer data to string?
Can you post your data and code? More on reddit.com
01:54
StringBuffer (Technique of the Week) - YouTube
00:58
Buffer toString method to print the buffer values using Nodejs ...
Using the Java StringBuffer class - YouTube
16:40
Difference Between String, String Buffer and String Builder ...
14:40
String, String Buffer & String Builder in Java (Tutorial #6) - YouTube
38:26
StringBuffer Class & Methods in Java with Example - YouTube
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.
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; }
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.
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:
Top answer 1 of 4
13
Automatically converted when concatenated with an empty string:
console.log('' + bufferOne)
2 of 4
8
No native way for that, but I wrote a sample method for you:
function bufferFromBufferString(bufferStr) {
return Buffer.from(
bufferStr
.replace(/[<>]/g, '') // remove < > symbols from str
.split(' ') // create an array splitting it by space
.slice(1) // remove Buffer word from an array
.reduce((acc, val) =>
acc.concat(parseInt(val, 16)), []) // convert all strings of numbers to hex numbers
)
}
result:
const newBuffer = bufferFromBufferString('<Buffer 54 68 69 73 20 69 73 20 61 20 62 75 66 66 65 72 20 65 78 61 6d 70 6c 65 2e>')
> newBuffer
<Buffer 54 68 69 73 20 69 73 20 61 20 62 75 66 66 65 72 20 65 78 61 6d 70 6c 65 2e>
> newBuffer.toString()
'This is a buffer example.'