Error Occurs When You Execute The Convert HTML-Entities To UTF-8 Characters Function On The Admin Pa

Started by 8Taner8, March 20, 2018, 08:59:17 AM

Previous topic - Next topic

8Taner8

- "The Problem Has Been Fixed. But There Was Another Mistake. The Following Error Occurs When You Execute The Convert HTML-Entities To UTF-8 Characters Function On The Admin Panel > Forum Maintenance > Database:

Database Error

Incorrect string value: '\xF0\x9F\x91\x8D\xE2\x80...' for column 'body' at row 1
File: {Server Path}/htdocs/forum/Sources/ManageMaintenance.php
Line: 661


Screenshots:


"

albertlast

Well the issue is easy the solution not.
Problem is that this script try to convert all entities to utf8,
but mysql didn't support all utf8 characters.

To get near as possible(even than the support is not 100%) you need to change you database from utf8 to utf8mb4,
change the connect setup in smf (many hard work for not worthy out come).

Solution which i think,i would provide to skip the utf8 characters which are not supported like this one your try to convert.
here the pr with the solution: https://github.com/SimpleMachines/SMF2.1/pull/4643/commits/fa89c84d06b09bff1c4aa184a1839fc13798dc5e
please give feedback


albertlast


Advertisement: