I used the openssl_pkcs7_decrypt function to decrypt the encrypted .eml file. Now there are many control characters in the decrypted file like EOT, DLE, NUL ....
What is wrong or how can I remove these control characters? Without removing the control characters I can't extract the content of the file via php.
I tried preg_replace('~[^\P{Cc} ]+~u', '', $stream); But nothing was removed.