From c539d6224b2786356b8705f4e0d86417d355e19c Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sun, 19 Mar 2006 02:38:21 +0000 Subject: [PATCH] Now encode_mimeheader() only encodes the header if it isn't 100% ASCII. --- lib/textlib.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/textlib.class.php b/lib/textlib.class.php index 1e77202721..2c2012558b 100644 --- a/lib/textlib.class.php +++ b/lib/textlib.class.php @@ -193,6 +193,10 @@ class textlib { * paravoid (http://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283). */ function encode_mimeheader($text, $charset='utf-8') { + /// If the text is pure ASCII, we don't need to encode it + if ($this->convert($text, $charset, 'ascii') == $text) { + return $text; + } /// Although RFC says that line feed should be \r\n, it seems that /// some mailers double convert \r, so we are going to use \n alone $linefeed="\n"; -- 2.39.5