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

Malformed UTF-8 characters, possibly incorrectly encoded #318

Closed
adrenalinkin opened this issue Oct 16, 2021 · 0 comments · Fixed by #319
Closed

Malformed UTF-8 characters, possibly incorrectly encoded #318

adrenalinkin opened this issue Oct 16, 2021 · 0 comments · Fixed by #319

Comments

@adrenalinkin
Copy link
Contributor

adrenalinkin commented Oct 16, 2021

When some source files contains not UTF-8 symbols we can't send coverage report

Collect git info
Dump submitting json file: /app/tests/_output/coveralls-upload.json
Fatal error:
Method PhpCoveralls\Bundle\CoverallsBundle\Entity\JsonFile::__toString() must not throw an exception,
caught UnexpectedValueException: Can not encode to JSON, error:
"Malformed UTF-8 characters, possibly incorrectly encoded".
If you have non-UTF8 chars, consider migration to UTF8.
in /app/vendor/php-coveralls/php-coveralls/src/Bundle/CoverallsBundle/Api/Jobs.php on line 117

But also we have no idea where is problem locates!
In my case we have over than 5 thousand files.

I propose implement more friendly message in that case when json_encode has been failed

@adrenalinkin adrenalinkin changed the title Impossible generate report when source-files contains cyrillic symbols | Malformed UTF-8 characters, possibly incorrectly encoded Malformed UTF-8 characters, possibly incorrectly encoded Oct 17, 2021
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.

1 participant