| 1 |
lars |
1 |
--TEST--
|
|
|
2 |
Bug #7561 Mail_mimePart::_quotedPrintableEncode() misbehavior with mbstring overload
|
|
|
3 |
--SKIPIF--
|
|
|
4 |
<?php
|
|
|
5 |
include "PEAR.php";
|
|
|
6 |
if (!extension_loaded('mbstring')){
|
|
|
7 |
if (!PEAR::loadExtension('mbstring')){
|
|
|
8 |
print('SKIP could not load mbstring module');
|
|
|
9 |
}
|
|
|
10 |
}
|
|
|
11 |
--FILE--
|
|
|
12 |
<?php
|
|
|
13 |
error_reporting(E_ALL); // ignore E_STRICT
|
|
|
14 |
ini_set('mbstring.language', 'Neutral');
|
|
|
15 |
// this isn't working because this option has PHP_INI_SYSTEM mode
|
|
|
16 |
ini_set('mbstring.func_overload', 6);
|
|
|
17 |
ini_set('mbstring.internal_encoding', 'UTF-8');
|
|
|
18 |
ini_set('mbstring.http_output', 'UTF-8');
|
|
|
19 |
|
|
|
20 |
include("Mail/mimePart.php");
|
|
|
21 |
$part = new Mail_mimePart('', array('eol'=>"\n"));
|
|
|
22 |
// string is UTF-8 encoded
|
|
|
23 |
$input = "Micha\xC3\xABl \xC3\x89ric St\xC3\xA9phane";
|
|
|
24 |
$rv = $part->_quotedPrintableEncode($input);
|
|
|
25 |
echo $rv, "\n";
|
|
|
26 |
--EXPECT--
|
|
|
27 |
Micha=C3=ABl =C3=89ric St=C3=A9phane
|