Encoding API
Experimental: Esta é uma tecnologia experimental
Verifique a tabela de compatibilidade entre Navegadores cuidadosamente antes de usar essa funcionalidade em produção.
O Encoding API providência uma mecânismo para tratar textos em vários tipos de encode de caracteres, incluindo encodes legados non-UTF-8
A API provém de quatro interfaces: TextDecoder
, TextEncoder
, TextDecoderStream
e TextEncoderStream
.
Interfaces
Tutoriais & ferramentas
- O shim permite usar essa interface em navegadores que não a suportam.
StringView
– Um C-like reperesentação de strings baseados em arrays tipados
Especificações
Specification |
---|
Encoding # interface-textdecoder |
Encoding # interface-textencoder |
Encoding # interface-textencoderstream |
Encoding # interface-textdecoderstream |
Compatibilidade com navegadores
api.TextDecoder
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
TextDecoder | ||||||||||||||
TextDecoder() constructor | ||||||||||||||
decode | ||||||||||||||
encoding | ||||||||||||||
fatal | ||||||||||||||
ignoreBOM | ||||||||||||||
Available in workers |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Partial support
- Partial support
- See implementation notes.
- Has more compatibility info.
api.TextEncoder
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
TextEncoder | ||||||||||||||
TextEncoder() constructor | ||||||||||||||
encode | ||||||||||||||
encodeInto | ||||||||||||||
encoding | ||||||||||||||
Available in workers |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Partial support
- Partial support
- Has more compatibility info.
api.TextEncoderStream
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
TextEncoderStream | ||||||||||||||
TextEncoderStream() constructor | ||||||||||||||
encoding | ||||||||||||||
readable | ||||||||||||||
writable |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Partial support
- Partial support
- Has more compatibility info.
api.TextDecoderStream
Report problems with this compatibility data on GitHubLegend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Partial support
- Partial support
- Has more compatibility info.