-
Notifications
You must be signed in to change notification settings - Fork 22.5k
/
index.md
36 lines (25 loc) · 1.06 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
title: Encoding API
slug: Web/API/Encoding_API
page-type: web-api-overview
browser-compat:
- api.TextDecoder
- api.TextEncoder
- api.TextEncoderStream
- api.TextDecoderStream
---
{{DefaultAPISidebar("Encoding API")}} {{AvailableInWorkers}}
The **Encoding API** provides a mechanism for handling text in various {{Glossary("character encoding", "character encodings")}}, including legacy non-{{Glossary("UTF-8")}} encodings.
The API provides four interfaces: {{domxref("TextDecoder")}}, {{domxref("TextEncoder")}}, {{domxref("TextDecoderStream")}} and {{domxref("TextEncoderStream")}}.
## Interfaces
- {{DOMxRef("TextDecoder")}}
- {{DOMxRef("TextEncoder")}}
- {{DOMxRef("TextDecoderStream")}}
- {{DOMxRef("TextEncoderStream")}}
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}
## See also
- [Encoding API Encodings](/en-US/docs/Web/API/Encoding_API/Encodings) - Encodings that must be supported for decoding text.
- A [polyfill](https://github.com/inexorabletash/text-encoding) allowing to use this interface in browsers that don't support it