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(): Wrong encoding, conversion from "ASCII" to "UTF-8//IGNORE" is not allowed #387

Open
danielmarschall opened this issue Jan 7, 2022 · 2 comments

Comments

@danielmarschall
Copy link

Hello,

I noticed that there is an incompatibility with the mbstring polyfill and PHP 8.1 / Alpine Linux,
which breaks a lot of my projects as soon as the php81-mbstring is not installed, but php81-iconv is installed:

Example:

Warning: iconv(): Wrong encoding, conversion from "ASCII" to "UTF-8//IGNORE" is not allowed in phar:///var/www/localhost/htdocs/phpstan.phar/vendor/symfony/polyfill-mbstring/Mbstring.php on line 736

It looks like //IGNORE is not accepted since echo iconv('UTF-8', 'UTF-8', 'test'); works, while echo iconv('UTF-8', 'UTF-8//IGNORE', 'test'); doesn't

@derrabus
Copy link
Member

derrabus commented Jan 7, 2022

iconv on Alpine is really broken. You should consider installing ext-mbstring.

@jdreesen
Copy link
Contributor

jdreesen commented Jan 7, 2022

See also: docker-library/php#240

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

No branches or pull requests

4 participants