mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
32_mailcheck.pm: handle latin1 encoding for subject
git-svn-id: https://svn.fhem.de/fhem/trunk@12339 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
0a5ed3bffc
commit
f8e9f18155
@ -187,6 +187,7 @@ mailcheck_Connect($)
|
||||
#}
|
||||
|
||||
$client->Uid(0);
|
||||
$client->Timeout(8);
|
||||
$client->select($hash->{Folder});
|
||||
|
||||
$hash->{tag} = $client->idle;
|
||||
@ -444,7 +445,14 @@ mailcheck_Read($)
|
||||
}
|
||||
|
||||
$entity->head->decode();
|
||||
|
||||
if( $subject =~ /iso-8859-1/ ) {
|
||||
$subject = $entity->head->get('Subject');
|
||||
$subject = latin1ToUtf8( $subject );
|
||||
} else {
|
||||
$subject = $entity->head->get('Subject');
|
||||
}
|
||||
|
||||
chomp( $subject );
|
||||
Log3 $name, 4, "subject decoded: $subject";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user