Description
Describe the bug
When using iconv
as message subject decoding option, subjects not containing a special character but containing an Umlaut, will lead to the subject to have _
instead of blanks.
Subjects that contain both special chars and at least one umlaut though, will be decoded properly and result in blanks staying blanks.
Used config
Standard config except that decoders.message.subject
is set to iconv
Code to Reproduce
set above mentioned config and then:
echo $message->subject
of a message where subject isum zu läuten
=> which will lead to decoded subjectum_zu_läuten
echo $message->subject
of a message where subject isum zu läuten!
=> which will lead to decoded subjectum zu läuten!
Expected behavior
Blanks should stay blanks after decoding, therefore no _
getting into the subject during decoding.
Server:
- OS: alpine 3.19.1
- PHP: 8.2
- Version 5.5.0
- Provider: Gmail
Additional context
I'm using the laravel wrapper, using laravel 10.
Observation:
If omitting the decoder.message.subject
option comletely, therefore getting undecoded subjects, and then using iconv_mime_decode
directly, does NOT lead to blanks getting replaced with _
however for the sake of keeping code short and clean, I would prefer the package to handle decoding properly and consistent over me using iconv_mime_decode
all over the place.