Se connecter avec
S'enregistrer | Connectez-vous

Probleme avec lettre accentuée

Dernière réponse : dans Programmation
Lassé par la pub ? Créez un compte

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  2. "<a href="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" target="_blank">http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd</a>">
  3. <html>
  4.  
  5. <head>
  6. <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
  7. <meta name="description" content="description"/>
  8. <meta name="keywords" content="keywords"/>
  9. <meta name="author" content="author"/>
  10. <link rel="stylesheet" type="text/css" href="default.css" media="screen"/>
  11. <title>Info-Dev</title>
  12. </head>
  13.  
  14. <body>
  15.  
  16. <div class="outer-container">
  17.  
  18. <div class="inner-container">
  19.  
  20. <div class="header">
  21.  
  22. <div class="title">
  23.  
  24. <span class="sitename"><a href="accueil.php">InfoDev</a></span>
  25. <div class="slogan">Site intranet de l'entreprise</div>
  26.  
  27. </div>
  28.  
  29. </div>
  30.  
  31. <div class="path">
  32.  
  33. <a href="accueil.php">Accueil</a> ›› <a href="accueil.php">Recherche d'un projet</a>
  34.  
  35.  
  36. </div>
  37.  
  38. <div class="main">
  39.  
  40. <div class="content">
  41.  
  42.  
  43. <?php
  44.  
  45. mysql_connect("localhost", "root", "");
  46.  
  47. mysql_select_db("infodev");
  48.  
  49.  
  50.  
  51. $nomproj=$_POST['nomproj'];
  52.  
  53.  
  54.  
  55.  
  56.  
  57. $wahou = mysql_query("SELECT NumClient, EtatProjet FROM projet WHERE NomProjet='$nomproj'");
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65. while ($reponse= mysql_fetch_array($wahou))
  66. {
  67. echo "<table border=1>";
  68. echo "<tr>";
  69. echo "<td>";
  70. echo " ";
  71.  
  72. echo $reponse['NumClient'];
  73.  
  74. echo " ";
  75. echo " ";
  76.  
  77. echo $reponse['EtatProjet'];
  78.  
  79.  
  80. echo "</td>";
  81. echo "</tr>";
  82. echo "</table>";
  83. }
  84.  
  85. ?>
  86.  
  87.  
  88. </div>
  89. <div class="navigation">
  90.  
  91. <h2>Info Dev</h2>
  92. <ul>
  93. <li><a href="accueil.php">Liste des salaries</a></li>
  94. <li><a href="accueil.php">Horaires des salaries</a></li>
  95.  
  96.  
  97. </ul>
  98.  
  99. <h2>Les projets</h2>
  100. <ul>
  101. <li><a href="seekprojet.php">Rechercher un projet</a></li>
  102. <li><a href="listeprojets.php">Liste de tout les projets</a></li>
  103. </ul>
  104.  
  105.  
  106.  
  107. </div>
  108.  
  109. <div class="clearer"> </div>
  110.  
  111. </div>
  112.  
  113. <div class="footer">
  114.  
  115. <span class="left">
  116.  
  117.  
  118.  
  119. </span>
  120.  
  121. <span class="right">
  122.  
  123.  
  124.  
  125. </span>
  126.  
  127. <div class="clearer"></div>
  128.  
  129. </div>
  130.  
  131. </div>
  132.  
  133. </div>
  134.  
  135. </body>
  136.  
  137. </html>


voila voila

(et les balises CODE :??: )


Bon tu es en UTF-8, donc tu as bien remplacé tous tes é à ù ... par des entitées html ? et/ou ton fichier est bien sauvegardé en utf-8 dans ton editeur ?

Ton charset est egalement bien envoyé dans ton header ? (vu que tu es en local doit pas y'en avoir du tout ...)

1/ pour les balises CODE.

Avec l'icone tu vas ajouter les balises [ CODE] et [ /CODE] (sans espaces) autour de ton code HTML afin qu'il soit bien présenté ici :) 


2/ pour ton problème, une entité html c'est par ex: "é" qui code le caractère "é" et sinon pourquoi tu es en UTF-8 au fait ? Peut etre que du iso-8859-15 suffirait ?

remplace ton debut par:

  1. <?php
  2. header('Content-Type: text/html; charset=iso-8859-15');
  3. echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "<a href="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" target="_blank">http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd</a>">' ?>
  4. <html xmlns="<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>" xml:lang="fr-fr">
  5. <head>
  6. ...
  7.  
  8. ...
  9. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />
  10. ...
Lassé par la pub ? Créez un compte