[Mapbender-commits] r2942 - branches/nimix_dev/http/extensions

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Sep 16 08:17:58 EDT 2008


Author: nimix
Date: 2008-09-16 08:17:58 -0400 (Tue, 16 Sep 2008)
New Revision: 2942

Modified:
   branches/nimix_dev/http/extensions/ext_featureInfoTunnel.php
Log:
comment

Modified: branches/nimix_dev/http/extensions/ext_featureInfoTunnel.php
===================================================================
--- branches/nimix_dev/http/extensions/ext_featureInfoTunnel.php	2008-09-16 11:54:19 UTC (rev 2941)
+++ branches/nimix_dev/http/extensions/ext_featureInfoTunnel.php	2008-09-16 12:17:58 UTC (rev 2942)
@@ -37,12 +37,18 @@
 	}	
 }
 
-function toUTF8($str){	
+function toUTF8($str){
+	//check if we have an encoding meta tag
 	if(preg_match('/<meta.*charset=([^"\s]*).*>/',$str, $charset)){
+		//if so convert encoding to UTF-8
 		$ret = mb_convert_encoding($str, "UTF-8", $charset[1]);
+		
+		//return with changed meta encoding tag
 		$meta = str_replace($charset[1], "UTF-8", $charset[0]);
 		return str_replace($charset[0], $meta, $ret);
 	}
+	
+	//we don't have an defnied encoding so send unchanged
 	return $str;
 }
 ?>
\ No newline at end of file



More information about the Mapbender_commits mailing list