HomePostsGithub

Alpine Linux < 3.13 - iconv(): Wrong charset, conversion from MAC to UTF-8 is not allowed

Overview

I have a problem with iconv() with running on Alpine Linux version 3.13 and I also found a solution to fix this by:

RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ --allow-untrusted gnu-libiconv
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php

But somehow it doesn't work.

I decided to research how and why is happening, and I really found a good solution when I see this pull request of docker library for PHP.

https://github.com/docker-library/php/pull/1264

Solution

  • Update alpine linux to version 3.13 versions (at least >=3.14).
<-- Back to Posts

2023 © fuongz.