function toUnicode() { var str=document.myForm.myInput.value; var i = 0; var iUnicode; if (str!="") { for(i=0; i < str.length; i++) { unicode =str.charCodeAt(i); iUnicode = eval(unicode) //alert(iUnicode); if ((iUnicode > 127) || (iUnicode == 38) || (iUnicode == 60) || (iUnicode==62)||(iUnicode==34)||(iUnicode==39)){ document.myForm.unicode.value+="&#" + unicode + ";"; } else { document.myForm.unicode.value+=str.charAt(i); } } } //document.myForm.unicode.value=unicode; }

Character to XML Entity Conversion Utility

Enter text here:


ISO Latin XML Entities

Only characters with unicode value greater than 127 are converted: