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

I'm having problems with koi8-r encoded messages #206

Open
b1rdex opened this issue Jan 24, 2018 · 3 comments
Open

I'm having problems with koi8-r encoded messages #206

b1rdex opened this issue Jan 24, 2018 · 3 comments

Comments

@b1rdex
Copy link

b1rdex commented Jan 24, 2018

Such messages body is presented as ??? chars, instead of real chars.
But subject is decoded as it should and have no problem.
Here is message original: https://gist.github.com/b1rdex/387473a0d4f54e0c060388a7d876a31a

@b1rdex
Copy link
Author

b1rdex commented Jan 24, 2018

If I manually mb_convert_encoding($messageBody, 'utf-8', 'koi8-r') it converts good.
mb_convert_encoding($messageBody, 'utf-8') fails autodetection and results ???.

@b1rdex
Copy link
Author

b1rdex commented Jan 24, 2018

Problem is here:

if (!in_array($parameters['charset'], mb_list_encodings())) {

Input from email is koi8-r, but mb_list_encodings() has KOI8-R.

@b1rdex
Copy link
Author

b1rdex commented Jan 24, 2018

I created #207 with fix for 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

No branches or pull requests

1 participant