From b3481ffa2097b304291c13cabd00b229695f643c Mon Sep 17 00:00:00 2001 From: uckelman Date: Tue, 27 Jul 2010 20:47:16 +0000 Subject: Added is_ascii(). git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@7041 67b53d14-2c14-4ace-a08f-0dab2b34000c --- src/Util.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Util.php b/src/Util.php index 38aec11..c11263e 100644 --- a/src/Util.php +++ b/src/Util.php @@ -8,11 +8,9 @@ function build_message_id($postId, $editId, $time, $forumHost) { return "<$time.$postId.$editId.bridge@$forumHost>"; } -/* function is_ascii($string) { - return !preg_match('/[^\x00-\x7F]/S', $str); + return !preg_match('/[^[:ascii:]]/', $str); } -*/ function utf8_quote($string) { return '=?UTF-8?B?' . base64_encode($string) . '?='; -- cgit v1.2.3