mirror of
https://github.com/retailcrm/Fetch.git
synced 2024-11-21 18:56:02 +03:00
Fix all non utf8 strings
This commit is contained in:
parent
82d18754bc
commit
366c5dc189
4
src/Fetch/Message.php
Executable file → Normal file
4
src/Fetch/Message.php
Executable file → Normal file
@ -597,6 +597,10 @@ class Message
|
||||
return $converted;
|
||||
}
|
||||
|
||||
if ($to === 'utf-8') {
|
||||
return UTF8::fix($text);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -34,6 +34,10 @@ class MIMETest extends \PHPUnit_Framework_TestCase
|
||||
. PHP_EOL .
|
||||
'=?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?='
|
||||
),
|
||||
array(
|
||||
'ab11 ? ?????.jpg',
|
||||
"\x61\x62\x31\x31\x20\x97\x20\x3f\x3f\x3f\x3f\x3f\x2e\x6a\x70\x67",
|
||||
),
|
||||
array(
|
||||
'?????? ?????.pdf',
|
||||
'=?UTF-8?B?' .base64_encode("\xCF\xF0\xE8\xEC\xE5\xF0 \xEF\xEB\xE0\xED\xE0\x2E\x70\x64\x66") . '?=',
|
||||
|
Loading…
Reference in New Issue
Block a user