Revision: 20896
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=20896
Author: Caeies
Date: 2009-11-25 16:35:37 +0000 (Wed, 25 Nov 2009)
Log Message:
-----------
Bug fix : check for already encoded utf8 stuff ... instead of forcing it in all cases since utf8_encode(utf8_encode(X)) != utf_8_encode(X) if X is not pure ascii
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 16:06:05 UTC (rev 20895)
+++ modules/email/trunk/inc/class.mail_msg_base.inc.php 2009-11-25 16:35:37 UTC (rev 20896)
@@ -4437,7 +4437,7 @@
*/
function ascii2utf($text = '')
{
- if ($text == utf8_encode($text))
+ if ((function_exists('mb_detect_encoding') && mb_detect_encoding($text) == 'UTF-8'))
{
return $text;
}
Hi Caeies,