Skip to content
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 fails to transform UTF-8 to ASCII/TRANSLIT #1532

Closed
amari-at4 opened this issue May 14, 2020 · 1 comment · Fixed by #1857
Closed

Iconv fails to transform UTF-8 to ASCII/TRANSLIT #1532

amari-at4 opened this issue May 14, 2020 · 1 comment · Fixed by #1857

Comments

@amari-at4
Copy link

API Platform version(s) affected: 2.5.5

Description
When try to use the transliteration with iconv throw this notice "php Notice: iconv(): Wrong charset, conversion from UTF-8' to ASCII//TRANSLIT' is not allowed" and Api Platform throws an Exception

How to reproduce

$text="Texto en español"
$new_text = iconv('UTF-8', 'ASCII//TRANSLIT', $text);

Possible Solution
As commented here it's an Alpine bug. to fix this it's necessary to add to the Dokerfile this lines:

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

dunglas commented May 14, 2020

Thanks for the report and the workaround! I suggest to wait for this package to be marked as stable by Alpine before we change this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants