The main core of question is — I did not know what's the name of this type of string. I am getting output function strings in this format %D0%9F%D1%80%D0%B8%D0%B2%D0%B5%D1%82. I don't know what type of code is this. Tell me please how to convert it to Unicode in JavaScript. Actually this string is "Привет". Thank you.
Asked
Active
Viewed 161 times
1 Answers
0
Using decodeURIComponent()
The decodeURIComponent() function decodes a Uniform Resource Identifier (URI) component previously created by
encodeURIComponent
or by a similar routine.
var decodedStr = decodeURIComponent('%D0%9F%D1%80%D0%B8%D0%B2%D0%B5%D1%82')
console.log(decodedStr);

Adam Azad
- 11,171
- 5
- 29
- 70