php remove/identify this symbol �

后端 未结 8 1751
无人及你
无人及你 2020-12-11 22:26

EDIT:

Ok I have some data (A ton of data) being pulled from a MySQL DB Table, nothing special about how the data is entered. When parsing the data and re-displaying

8条回答
  •  渐次进展
    2020-12-11 22:58

    This is a common problem when pasting text from microsoft office products to html, or into a database. The largest offenders seem to be the emdash(as you found) and smart quotes. One solution I have found when users insist upon using a text editor that is non-compliant like that is to have them paste it into something like notepad first, to strip the proprietary symbols.

    Obviously the best solution is to simply not use word for textual data that is intended for web display.

    Added just to provide some info to future readers.

    Regards, Jc

提交回复
热议问题