1. 面向开发者的 Web 技术
  2. Web API
  3. TextEncoderStream

此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in English Always switch to English

TextEncoderStream

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨2022年9月⁩.

Encoding APITextEncoderStream 接口将一个字符串流转换为 UTF-8 编码的字节。它与 TextEncoder 的流形式等价。

构造函数

TextEncoderStream()

创建一个新的 TextEncoderStream 对象。

属性

TextEncoderStream.encoding 只读

总是返回"utf-8"。

TextEncoderStream.readable 只读

返回此对象控制的 ReadableStream 实例。

TextEncoderStream.writable 只读

返回此对象控制的 WritableStream 实例。

示例

规范

Specification
Encoding
# interface-textencoderstream

浏览器兼容性

参见

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.

AltStyle によって変換されたページ (->オリジナル) /