11 require_once dirname(__FILE__) .
'/../HeaderEncoder.php';
12 require_once dirname(__FILE__) .
'/../../Encoder/QpEncoder.php';
13 require_once dirname(__FILE__) .
'/../../CharacterStream.php';
34 if (empty(self::$_headerSafeMap))
37 range(0x61, 0x7A), range(0x41, 0x5A),
38 range(0x30, 0x39), array(0x20, 0x21, 0x2A, 0x2B, 0x2D, 0x2F)
41 self::$_headerSafeMap[$byte] = chr($byte);
66 return str_replace(array(
' ',
'=20',
"=\r\n"), array(
'_',
'_',
"\r\n"),
67 parent::encodeString($string, $firstLineOffset, $maxLineLength)
83 foreach ($bytes as $b)
85 if (isset(self::$_headerSafeMap[$b]))
87 $ret .= self::$_headerSafeMap[$b];
92 $ret .= self::$_qpMap[$b];