svn commit: r693 - trunk/mapbender/http/classes/class_wmc.php

christoph at osgeo.org christoph at osgeo.org
Tue Jul 25 08:27:45 EDT 2006


Author: christoph
Date: 2006-07-25 12:27:44+0000
New Revision: 693

Modified:
   trunk/mapbender/http/classes/class_wmc.php

Log:
fixed character coding


Modified: trunk/mapbender/http/classes/class_wmc.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/classes/class_wmc.php?view=diff&rev=693&p1=trunk/mapbender/http/classes/class_wmc.php&p2=trunk/mapbender/http/classes/class_wmc.php&r1=692&r2=693
==============================================================================
--- trunk/mapbender/http/classes/class_wmc.php	(original)
+++ trunk/mapbender/http/classes/class_wmc.php	2006-07-25 12:27:44+0000
@@ -121,7 +121,6 @@
 	$wmc = db_fetch_row($res);
 	$verbose = "<pre>" . htmlentities($wmc[0]) . "</pre>";
 
-//	$data = str_replace("&", "&amp;", $wmc[0]);
 	$data = str_replace("&#38;", "&amp;", $wmc[0]);
 	
 	$parser = xml_parser_create(CHARSET);
@@ -197,15 +196,15 @@
 						$verbose .= $this->wmc_bBox_maxy . "<br>\n"; 
 				}
 				if(strtoupper($element[tag]) == "NAME"){
-						$this->wmc_name = $this->char_encode($element[value]);
+						$this->wmc_name = $element[value];
 						$verbose .= $this->wmc_name . "<br>\n"; 
 				}
 				if(strtoupper($element[tag]) == "TITLE"){
-						$this->wmc_title = $this->char_encode($element[value]);
+						$this->wmc_title = $element[value];
 						$verbose .= $this->wmc_title . "<br>\n"; 
 				}
 				if(strtoupper($element[tag]) == "ABSTRACT"){
-						$this->wmc_abstract = $this->char_encode($element[value]);
+						$this->wmc_abstract = $element[value];
 						$verbose .= $this->wmc_abstract . "<br>\n"; 
 				}
 				if(strtoupper($element[tag]) == "CONTACTINFORMATION" && $element['type'] == "open"){
@@ -214,19 +213,19 @@
 				}
 				if ($contactinformation) {
 					if(strtoupper($element[tag]) == "CONTACTPOSITION"){
-							$this->wmc_contactposition = $this->char_encode($element[value]);
+							$this->wmc_contactposition = $element[value];
 							$verbose .= $this->wmc_contactposition . "<br>\n"; 
 					}
 					if(strtoupper($element[tag]) == "CONTACTVOICETELEPHONE"){
-							$this->wmc_contactvoicetelephone = $this->char_encode($element[value]);
+							$this->wmc_contactvoicetelephone = $element[value];
 							$verbose .= $this->wmc_contactvoicetelephone . "<br>\n"; 
 					}
 					if(strtoupper($element[tag]) == "CONTACTFACSIMILETELEPHONE"){
-							$this->wmc_contactfacsimiletelephone = $this->char_encode($element[value]);
+							$this->wmc_contactfacsimiletelephone = $element[value];
 							$verbose .= $this->wmc_contactfacsimiletelephone . "<br>\n"; 
 					}
 					if(strtoupper($element[tag]) == "CONTACTELECTRONICMAILADDRESS"){
-							$this->wmc_contactemail = $this->char_encode($element[value]);
+							$this->wmc_contactemail = $element[value];
 							$verbose .= $this->wmc_contactemail . "<br>\n"; 
 					}
 					if(strtoupper($element[tag]) == "CONTACTPERSONPRIMARY" && $element['type'] == "open"){
@@ -235,11 +234,11 @@
 					}
 					if ($contactpersonprimary) {
 						if(strtoupper($element[tag]) == "CONTACTPERSON"){
-								$this->wmc_contactperson = $this->char_encode($element[value]);
+								$this->wmc_contactperson = $element[value];
 								$verbose .= $this->wmc_contactperson . "<br>\n"; 
 						}
 						if(strtoupper($element[tag]) == "CONTACTORGANIZATION"){
-								$this->wmc_contactorganization = $this->char_encode($element[value]);
+								$this->wmc_contactorganization = $element[value];
 								$verbose .= $this->wmc_contactorganization . "<br>\n"; 
 						}
 						if(strtoupper($element[tag]) == "CONTACTPERSONPRIMARY" && $element['type'] == "close"){
@@ -253,19 +252,19 @@
 					}
 					if ($contactaddress) {
 						if(strtoupper($element[tag]) == "ADDRESSTYPE"){
-								$this->wmc_contactaddresstype = $this->char_encode($element[value]);
+								$this->wmc_contactaddresstype = $element[value];
 								$verbose .= $this->wmc_contactaddresstype . "<br>\n"; 
 						}
 						if(strtoupper($element[tag]) == "ADDRESS"){
-								$this->wmc_contactaddress = $this->char_encode($element[value]);
+								$this->wmc_contactaddress = $element[value];
 								$verbose .= $this->wmc_contactaddress . "<br>\n"; 
 						}
 						if(strtoupper($element[tag]) == "CITY"){
-								$this->wmc_contactcity = $this->char_encode($element[value]);
+								$this->wmc_contactcity = $element[value];
 								$verbose .= $this->wmc_contactcity . "<br>\n"; 
 						}
 						if(strtoupper($element[tag]) == "STATEORPROVINCE"){
-								$this->wmc_contactstateorprovince = $this->char_encode($element[value]);
+								$this->wmc_contactstateorprovince = $element[value];
 								$verbose .= $this->wmc_contactstateorprovince . "<br>\n"; 
 						}
 						if(strtoupper($element[tag]) == "POSTCODE"){
@@ -273,7 +272,7 @@
 								$verbose .= $this->wmc_contactpostcode . "<br>\n"; 
 						}
 						if(strtoupper($element[tag]) == "COUNTRY"){
-								$this->wmc_contactcountry = $this->char_encode($element[value]);
+								$this->wmc_contactcountry = $element[value];
 								$verbose .= $this->wmc_contactcountry . "<br>\n"; 
 						}
 						if(strtoupper($element[tag]) == "CONTACTADDRESS" && $element['type'] == "close"){
@@ -334,7 +333,7 @@
 					}
 					if(strtoupper($element[tag]) == "KEYWORD"){
 						$cnt_keyword++;
-						$this->wmc_keyword[$cnt_keyword] = $this->char_encode($element[value]);
+						$this->wmc_keyword[$cnt_keyword] = $element[value];
 						$verbose .= $this->wmc_keyword[$cnt_keyword] . "<br>\n"; 
 					}
 				}
@@ -426,17 +425,17 @@
 									$verbose .= $this->wmc_layer_style_sld_url[$cnt_layer][$cnt_style] . "<br>\n";
 								 }
 								 if(strtoupper($element[tag]) == "TITLE"){
-								 	$this->wmc_layer_style_sld_title[$cnt_layer][$cnt_style] = $this->char_encode($element[value]);
+								 	$this->wmc_layer_style_sld_title[$cnt_layer][$cnt_style] = $element[value];
 									$verbose .= $this->wmc_layer_style_sld_title[$cnt_layer][$cnt_style] . "<br>\n";
 								 }
 							 }
 							 else {
 								 if(strtoupper($element[tag]) == "NAME"){
-								 	$this->wmc_layer_style_name[$cnt_layer][$cnt_style] = $this->char_encode($element[value]);
+								 	$this->wmc_layer_style_name[$cnt_layer][$cnt_style] = $element[value];
 									$verbose .= $this->wmc_layer_style_name[$cnt_layer][$cnt_style] . "<br>\n";
 								 }
 								 if(strtoupper($element[tag]) == "TITLE"){
-								 	$this->wmc_layer_style_title[$cnt_layer][$cnt_style] = $this->char_encode($element[value]);
+								 	$this->wmc_layer_style_title[$cnt_layer][$cnt_style] = $element[value];
 									$verbose .= $this->wmc_layer_style_title[$cnt_layer][$cnt_style] . "<br>\n";
 								 }
 								 if(strtoupper($element[tag]) == "LEGENDURL" && $element[type] == "open"){
@@ -473,7 +472,7 @@
 						 	 $server = true;
 						 	 $this->wmc_wms_service[$cnt_layer] = $element[attributes]["service"];
 						 	 $this->wmc_wms_version[$cnt_layer] = $element[attributes]["version"];
-						 	 $this->wmc_wms_title[$cnt_layer] = $this->char_encode($element[attributes]["title"]);
+						 	 $this->wmc_wms_title[$cnt_layer] = $element[attributes]["title"];
 						 	 $verbose .= "Server begin<br>\n";
 							 $verbose .= $this->wmc_wms_service[$cnt_layer] . "<br>\n";
 							 $verbose .= $this->wmc_wms_version[$cnt_layer] . "<br>\n";
@@ -490,15 +489,15 @@
 							 }
 						 }
 						 if(strtoupper($element[tag]) == "NAME"){
-						 		 $this->wmc_layer_name[$cnt_layer] = $this->char_encode($element[value]);
+						 		 $this->wmc_layer_name[$cnt_layer] = $element[value];
 								 $verbose .= $this->wmc_layer_name[$cnt_layer] . "<br>\n";
 						 }
 						 if(strtoupper($element[tag]) == "TITLE"){
-						 		 $this->wmc_layer_title[$cnt_layer] = $this->char_encode($element[value]);
+						 		 $this->wmc_layer_title[$cnt_layer] = $element[value];
 								 $verbose .= $this->wmc_layer_title[$cnt_layer] . "<br>\n";
 						 }
 						 if(strtoupper($element[tag]) == "ABSTRACT"){
-						 		 $this->wmc_layer_abstract[$cnt_layer] = $this->char_encode($element[value]);
+						 		 $this->wmc_layer_abstract[$cnt_layer] = $element[value];
 								 $verbose .= $this->wmc_layer_abstract[$cnt_layer] . "<br>\n";
 						 }
 						 if(strtoupper($element[tag]) == "SRS"){
@@ -758,13 +757,6 @@
 		}
 		return $wmc_string;
 	}
-
-	function char_encode($s){
-		if(CHARSET == 'UTF-8'){
-			$s = utf8_encode($s);	
-		}
-		return $s;
-	}
 } 
 // end class
 ?>




More information about the Mapbender_commits mailing list