[20900] Bug fix : avoid returning utf-8 when the php configuration doesn' t offert more encoding to the mb_detect_encoding

Caeies <[email protected]>
Newsgroups gmane.comp.web.phpgroupware.cvs
Message-ID <[email protected]>
Revision: 20900
          http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=20900
Author:   Caeies
Date:     2009-11-25 18:58:41 +0000 (Wed, 25 Nov 2009)
Log Message:
-----------
Bug fix : avoid returning utf-8 when the php configuration doesn't offert more encoding to the mb_detect_encoding

Modified Paths:
--------------
    modules/email/trunk/inc/class.mail_msg_base.inc.php

Modified: modules/email/trunk/inc/class.mail_msg_base.inc.php
===================================================================
--- modules/email/trunk/inc/class.mail_msg_base.inc.php	2009-11-25 18:01:34 UTC (rev 20899)
+++ modules/email/trunk/inc/class.mail_msg_base.inc.php	2009-11-25 18:58:41 UTC (rev 20900)
@@ -4437,7 +4437,7 @@
 		*/
 		function ascii2utf($text = '')
 		{	
-			if ((function_exists('mb_detect_encoding') && mb_detect_encoding($text) == 'UTF-8'))
+			if ((function_exists('mb_detect_encoding') && mb_detect_encoding($text, null, true) == 'UTF-8'))
 			{
 				return $text;
 			}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.