API reference › @evolu/common › Bytes › decodeString

function decodeString(buffer: Buffer): string;

Defined in: packages/common/src/Bytes.ts:546

Decodes a length-prefixed UTF-8 string.

Invalid UTF-8 decodes as U+FFFD instead of throwing. A leading U+FEFF is kept. Decoders in @evolu/common 8.17 and earlier drop it, so such peers still store a string that starts with it without the mark.