summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruckelman <uckelman@nomic.net>2010-04-13 19:33:43 +0000
committeruckelman <uckelman@nomic.net>2010-04-13 19:33:43 +0000
commit7fe662a30b494c3d7b185227c77421a260932774 (patch)
tree8803390515aa7cca28c3934fabcb3f6bb7e088a5
parent75b04e5b2d2c843b21e8ea0cb15cedfda5059a54 (diff)
Added utf8_quote() for email headers.
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6695 67b53d14-2c14-4ace-a08f-0dab2b34000c
-rw-r--r--src/Util.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Util.php b/src/Util.php
index 2384911..f06718d 100644
--- a/src/Util.php
+++ b/src/Util.php
@@ -8,4 +8,14 @@ function build_message_id($time, $postId, $forumHost) {
return "<$time.$postId.bridge@$forumHost>";
}
+/*
+function is_ascii($string) {
+ return !preg_match('/[^\x00-\x7F]/S', $str);
+}
+*/
+
+function utf8_quote($string) {
+ return '=?UTF-8?B?' . base64_encode($string) . '?=';
+}
+
?>