rustine pour le oe lie dans les noms de ville
authorPascal Corpet <pascal.corpet@m4x.org>
Sun, 3 Jul 2005 03:20:23 +0000 (03:20 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:29:28 +0000 (23:29 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-760

include/geoloc.inc.php

index 4a1bf07..73a69ed 100644 (file)
@@ -78,7 +78,7 @@ function get_address_infos($txt) {
     $keys = explode('|',fgets($f));
     $vals = explode('|',fgets($f));
     $infos = array();
-    foreach ($keys as $i=>$key) if($vals[$i]) $infos[$key] = ($key == 'sql')?$vals[$i]:utf8_decode($vals[$i]);
+    foreach ($keys as $i=>$key) if($vals[$i]) $infos[$key] = ($key == 'sql')?$vals[$i]:utf8_decode(strtr($vals[$i], array(chr(197).chr(147) => "&oelig;")));
     global $globals;
     if ($infos['sql'])
        $globals->xdb->execute("REPLACE INTO geoloc_city VALUES ".$infos['sql']);