X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fgeoloc.inc.php;h=89abd27ce819275473d26d9873331b6d70ccb0c9;hb=716dedc5f2793d8c79cc886cc9c3101c40d38d05;hp=00e8fa979da05ff89c76a68ccda997ba0cc52a9a;hpb=64087a3430249f84d999be01219697c925c5c7f7;p=platal.git diff --git a/include/geoloc.inc.php b/include/geoloc.inc.php index 00e8fa9..89abd27 100644 --- a/include/geoloc.inc.php +++ b/include/geoloc.inc.php @@ -226,7 +226,7 @@ function get_address_text($adr) if (isset($adr['city']) && $adr['city']) $l .= $adr['city']; } if ($l) $t .= "\n".trim($l); - if ($adr['country'] != '00' && (!$adr['countrytxt'] || $adr['countrytxt'] == strtoupper($adr['countrytxt']))) { + if ($adr['country'] != '00' && (!$adr['countrytxt'] || $adr['countrytxt'] == mb_strtoupper($adr['countrytxt']))) { $res = XDB::query("SELECT pays FROM geoloc_pays WHERE a2 = {?}", $adr['country']); $adr['countrytxt'] = $res->fetchOneCell(); } @@ -244,8 +244,8 @@ function get_address_text($adr) */ function compare_addresses_text($a, $b) { - $ta = strtoupper(preg_replace(array("/[0-9,\"'#~:;_\- ]/", "/\r\n/"), array("", "\n"), $a)); - $tb = strtoupper(preg_replace(array("/[0-9,\"'#~:;_\- ]/", "/\r\n/"), array("", "\n"), $b)); + $ta = mb_strtoupper(preg_replace(array("/[0-9,\"'#~:;_\- ]/", "/\r\n/"), array("", "\n"), $a)); + $tb = mb_strtoupper(preg_replace(array("/[0-9,\"'#~:;_\- ]/", "/\r\n/"), array("", "\n"), $b)); $la = explode("\n", $ta); $lb = explode("\n", $tb);