Note 2: I found the answer - and it wasn't anywhere else on your site. You mark things as duplicates far too cavalierly. Here was the line that fixed my problem. Where is it on your site?
str = str.replace(/\u2019/g, "'");
Note: This is not a duplicate of "Remove accents/diacritics in a string in JavaScript." My question has to do with a sole apostrophe and not an accent or diacritic.
I have an HTML input field being used on an iPhone. The person is typing the word "don't." The apostrophe is coming across as 0xE2 0x80 0x99. I presume that is Unicode. How can I convert that to an ASCII single quote in JavaScript?
I am basically looking to create a JavaScript function that takes a string (potentially containing any number of those Unicode apostrophes) and returns the string with all of the Unicode apostrophes replaced with the ASCII single quotes in their places.
Thank you!