Skip to content

Encoding problem with iso-8859-1 #189

@mdjdev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions