Open prolic opened 6 years ago
I think the LD_PRELOAD
fix is not a good solution for our prooph Docker images. Maybe mb_convert_encoding($text, 'UTF-8', 'UTF-8');
does the same if you want to remove invalid UTF-8 characters?
I ran into this issue due to work, not sure if this happened in their code or in third party library. Would need to double check.
Sascha-Oliver Prolic
2018-08-03 1:09 GMT+08:00 Sandro Keil notifications@github.com:
I think the LD_PRELOAD fix is not a good solution for our prooph Docker images. Maybe mb_convert_encoding($text, 'UTF-8', 'UTF-8'); does the same if you want to remove invalid UTF-8 characters?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/prooph/docker-files/issues/24#issuecomment-410000107, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYEvDrFXtIhrhwdEwkEXStbKHefHJICks5uMzJRgaJpZM4VsZjQ .
I checked again, the iconv stuff is used by wordpress.
Ok but I don't know how to solve this and I think it's not related for our Docker images, because they are only intended for development and may be only a blueprint for production.
I never said the word production. Iconv is used by wordpress. This is also true for development mode. So I can't use these docker images for a local wp installation. With the fix i provided it works.
On Fri, Aug 3, 2018, 23:27 Sandro Keil notifications@github.com wrote:
Ok but I don't know how to solve this and I think it's not related for our Docker images, because they are only intended for development and may be only a blueprint for production.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/prooph/docker-files/issues/24#issuecomment-410288979, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYEvDRfpCUTOsuTXAE4T4BMLQnUKHTFks5uNGvggaJpZM4VsZjQ .
Maybe this is solved in the new Docker images >= PHP 7.4 with Alpine 3.15.
Test-Case:
php -d error_reporting=22527 -d display_errors=1 -r 'var_dump(iconv("UTF-8", "UTF-8//IGNORE", "This is the Euro symbol '\''€'\''."));'
output:
Notice: iconv(): Wrong charset, conversion from
UTF-8' toUTF-8//IGNORE' is not allowed in Command line code on line 1
So I customized the dockerfile to:
Let's test this:
output:
string(30) "This is the Euro symbol '€'."