Skip to content

Conversation

@linniksa
Copy link
Contributor

No description provided.

@tedivm
Copy link
Member

tedivm commented Mar 14, 2014

@linniksa can you look at #37 and see if that handles this for you?

@linniksa
Copy link
Contributor Author

by code it is cover my situation (maybe some software encode message subject by chunks with different encodings)
but realization is not good:

  • convertation do multiple times (mostly perfomance issue), and persons and subject processed in diffirent time (when parsing vs access to getter)
  • decoding only first element in person (if message subject may take strange encoding, why person name not?)

simple solution is create not public function, something like that:

protected function mimeToUtf8($string) {
    $result = '';
    foreach (imap_mime_header_decode($string) as $chunk)
        $result .= $chunk->text;
    }

    return $result;
}

and to all decoding when reading from imap functions (store in class members already decoded strings)

PS. need local test suit, without using mail server
PPS. sorry for my english

@linniksa linniksa closed this Mar 14, 2014
@tedivm
Copy link
Member

tedivm commented Mar 14, 2014

No worries on the english, I understood you :-)

The new test suite will actually run locally. It uses vagrant and VirtualBox to create a local mail server to test against.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants