From 7fe662a30b494c3d7b185227c77421a260932774 Mon Sep 17 00:00:00 2001 From: uckelman Date: Tue, 13 Apr 2010 19:33:43 +0000 Subject: 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 --- src/Util.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/Util.php') 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) . '?='; +} + ?> -- cgit v1.2.3