When setting placeholder text via javascript, special characters are not displaying properly.
function myFunction() {
document.getElementById("myText").placeholder = "Événement";
}
<input type="text" id="myText" placeholder="Événement">
<p>Click the button to change the placeholder text of the text field.</p>
<button onclick="myFunction()">Try it</button>
Output is: "Événement"
Expected output: "Événement"
Looking for a javascript solution where I can convert any text containing any encoded character.