$replace = ereg_replace("_", " ", $res[3]);
// Convert lowercase Quoted Printable to uppercase for
// quoted_printable_decode to understand it.
$replace = ereg_replace("_", " ", $res[3]);
// Convert lowercase Quoted Printable to uppercase for
// quoted_printable_decode to understand it.
$replace = str_replace($res[1], strtoupper($res[1]), $replace);
}
$replace = quoted_printable_decode($replace);
$replace = str_replace($res[1], strtoupper($res[1]), $replace);
}
$replace = quoted_printable_decode($replace);
$string = str_replace("_", "=5F", $string);
$string = str_replace(" ", "_", $string);
$string = str_replace("_", "=5F", $string);
$string = str_replace(" ", "_", $string);
-
- while (ereg("([\200-\377])", $string, $regs)) {
- $replace = $regs[1];
- $insert = "=" . strtoupper(bin2hex($replace));
+ for ( $ch = 127 ; $ch <= 255 ; $ch++ ) {
+ $replace = chr($ch);
+ $insert = sprintf("=%02X", $ch);