FIX Filenames must not contains non ascii char or we will get non ascii

char into the SMTP header.
FIX Do not encode subject if it is full ascii (not required)
This commit is contained in:
Laurent Destailleur
2020-02-06 12:58:02 +01:00
parent 48e6db17bd
commit 05e08b3596
3 changed files with 64 additions and 8 deletions

View File

@@ -679,6 +679,26 @@ class FunctionsLibTest extends PHPUnit\Framework\TestCase
$this->assertFalse($result);
}
/**
* testDolAsciiCheck
*
* @return void
*/
public function testDolAsciiCheck()
{
// True
$result=ascii_check('azerty');
$this->assertTrue($result);
$result=ascii_check('é');
$this->assertFalse($result);
$file=dirname(__FILE__).'/textutf8.txt';
$filecontent=file_get_contents($file);
$result=ascii_check($filecontent);
$this->assertFalse($result);
}
/**
* testDolTrunc
*