Using TextEncoder and TextDecoder
var uint8array = new TextEncoder("utf-8").encode("Plain Text");
var string = new TextDecoder().decode(uint8array);
console.log(uint8array ,string )
More Related Contents:
- Replacing accented characters with plain ascii ones [duplicate]
- How to check whether a string contains a substring in JavaScript?
- When should I use double or single quotes in JavaScript?
- Strip HTML from Text JavaScript
- Convert JS object to JSON string
- Count the number of occurrences of a character in a string in Javascript
- Is there a built in way to convert a comma-separated string to an array?
- Converting an object to a string
- endsWith in JavaScript
- Why does JavaScript handle the plus and minus operators between strings and numbers differently?
- What’s the best way to convert a number to a string in JavaScript?
- Check whether an input string contains a number in javascript
- How to replace all occurrences of a string in JavaScript
- Escaping Strings in JavaScript
- Smart way to truncate long strings
- Javascript Equivalent to PHP Explode()
- How do I replace all occurrences of a string in JavaScript?
- How to check if character is a letter in Javascript?
- Using JavaScript to perform text matches with/without accented characters
- How can val() return Number?
- How does adding String with Integer work in JavaScript? [duplicate]
- How do I split a string by whitespace and ignoring leading and trailing whitespace into an array of words using a regular expression?
- Replace string in javascript array
- JavaScript – Replace all commas in a string [duplicate]
- Convert JavaScript String to be all lowercase
- String split returns an array with more elements than expected (empty elements)
- Best way to parse HTML in Javascript
- Put quotes around a variable string in JavaScript
- How to add spaces between every character in a string?
- javascript – Convert array to string while preserving brackets