You're attempting to insert a multi byte character into a single byte slot; as mentioned above, this software has never been tested before for UTF8MB4 and assumes you're using a Latin based collation. Modifying the software to preform on this collation just won't have the desired behavior you're looking for.