Closed h4mpy closed 1 year ago
Hi @h4mpy --
Thanks for the detailed report... unfortunately I'm unable to reproduce what you're experiencing, but that might just be the environment I'm running... this is what I'm getting copy/pasting your tests:
Test
<b>Test</b>
Текст
<b>Текст</b>
テキスト
<b>テキスト</b>
I tried on php 7.4 and 7.2 since I have them installed.
What happens if you run all the mail-mime-parser tests? If you 'composer install' under mail-mime-parser, you can then run php ./vendor/bin/phpunit -c ./tests/phpunit.xml. You could also try the same under zbateson/stream-decorators.
problem is caused by php setting mbstring.func_overload = 2
this setting is necessary for cms we use
is it possible for the parser to work with this setting?
Hi @h4mpy
Someone had requested that in the past and I'd reworked the code to make it work. Unfortunately it seems when I split out the code into separate libraries I lost that. It shouldn't be too difficult to restore though. I might look into adding some tests to make sure it doesn't break in the future as well.
I had a look at this and unfortunately it may not be possible to rework this using guzzlehttp/psr7. I may be wrong and I still need to take a deeper look, but that was first possible hurdle.
Parsing non-latin html messages gives unexpected results. For example:
Latin subset: everything is ok
Result:
Cyrillic and Japanese: unexpected extra lines, copying the last characters
Result:
Result:
What could be causing the problem? Checked on PHP 7.3.13