I am using a utf8 charset mysql tables in a mysql 5.1 server, which does not support utf8mb4 encoding in tables. When inserting 4-byte encoded utf8 characters like "","","","","","唧",""
. The table will popup error or skip the following texts.
How can I programmatically detect 4-byte encoded utf8 characters in PHP and replace them?