mirror of
https://github.com/retailcrm/Fetch.git
synced 2024-11-25 04:26: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;
|
return $converted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($to === 'utf-8') {
|
||||||
|
return UTF8::fix($text);
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,6 +34,10 @@ class MIMETest extends \PHPUnit_Framework_TestCase
|
|||||||
. PHP_EOL .
|
. PHP_EOL .
|
||||||
'=?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?='
|
'=?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(
|
array(
|
||||||
'?????? ?????.pdf',
|
'?????? ?????.pdf',
|
||||||
'=?UTF-8?B?' .base64_encode("\xCF\xF0\xE8\xEC\xE5\xF0 \xEF\xEB\xE0\xED\xE0\x2E\x70\x64\x66") . '?=',
|
'=?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