Skip to content

Encoding problem with iso-8859-1 #189

Description

@mdjdev

Hello,

I have noticed an issue when an email is encoded in iso-8859-1 (structure encoding = 4). Special characters are shown as '?'. I'm new to programming and don't know how pull request work, but I found a working solution (at least for my case).

In Message.php on line 527 I added the elseif-branch:
if ($structure->encoding === 0) {
$parameters['charset'] = 'US-ASCII';
} elseif($structure->encoding === 4) {
$parameters['charset'] = 'ISO-8859-1';
} else {
$parameters['charset'] = 'UTF-8';
}

Otherwise mb_convert_encoding is failing because $from_encoding is passed as 'UTF-8' even if it's not true.

Could someone with more knowledge look into this? Thanks a lot.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions