2
I get this string on frontend, but I need to decode it.
Tr%E1%BA%A7n_H%C6%B0ng_%C4%90%E1%BA%A1o -> Trần Hưng Đạo
I don’t know any function to decode it.
2
I get this string on frontend, but I need to decode it.
Tr%E1%BA%A7n_H%C6%B0ng_%C4%90%E1%BA%A1o -> Trần Hưng Đạo
I don’t know any function to decode it.
5
Try to use the function decodeURIComponent
:
conteudo = "Tr%E1%BA%A7n_H%C6%B0ng_%C4%90%E1%BA%A1o"
console.log(decodeURIComponent(conteudo))
Wouldn’t it be better to use the function decodeURIComponent
, since the string is not a complete URI but a part of it?
It worked, but I think for the comma and two points did not work in the case of the word: Music_of_austin%2C_Texas that would be a comma
With Component worked with the commas and two points
Browser other questions tagged javascript
You are not signed in. Login or sign up in order to post.
Although it is in English, and of course it is not our obligation but of those who asked, it was easy to understand and easy to translate, instead of voting to close, could very well have translated it
– MarceloBoni
It was my fault, not for evil. I’ll take care of it next time. I’m sorry.
– fernandosavio
I thought I was on stackoverflow in English, my apologies.
– Vinicius Morais