In HTML there is a TextEncoder Interface which has a property encoding which tells us about the encoding algorithm used by the encoder. It can only have the value that is utf-8.
var b = encoder.encoding;
Return Value: It returns the name of the encoding algorithm.
- Before clicking the button:
- After clicking the button:
Supported Browsers: The browser supported by TextEncoder encoding property are listed below:
- Google Chrome 38
- Firefox 19
- Opera 25
- Safari 10.1
- Web TextEncoder API | TextEncoder encode() method
- Web API | TextEncoder encodeInto() Method
- HTML | URL Encoding
- How Base64 encoding and decoding is done in node.js ?
- HTTP headers | Accept-Encoding
- HTTP headers | Transfer-Encoding
- HTTP headers | Content-Encoding
- How to convert an image to base64 encoding in PHP?
- CSS | transition-property Property
- CSS | nav-up property
- CSS | nav-down property
- CSS | right Property
- CSS gap Property
- CSS | all Property
- CSS | top Property
- CSS | nav-right property
- CSS | padding-right Property
- CSS | nav-left property
- CSS border Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.