Commit r2396: https://sourceforge.net/p/mrbs/code/2396/

------------------------------------------------------------------------
r2396 | cimorrison | 2012-09-05 17:57:53 +0100 (Wed, 05 Sep 2012) | 1 line
Changed paths:
   M /mrbs/trunk/web/functions_ical.inc

Tidied up last change
------------------------------------------------------------------------

Index: mrbs/trunk/web/functions_ical.inc
===================================================================
--- mrbs/trunk/web/functions_ical.inc   (revision 2395)
+++ mrbs/trunk/web/functions_ical.inc   (revision 2396)
@@ -519,13 +519,13 @@
 { 
   $line_split = "\r\n ";  // The RFC also allows a tab instead of a space
   
-  // We assume that the string is in ASCII or UTF-8 and therefore that a space
-  // character is one octet long.   If we ever switched for some reason to 
using
-  // for example UTF-16 this assumption would be invalid.
+  // We assume that we are using UTF-8 and therefore that a space character
+  // is one octet long.   If we ever switched for some reason to using for
+  // example UTF-16 this assumption would be invalid.
   if (function_exists('mb_detect_encoding'))
   {
-    $encoding = mb_detect_encoding($str);
-    if (!in_array($encoding, array('ASCII', 'UTF-8')))
+    $encoding = mb_detect_encoding($str, 'UTF-8', TRUE);
+    if ($encoding != 'UTF-8')
     {
       trigger_error("MRBS: internal error - using unsupported character set", 
E_USER_WARNING);
     }

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to