ISO-8859-1 Character truncates text inserting into utf-8 mysql column

前端 未结 3 1176

So I have a weird truncate issue! Can\'t find a specific answer on this.

So basically there\'s an issue with an apparent ISO character ½ that truncates the rest of the

3条回答
  •  庸人自扰
    2021-01-28 09:40

    Check into mb_convert_encoding if you can't change the way the data is handled. Otherwise, do yourself a favor and get your encoding on the same page before it gets out of hand. UTF-8 uses multibyte characters which aren't recognized in the ISO-8859-1 (Latin) encoding. wikipedia. This page and this page are good sources, as well as this debug table.

    Finally, I've run into this when various combinations of htmlentities, htmlspecialchars and html_entity_decode are used..

提交回复
热议问题