When I was fetching some data through API, I have some Danish strings which came encoded like below:
Encoded | Original |
---|---|
Skæfte |
Skæfte |
sølv |
sølv |
Tried combinations of decodeURIComponent()
and escape()
but that doesn't help. Any ways to decode the string in native JS irrespective of the encoded language (Danish, in this case)?