Skip to content

Commit d29eb74

Browse files
committed
Re-apply a fix for #8
1 parent e760bf1 commit d29eb74

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ COPY --from=php /usr/local/etc/php /usr/local/etc/php
4141
COPY --from=php /usr/lib/*.so.* /usr/lib
4242
COPY --from=php /usr/local/lib/php /usr/local/lib/php
4343

44+
# see https://github.com/elecena/python-php/issues/8
45+
# The problem seems to be that iconv in musl is not implemented to support that conversion, when using GNU iconv it works.
46+
RUN apk add gnu-libiconv
47+
# use GNU iconv in php
48+
ENV LD_PRELOAD="/usr/lib/preloadable_libiconv.so php-fpm php"
49+
# and test it...
50+
RUN php -r '$res = iconv("utf-8", "utf-8//IGNORE", "fooą");'
51+
4452
RUN php -v; php -m; php -i | grep ini
4553
ENV PHP_VERSION 8.0.7
4654

0 commit comments

Comments
 (0)