-1

i have many records in my table which are like

дядько
kurbağa
dėdė

Those are all words and i want them to convert into normal words in javascript. Is there any javascrtipt method for this?

Kai Tera
  • 59
  • 2
  • 9
  • Can you give a little more context here. What is the encoding you are using? – bhspencer Mar 05 '18 at 19:07
  • 3
    `s = document.createElement('span'); s.innerHTML = 'дядько'; console.log(s.innerText)` will return this: `"дядько"` – GottZ Mar 05 '18 at 19:08
  • In case you miss it while going through the answers to the linked question, HTML characters are Unicode. – Tom Blodget Mar 06 '18 at 12:20

1 Answers1

1

They are HTML entities, an alternative could be created temporarily an element and then get the innerText.

var textNode = document.createElement("span");
textNode.innerHTML = `дядько
kurbağa
dėdė`

console.log(textNode.innerText);
Ele
  • 33,468
  • 7
  • 37
  • 75