GeezerVison is showing developer.mozilla.org — TextDecoderStream: encoding property - Web APIs | MDN
TextDecoderStream: encoding property
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2022.
The encoding read-only property of the TextDecoderStream interface returns a string containing the name of the encoding algorithm used by the specific decoder.
The encoding is set by the constructor label parameter, and defaults to utf-8.
Returning the value of encoding from a TextDecoderStream.
js
stream = new TextDecoderStream();
console.log(stream.encoding); // returns the default "utf-8"