1

When using Statamic 3.2 / Laravel 8 and the Statamic SEO Pro 2.3 plugin, I am getting the following error on ever page of the site:

iconv(): Wrong encoding, conversion from "UTF-8" to "UTF-8//IGNORE" is not allowed

My environment is based on the php:8-fpm-alpine docker image.

Joseph
  • 2,737
  • 1
  • 30
  • 56

1 Answers1

2

This issue is due to a compatibility issue with the libiconv package in Alpine Linux.

References to the issue which has been known for a while:

https://gitlab.alpinelinux.org/alpine/aports/-/issues/12328

https://github.com/docker-library/php/issues/240

A workaround until a more permanent fix is made available, in the PHP dockerfile:

RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.13/community/ gnu-libiconv=1.15-r3

ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so

Joseph
  • 2,737
  • 1
  • 30
  • 56