I print the value entered from the keyboard to the screen. but Turkish characters are written to the screen in a distorted way. How can I print Turkish characters properly?
my javascript codes:
window.addEventListener('keyup',function(event){
var span = this.document.createElement('span');
span.innerText= String.fromCharCode(event.keyCode);
span.style.color='white';
var harfDivleri = this.document.querySelectorAll('.harfDivleri');
var i = kelimeDiv.children.length;
while (0 < i) {
i--;
if(harfDivleri[i].innerHTML == ""){
harfDivleri[i].appendChild(span);
}
}
});
screen output:
I want to be able to write such characters: ÖÜĞİŞÇ