[Mapbender-commits] r5308 - trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Jan 13 04:08:55 EST 2010


Author: kmq
Date: 2010-01-13 04:08:53 -0500 (Wed, 13 Jan 2010)
New Revision: 5308

Modified:
   trunk/mapbender/http/classes/class_json.php
Log:
only convert to utf-8 if string is not already utf-8

Modified: trunk/mapbender/http/classes/class_json.php
===================================================================
--- trunk/mapbender/http/classes/class_json.php	2010-01-12 16:18:38 UTC (rev 5307)
+++ trunk/mapbender/http/classes/class_json.php	2010-01-13 09:08:53 UTC (rev 5308)
@@ -78,7 +78,9 @@
                     $var->$m = $this->json_fix_charset($v);
                 }
             } elseif (is_string($var)) {
-                $var = utf8_encode($var);
+				if(mb_detect_encoding($var) != "UTF-8"){
+                	$var = utf8_encode($var);
+				}
             }
             return $var;
         }



More information about the Mapbender_commits mailing list