I have the same kind of issue, although it only prevents the markers
from showing up in IE, *not in Firefox or Safari*.

I do think its an encoding issue, so what I'm going to try and I hope
works for your French accents, is to .. remove them with this sort of
function:
function convertitAccents ($string) {
    $table = array(
        'Š'=>'S', 'š'=>'s', 'Đ'=>'Dj', 'đ'=>'dj', 'Ž'=>'Z', 'ž'=>'z',
'Č'=>'C', 'č'=>'c', 'Ć'=>'C', 'ć'=>'c',
        'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A',
'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E',
        'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', 'Ï'=>'I',
'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O',
        'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U', 'Ú'=>'U', 'Û'=>'U',
'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss',
        'à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'å'=>'a',
'æ'=>'a', 'ç'=>'c', 'è'=>'e', 'é'=>'e',
        'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i', 'ï'=>'i',
'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o',
        'ô'=>'o', 'õ'=>'o', 'ö'=>'o', 'ø'=>'o', 'ù'=>'u', 'ú'=>'u',
'û'=>'u', 'ý'=>'y', 'ý'=>'y', 'þ'=>'b',
        'ÿ'=>'y', 'Ŕ'=>'R', 'ŕ'=>'r',
    );

    return strtr($string, $table);
}

That's my immediate response after poking around for a little bit and
not finding any better solution.



On 9 sep, 13:13, DaveGivesPHPaShot <tolman.da...@gmail.com> wrote:
> Hello, I am trying to duplicate this google code tutorial on using
> MySql and PHP with Google Maps V3.
>
> http://code.google.com/intl/fr/apis/maps/articles/phpsqlajax_v3.html
>
> I have foreign characters (well they aren't "foreign" for everyone,
> but you know what I mean, right?) in my MySql database.
>
> When I call this php page
>
> http://www.oukwakan.org/phpsqlajax_genxml_jdm2.php
>
> My code breaks after <markers><marker nom="Halle de la Martini
> because it's "Halle de la Martinière." (accent on the E right after
> "Martini")
>
> I think I have to correctly specify the formatting of the XML output
> file in the PHP genxml and I am not yet doing it correctly. Right ?
> This problem is mentioned in the above tutorial, but my syntax must be
> wrong.
>
> Here is my code: forhttp://www.oukwakan.org/phpsqlajax_genxml_jdm2.php
> <?php
>
> require("phpsqlajax_dbinfo.php");
>
> // Start XML file, create parent node
>
> $dom = new DOMDocument("1.0");
> $node = $dom->createElement("markers");
> $parnode = $dom->appendChild($node);
>
> // Opens a connection to a MySQL server
>
> $connection=mysql_connect (localhost, $username, $password);
> if (!$connection) {  die('Not connected : ' . mysql_error());}
>
> // Set the active MySQL database
>
> $db_selected = mysql_select_db($database, $connection);
> if (!$db_selected) {
>   die ('Can\'t use db : ' . mysql_error());}
>
> // Retrieve data from Query String
> $nom = $_GET['nom'];
> $jour = $_GET['jour'];
> $horaires = $_GET['horaires'];
> $remarques = $_GET['remarques'];
> $lat = $_GET['lat'];
> $lng = $_GET['lng'];
> $educatif = $_GET['educatif'];
> // Update later - Escape User Input to help prevent SQL Injection
> $age = mysql_real_escape_string($age);
> $sex = mysql_real_escape_string($sex);
> $wpm = mysql_real_escape_string($wpm);
> //SECURITY ABOVE NEEDS TO BE UPDATED AS WE GO
>         //build query
> $query = "SELECT * FROM jourdemarche WHERE 1";
>
>         //Execute query
> $result = mysql_query($query);
> if (!$result) {
>   die('Invalid query: ' . mysql_error());}
>
> header('Content-type: text/xml; charset=UTF-8');
>
> // Iterate through the rows, adding XML nodes for each
>
> while ($row = @mysql_fetch_assoc($result)){
>   // ADD TO XML DOCUMENT NODE
>   $node = $dom->createElement("marker");
>   $newnode = $parnode->appendChild($node);
>   $newnode->setAttribute("nom",$row['nom']);
>   $newnode->setAttribute("descriptif", $row['descriptif']);
>   $newnode->setAttribute("lat", $row['lat']);
>   $newnode->setAttribute("lng", $row['lng']);
>   $newnode->setAttribute("entreprise", $row['entreprise']);
>
> }
>
> echo $dom->saveXML();
>
> ?>
>
> Thanks for your help !

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to