Phpspreadsheet: ErrorException : iconv(): Wrong charset, conversion from `MACCENTRALEUROPE' to `UTF-8//IGNORE//TRANSLIT' is not allowed

Created on 4 Jan 2019  路  5Comments  路  Source: PHPOffice/PhpSpreadsheet

This is:

```

  • [x] a bug report

What is the expected behavior?

Should open the file

What is the current behavior?

throws exception:
ErrorException : iconv(): Wrong charset, conversion from MACCENTRALEUROPE' toUTF-8//IGNORE//TRANSLIT' is not allowed

What are the steps to reproduce?

$spreadsheet = IOFactory::load($source);

Which versions of PhpSpreadsheet and PHP are affected?

1.5.x and 1.6.0

Thanks

stale

Most helpful comment

This is an issue with iconv.
You probably experience it because you use Alpine Linux (which uses musl).
In that case the solution is in last 2 lines of the Dockerfile from this comment.

All 5 comments

I'm having the same issue.

Mee too.

iconv(): Wrong charset, conversion from MACCENTRALEUROPE' toUTF-8//IGNORE//TRANSLIT' is not allowed

it seems the problem is in StringHelper, that detects proper iconv using dummy conversion src_encoding->dst_encoding (which works fine in the situation), but makes a real convert as src_encoding->dst_encoding//IGNORE//TRANSLIT

This is an issue with iconv.
You probably experience it because you use Alpine Linux (which uses musl).
In that case the solution is in last 2 lines of the Dockerfile from this comment.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If this is still an issue for you, please try to help by debugging it further and sharing your results.
Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

garnold picture garnold  路  5Comments

stratboy picture stratboy  路  5Comments

isopen picture isopen  路  3Comments

jcroucher picture jcroucher  路  4Comments

noxidsoft picture noxidsoft  路  3Comments