Encoding API

Cette fonction est expérimentale
Puisque cette fonction est toujours en développement dans certains navigateurs, veuillez consulter le tableau de compatibilité pour les préfixes à utiliser selon les navigateurs.
Il convient de noter qu'une fonctionnalité expérimentale peut voir sa syntaxe ou son comportement modifié dans le futur en fonction des évolutions de la spécification.

L'API Encoding fournit un mecanisme de traitement de texte dans plusieurs character encodings, incluant les encodings non-UTF-8.

L'API fournit quatres interfaces: TextDecoder, TextEncoderTextDecoderStream et TextEncoderStream.

Interfaces

Tutoriels & Outils

  • Un shim permettant d'utiliser cette interface dans les navigateurs ne le supportant pas.
  • StringView – une représentation de type C des chaînes basée sur des tableaux typés.

Caracteristiques

Caracteristiques Statut Commentaire
Encoding Standard évolutif Définition initiale.

Compatibilité

TextDecoder

Update compatibility data on GitHub
OrdinateurMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariWebview AndroidChrome pour AndroidFirefox pour AndroidOpera pour AndroidSafari sur iOSSamsung Internet
TextDecoderChrome Support complet 38Edge ? Firefox Support complet 19
Support complet 19
Support partiel 18
Notes
Notes Implemented a slightly different version of the spec.
IE Aucun support NonOpera Support complet 25Safari Support complet 10.1WebView Android Support complet 38Chrome Android Support complet 38Firefox Android Support complet 19
Support complet 19
Support partiel 18
Notes
Notes Implemented a slightly different version of the spec.
Opera Android Support complet OuiSafari iOS Support complet 10.1Samsung Internet Android Support complet Oui
TextDecoder() constructorChrome Support complet 38Edge ? Firefox Support complet 19
Support complet 19
Support partiel 18
Notes
Notes Implemented a slightly different version of the spec.
IE Aucun support NonOpera Support complet 25Safari Support complet 10.1WebView Android Support complet 38Chrome Android Support complet 38Firefox Android Support complet 19
Support complet 19
Support partiel 18
Notes
Notes Implemented a slightly different version of the spec.
Opera Android ? Safari iOS Support complet 10.1Samsung Internet Android ?
decodeChrome Support complet 38Edge ? Firefox Support complet 19
Support complet 19
Support partiel 18
Notes
Notes Implemented a slightly different version of the spec.
IE Aucun support NonOpera Support complet 25Safari Support complet 10.1WebView Android Support complet 38Chrome Android Support complet 38Firefox Android Support complet 19
Support complet 19
Support partiel 18
Notes
Notes Implemented a slightly different version of the spec.
Opera Android Support complet OuiSafari iOS Support complet 10.1Samsung Internet Android Support complet Oui
encodingChrome Support complet 38Edge ? Firefox Support complet 19
Support complet 19
Support partiel 18
Notes
Notes Implemented a slightly different version of the spec.
IE Aucun support NonOpera Support complet 25Safari Support complet 10.1WebView Android Support complet 38Chrome Android Support complet 38Firefox Android Support complet 19
Support complet 19
Support partiel 18
Notes
Notes Implemented a slightly different version of the spec.
Opera Android Support complet OuiSafari iOS Support complet 10.1Samsung Internet Android Support complet Oui
fatalChrome Support complet OuiEdge ? Firefox Support complet OuiIE Aucun support NonOpera Support complet OuiSafari Support complet 10.1WebView Android Support complet OuiChrome Android Support complet OuiFirefox Android Support complet OuiOpera Android Support complet OuiSafari iOS Support complet 10.1Samsung Internet Android Support complet Oui
ignoreBOMChrome Support complet OuiEdge ? Firefox Support complet OuiIE Aucun support NonOpera Support complet OuiSafari Support complet 10.1WebView Android Support complet OuiChrome Android Support complet OuiFirefox Android Support complet OuiOpera Android Support complet OuiSafari iOS Support complet 10.1Samsung Internet Android Support complet Oui
Available in workersChrome Support complet 38Edge ? Firefox Support complet 20IE Aucun support NonOpera Support complet 25Safari Support complet 10.1WebView Android Support complet 38Chrome Android Support complet 38Firefox Android Support complet 20Opera Android ? Safari iOS Support complet 10.1Samsung Internet Android ?

Légende

Support complet  
Support complet
Aucun support  
Aucun support
Compatibilité inconnue  
Compatibilité inconnue
Voir les notes d'implémentation.
Voir les notes d'implémentation.

TextEncoder

Update compatibility data on GitHub
OrdinateurMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariWebview AndroidChrome pour AndroidFirefox pour AndroidOpera pour AndroidSafari sur iOSSamsung Internet
TextEncoder
Expérimentale
Chrome Support complet 38Edge ? Firefox Support complet 19
Support complet 19
Support complet 18
Notes
Notes Firefox 18 implemented an earlier and slightly different version of the specification.
IE Aucun support NonOpera Support complet 25Safari Support complet 10.1WebView Android Support complet 38Chrome Android Support complet 38Firefox Android Support complet 19
Support complet 19
Support complet 18
Notes
Notes Firefox 18 implemented an earlier and slightly different version of the specification.
Opera Android Support complet OuiSafari iOS Support complet 10.1Samsung Internet Android Support complet Oui
TextEncoder() constructor
Expérimentale
Chrome Support complet 53
Notes
Support complet 53
Notes
Notes Does not accept parameters. Supports only utf-8 encoding.
Aucun support 38 — 53
Notes
Notes Throws RangeError exception for unknown encoding types.
Edge ? Firefox Support complet 48
Notes
Support complet 48
Notes
Notes The constructor accepts an encoding type label argument, but the value is ignored. Only utf-8 encoding is supported.
Aucun support 38 — 48
Notes
Notes If the encoding type label argument is invalid, then a RangeError exception is thrown.
Aucun support 19 — 38
Notes
Notes If the encoding type label argument is invalid, then a TypeError exception is thrown.
Support complet 18
Notes
Notes Firefox 18 implemented an earlier and slightly different version of the specification.
IE Aucun support NonOpera Support complet 25Safari Support complet 10.1WebView Android Support complet 38Chrome Android Support complet 38Firefox Android Support complet 48
Notes
Support complet 48
Notes
Notes The constructor accepts an encoding type label argument, but the value is ignored. Only utf-8 encoding is supported.
Aucun support 38 — 48
Notes
Notes If the encoding type label argument is invalid, then a RangeError exception is thrown.
Aucun support 19 — 38
Notes
Notes If the encoding type label argument is invalid, then a TypeError exception is thrown.
Support complet 18
Notes
Notes Firefox 18 implemented an earlier and slightly different version of the specification.
Opera Android ? Safari iOS Support complet 10.1Samsung Internet Android ?
encode
Expérimentale
Chrome Support complet 38Edge ? Firefox Support complet 19
Support complet 19
Support complet 18
Notes
Notes Firefox 18 implemented an earlier and slightly different version of the specification.
IE Aucun support NonOpera Support complet 25Safari Support complet 10.1WebView Android Support complet 38Chrome Android Support complet 38Firefox Android Support complet 19
Support complet 19
Support complet 18
Notes
Notes Firefox 18 implemented an earlier and slightly different version of the specification.
Opera Android Support complet OuiSafari iOS Support complet 10.1Samsung Internet Android Support complet Oui
encodeInto
Expérimentale
Chrome Support complet 74Edge Aucun support NonFirefox Support complet 66IE Aucun support NonOpera Aucun support NonSafari Aucun support NonWebView Android Support complet 74Chrome Android Support complet 74Firefox Android Support complet 66Opera Android Aucun support NonSafari iOS Aucun support NonSamsung Internet Android Aucun support Non
encoding
Expérimentale
Chrome Support complet 38Edge ? Firefox Support complet 19
Support complet 19
Support complet 18
Notes
Notes Firefox 18 implemented an earlier and slightly different version of the specification.
IE Aucun support NonOpera Support complet 25Safari Support complet 10.1WebView Android Support complet 38Chrome Android Support complet 38Firefox Android Support complet 19
Support complet 19
Support complet 18
Notes
Notes Firefox 18 implemented an earlier and slightly different version of the specification.
Opera Android Support complet OuiSafari iOS Support complet 10.1Samsung Internet Android Support complet Oui
Available in Web Workers
Expérimentale
Chrome Support complet 38Edge ? Firefox Support complet 20IE Aucun support NonOpera Support complet 25Safari Support complet 10.1WebView Android Support complet 38Chrome Android Support complet 38Firefox Android Support complet 20Opera Android ? Safari iOS Support complet 10.1Samsung Internet Android ?

Légende

Support complet  
Support complet
Aucun support  
Aucun support
Compatibilité inconnue  
Compatibilité inconnue
Fonctionnalité expérimentale. Celle-ci peut être amenée à changer par la suite.
Fonctionnalité expérimentale. Celle-ci peut être amenée à changer par la suite.
Voir les notes d'implémentation.
Voir les notes d'implémentation.