get charCode of different quotes

Code written to solve an issue caused in WP: APOSTROPHE getting replaced with RIGHT SINGLE QUOTATION MARK

by Vivek Athalye

HTML

<div>
  <p>Get the charcode of each character in given string</p>
	<input type="text" id="ip" value="'`´′">
  <button>Get Char Codes</button>
	<div id="op"></div>
</div>

CSS

body {
  padding: 20px;
  font-family: Helvetica;
}

JavaScript

var ip = $("#ip")
var op = $("#op")
var button = $("button")

button.on("click", function(){
	op.empty();
	var str = ip.val();
	for(var i=0; i<str.length; i++) {
		op.append($('<p>').text(str[i] + ' - ' + str.charCodeAt(i)));
	}
})
button.click();