aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_messenger.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-11-23 12:44:12 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-11-23 12:44:12 +0000
commitfbe7c6550b29ecc0d37ec30851aa2492df2a6870 (patch)
treeaef00dd7361722d9dd612c29fd4bb84b9601e446 /phpBB/includes/functions_messenger.php
parent5a73807c9b11091e652d7377edd41053e7cfe8f1 (diff)
downloadforums-fbe7c6550b29ecc0d37ec30851aa2492df2a6870.tar
forums-fbe7c6550b29ecc0d37ec30851aa2492df2a6870.tar.gz
forums-fbe7c6550b29ecc0d37ec30851aa2492df2a6870.tar.bz2
forums-fbe7c6550b29ecc0d37ec30851aa2492df2a6870.tar.xz
forums-fbe7c6550b29ecc0d37ec30851aa2492df2a6870.zip
do not process if all ASCII
git-svn-id: file:///svn/phpbb/trunk@6640 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_messenger.php')
-rw-r--r--phpBB/includes/functions_messenger.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index b54a86766a..113d9a6178 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -1395,6 +1395,12 @@ function mail_encode($str, $compliant = true)
return $start . $encoded_str . $end;
}
+ // If there is only ASCII data, we just return what we want, no need to process.
+ if (strlen($str) === utf8_strlen($str))
+ {
+ return $start . implode($spacer, str_split($encoded_str, $split_length)) . $end;
+ }
+
// What we do is encoding/decoding forth and back and checking
// for a valid utf8 string to make sure no lines include half-baked data.
$correct_encode = false;