Fetch icon indicating copy to clipboard operation
Fetch copied to clipboard

I'm having problems with koi8-r encoded messages

Open b1rdex opened this issue 8 years ago • 3 comments

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 avatar Jan 24 '18 04:01 b1rdex

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 avatar Jan 24 '18 05:01 b1rdex

Problem is here: https://github.com/tedious/Fetch/blob/9a1b0eb87d343eb0c8c57acb33973c594b8aca8d/src/Fetch/Message.php#L526 Input from email is koi8-r, but mb_list_encodings() has KOI8-R.

b1rdex avatar Jan 24 '18 05:01 b1rdex

I created #207 with fix for this.

b1rdex avatar Jan 24 '18 05:01 b1rdex