This function will return the byte size of any UTF-8 string you pass to it.
function byteCount(s) { return encodeURI(s).split(/%..|./).length - 1;}
This function will return the byte size of any UTF-8 string you pass to it.
function byteCount(s) { return encodeURI(s).split(/%..|./).length - 1;}