TextEncoderStream: encoding プロパティ
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.
encoding
は TextEncoderStream
インターフェイスの読み取り専用プロパティで、現在の TextEncoderStream
オブジェクトが使用するエンコーディングアルゴリズムの名前が入った文字列を返します。
値
utf-8
のエンコードされたデータが入った文字列です。
例
以下の例は、TextEncoderStream
オブジェクトが encoding
を返す方法を示しています。
js
stream = new TextEncoderStream();
console.log(stream.encoding);
仕様書
Specification |
---|
Encoding # dom-textencoder-encoding |