-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Iconv implementation missing #25
Comments
Thanks for reporting this, the lib was really missing. The implementation and the version will still be missing despite the fix but you can validate that it's working now by running the following snippet in the container as suggested in docker-library/php#240 (comment) php -d error_reporting=22527 -d display_errors=1 -r 'var_dump(iconv("UTF-8", "UTF-8//IGNORE", "This is the Euro symbol '\''€'\''."));' If it runs without notices it's all good. |
It works now. Thank you for the quick fix. |
@csandanov The fix works with the CLI but not with FPM. CLI environment variables from phpinfo():
But those variables are missing when I output phpinfo() with FPM. |
Yes, that's because FPM has |
I tried the updated image. The environment variables are now present, but the iconv function with translit still fails with FPM. |
Does it work if you set |
No. The change is visible in php.ini, but it still works only for CLI but not FPM. |
Right, we run fpm via sudo. Added |
It works now. Thanks. Just a remark. On my local setup the command |
What's your OS? AFAIK, Linux and Windows use different libs for iconv |
I'm on Linux. |
Could be docker-library/php#240 (comment) |
Probably. When I output inside the container: |
I doubt this issue can be resolved, most likely this caused due to usage of GNU iconv library and not having a good locale support in musl, try using http://php.net/manual/en/transliterator.transliterate.php instead for transliteration:
|
Fixed by installing RUN apk --no-cache add php7-mbstring php7-iconv Original solution here: docker-library/php#240 (comment) |
Fixed in the upstream docker-library/php#1264 |
The iconv extension is enabled, but there is no implementation available (like glibc). I tried with 7.2, 7.1 and 5.6 images.
The php.ini output:
As a result the iconv() function fails with translit:
iconv('utf-8', 'ascii//TRANSLIT', 'test');
Notice: iconv(): Wrong charset, conversion from 'utf-8' to 'ascii//TRANSLIT' is not allowed
The text was updated successfully, but these errors were encountered: