-
Notifications
You must be signed in to change notification settings - Fork 79
iconv(): Wrong charset, conversion from UTF-8' to
ASCII//TRANSLIT//IGNORE' is not allowed
#3
Comments
Fixing a thing by adding a testing channel to the repositories may lead into security issues. Not recommended. |
I've checked this issue and the fastest and most solid current solution is indeed the one mentioned above. Since the gnu-libiconv package doesn't depend on too many other packages that might break things or present security issues, it's coming to these Dockerfiles in the following commits... So thanks for reporting these issues. Even better would be to fix PHP core on its way as well. From my tests, currently it is not possible to properly and conveniently build PHP on Alpine with iconv extension using anything other than musl's iconv implementation (which has very strict view on POSIX standards and lacks the iconv's translit).
In such cases another possible solution is to simply use Linux distribution with glibc such as Debian for base Docker image. |
This has now been fixed via a new gnu-libiconv package in the PHP.earth Alpine repository and patched PHP source code. I'll also send a PR to PHP source code, since the PHP iconv extension is not working as it should and doesn't get built when passing libiconv. |
tested and it works well did you sent PR to PHP source code? |
I'm still preparing the PR for the php-src. For now, there is only a customized patch added to these builds. |
It looks like this issue has been resolved since This issue I think should be closed. |
Hello, I'm not sure if this has been directly fixed but I suggest moving this to PHP's side altogether - with the iconv different functionality when using the GNU's libiconv and maybe suggesting some sort of warning in the docs or something else that different iconv libraries or implementations mean also different functionalities... I'm not sure. But in any case closing this one as won't fix or at least a partial fix using custom build of GNU libiconv... Thanks. |
I've added this code into one of my custom
Thanks |
Fixed by installing RUN apk --no-cache add php7-mbstring php7-iconv Original solution here: docker-library/php#240 (comment) |
How to reproduce?
iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', 'šěýčíéáýřčíšýíščř');
How to fix?
refs
The text was updated successfully, but these errors were encountered: