0

I have built an SMS application that allows users to send from a webpage. The application works great, but I have found an issue that occurs when text is pasted in from another source such as gmail.

Take the following examples:

When typed in manually
INPUT: There's a problem
OUTPUT: There's a problem

When pasted in from gmail
INPUT: There’s a problem
OUTPUT: There?s a problem

I believe that this is caused by the UNICODE not being available in ASCII/UTF-8, but I cannot seem to convert it successfully. Does anyone have recommendations for fixing this with PHP or JS?

I have tried mb_convert_encoding and iconv with no luck

Matt Butler
  • 476
  • 6
  • 21
  • Possible duplicate of [Displaying some sort of apostrophe (Currently shows as diamond)](https://stackoverflow.com/questions/11634892/displaying-some-sort-of-apostrophe-currently-shows-as-diamond) – Script47 Jun 05 '18 at 04:06
  • @Script47 This doesn't involve a database – Matt Butler Jun 05 '18 at 04:09
  • BTW, that apostrophe looks somewhat weird on my screen, like some sort of "smart quotes" type of apostrophe. – Script47 Jun 05 '18 at 04:10

0 Answers0