Accueil Ti-Gen Foire Aux Questions Chat sur le chan #tigcc sur IRC
Liste des membres Rechercher Aide
Bienvenue Invité !   Se connecter             Mes sujets   
Administrer
0 membre(s) et 1 visiteur(s) actif(s) durant les 5 dernières minutes Utilisateurs actifs : Aucun membre + 1 visiteur
Avant de poster sur le forum, il y a des régles de bases à respecter pour une bonne entente et un respect de tous.
Veuillez lire la charte du forum.
  :: Index » Forum PC » Programmation Web » Pb de charset (7 réponse(s))
./POST DE DEPART (post n°0)   Marquer comme non lu.
mic Ecrit le: Jeudi 10 novembre 2005 à 23:03 Déconnecté(e)    Voir le profil de mic Envoyer un email à mic Visiter le site WEB de mic Envoyer un message privé à mic  

Jai un pb de charset avec mozilla et ma shootbox pws, les caractères saffichent mal et cela depuis qu jai mis à jour mozilla (v1.5 beta 2).
Que dois je faire pour que ca saffiche correctement comme avant.
Voici le code de bloc.php, que dois je modifier ??


<?php
if(!(defined('PWSPHP'))){die('Hum hackeur...n\'est-ce pas '.$_SERVER['REMOTE_ADDR'].' ?');}

$chaine = "
<script type=\"text/javascript\">
function replaceSubstring(inputString, fromString, toString) {
// Goes through the inputString and replaces every occurrence of fromString with toString
var temp = inputString;
if (fromString == \"\") {
return inputString;
}
if (toString.indexOf(fromString) == -1) { // If the string being replaced is not a part of the replacement string (normal situation)
while (temp.indexOf(fromString) != -1) {
var toTheLeft = temp.substring(0, temp.indexOf(fromString));
var toTheRight = temp.substring(temp.indexOf(fromString)+fromString.length, temp.length);
temp = toTheLeft + toString + toTheRight;
}
} else { // String being replaced is part of replacement string (like \"+\" being replaced with \"++\") - prevent an infinite loop
var midStrings = new Array(\"~\", \"`\", \"_\", \"^\",\"#\");
var midStringLen = 1;
var midString = \"\";
// Find a string that doesn't exist in the inputString to be used
// as an \"inbetween\" string
while (midString == \"\") {
for (var i=0; i < midStrings.length; i++) {
var tempMidString = \"\";
for (var j=0; j < midStringLen; j++) { tempMidString += midStrings[i]; }
if (fromString.indexOf(tempMidString) == -1) {
midString = tempMidString;
i = midStrings.length + 1;
}
}
} // Keep on going until we build an \"inbetween\" string that doesn't exist
// Now go through and do two replaces - first, replace the \"fromString\" with the \"inbetween\" string
while (temp.indexOf(fromString) != -1) {
var toTheLeft = temp.substring(0, temp.indexOf(fromString));
var toTheRight = temp.substring(temp.indexOf(fromString)+fromString.length, temp.length);
temp = toTheLeft + midString + toTheRight;
}
// Next, replace the \"inbetween\" string with the \"toString\"
while (temp.indexOf(midString) != -1) {
var toTheLeft = temp.substring(0, temp.indexOf(midString));
var toTheRight = temp.substring(temp.indexOf(midString)+midString.length, temp.length);
temp = toTheLeft + toString + toTheRight;
}
} // Ends the check to see if the string being replaced is part of the replacement string or not
return temp; // Send the updated string back to the user
} // Ends the \"replaceSubstring\" function

function refresh_sh00tb0x(){
var pseudo=document.getElementById('sh00t_pseudo').value;
var txt2sh00t=document.getElementById('sh00t_txt').value;

if (pseudo=='') {
alert('TON PSEUDO !!!');
document.getElementById('sh00t_pseudo').focus();
return;
}
if (txt2sh00t=='') {
alert('ET TON TEXTE ALORS ?!!');
document.getElementById('sh00t_txt').focus();
return;
}
var sh00t_pseudo = document.getElementById('sh00t_pseudo').value;
var sh00t_txt = document.getElementById('sh00t_txt').value;
sh00t_pseudo = replaceSubstring (sh00t_pseudo,'+','%2B');
sh00t_pseudo = replaceSubstring (sh00t_pseudo,'#','%23');
sh00t_pseudo = replaceSubstring (sh00t_pseudo,'&','%26');
sh00t_txt = replaceSubstring (sh00t_txt,'+','%2B');
sh00t_txt = replaceSubstring (sh00t_txt,'#','%23');
sh00t_txt = replaceSubstring (sh00t_txt,'&','%26');
document.getElementById('sh00tb0x_txt').src='modules/sh00tb0x/requete.php?theme=&theme&nbre_de_sh00ts=$result_blocs->parametre2&sh00ting_pseudo='+sh00t_pseudo+'&sh00t='+sh00t_txt;
document.getElementById('sh00t_pseudo').value='$pseudo';
document.getElementById('sh00t_txt').value='';
}
</script>
<center>
<table cellspacing='0' cellpadding='0'>
<tr>


<td><iframe frameborde type='text' r='0' style=\"border: 1px solid #000000;\" id='sh00tb0x_txt' name='sh00tb0x_txt' src=\"modules/sh00tb0x/requete.php?theme=&theme&nbre_de_sh00ts=$result_blocs->parametre2\" width=\"180\" height=\"400\"></iframe></td>
</tr>
".((($result_blocs->parametre3=="on" && $pseudo!="") || $result_blocs->parametre3=="")?("<tr><td>Pseudo<br /><input type='text' name='sh00t_pseudo' id='sh00t_pseudo' style=\"width: 115px border: 1px solid #000000;\" value=\"$pseudo\" /></td></tr>
<tr>
<td>Message<br /><input type='text' name='sh00t_txt' id='sh00t_txt' style=\"width: 115px border: 1px solid #000000;\" /></td>



</tr>
<tr>
<td align='center'><br /><input type='button' value='Envoyer' onclick=\"refresh_sh00tb0x();\" /></td></tr>"):("<tr><td align='center'><br /><b>sh00tb0x réservée<br />aux membres</b></td></tr>"))."
</table><br />
[<a href=\"#\" onclick=\"javascript:document.getElementById('sh00tb0x_txt').src='modules/sh00tb0x/requete.php?theme=&theme&nbre_de_sh00ts=$result_blocs->parametre2'\">Refresh</a>]
 ".((($result_blocs->parametre3=="on" && $pseudo!="") || $result_blocs->parametre3=="")?("
[<a href=\"#\" onclick=\"javascript:window.open('modules/sh00tb0x/smileys.php?theme=&theme','Smileys','width=400, location=no, menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=yes')\">Smileys</a>]"):(""))."
<br /><br /><script type=\"text/javascript\">refresh_sh00tb0x</script>
</center>
";

bloc($result_blocs->parametre1,$chaine) ;


?>
TI-BANK :
http://www.ti-bank.be
http://pagesperso.laposte.net/bankti
http://www.ti-bank.fr.tc

Forum TI-BANK :
http://tibank.forumactif.com
    
./Post n°1   Marquer comme non lu.
geogeo Ecrit le: Jeudi 10 novembre 2005 à 23:15 Déconnecté(e)    Voir le profil de geogeo Envoyer un email à geogeo Visiter le site WEB de geogeo Envoyer un message privé à geogeo  


Manque après la balise HEAD (Mais faut la créer tout comme <HTML> et <BODY> et ne pas les oublier ceci dans la shootbox, plus précisément dans requete.php) :
<META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=windows-1252'>

D'ailleur je vais faire plaisir à Kevin Kofler puisque j'ai corrigé ce bug sur Ti-Gen. :D
-Edité le Jeudi 10 novembre 2005 à 23:16 par geogeo-
Webmaster du site.
Programmeur sur TI68K. Arkanoid, Nebulus, GFA-Basic.

Plus d'informations sur GFA-Basic (un langage Basic pour TI68K).
http://www.tigen.org/gfabasic
    
./Post n°2   Marquer comme non lu.
mic Ecrit le: Jeudi 10 novembre 2005 à 23:56 Déconnecté(e)    Voir le profil de mic Envoyer un email à mic Visiter le site WEB de mic Envoyer un message privé à mic  

Ca ne marche pas.


Et meme sur tigen, regarde, jai posté dans la shootbox et ya tjs le mme pb.
TI-BANK :
http://www.ti-bank.be
http://pagesperso.laposte.net/bankti
http://www.ti-bank.fr.tc

Forum TI-BANK :
http://tibank.forumactif.com
    
./Post n°3   Marquer comme non lu.
Kevin Kofler Ecrit le: Vendredi 11 novembre 2005 à 18:43 Déconnecté(e)    Voir le profil de Kevin Kofler Envoyer un email à Kevin Kofler Visiter le site WEB de Kevin Kofler Envoyer un message privé à Kevin Kofler  


C'est probablement parce que le META apparaît au mauvais endroit (trop tard). C'est censé être dans le <HEAD> normalement.
Membre de l'équipe de TIGCC: http://tigcc.ticalc.org
Mainteneur du portage Linux/Unix de TIGCC: http://tigcc.ticalc.org/linux/
Membre de l'équipe de CalcForge: http://www.calcforge.org:70/

Participez à la reprise de Ti-Gen!
    
./Post n°4   Marquer comme non lu.
mic Ecrit le: Vendredi 11 novembre 2005 à 22:18 Déconnecté(e)    Voir le profil de mic Envoyer un email à mic Visiter le site WEB de mic Envoyer un message privé à mic  

J'ai mis ça et ça marche pas !

<HTML>
<HEAD>
<META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=windows-1252'>
</HEAD>
<BODY>
<?php
if(!(defined('PWSPHP'))){die('Hum hackeur...n\'est-ce pas '.$_SERVER['REMOTE_ADDR'].' ?');}

$chaine = "
<script type=\"text/javascript\">
function replaceSubstring(inputString, fromString, toString) {
// Goes through the inputString and replaces every occurrence of fromString with toString
var temp = inputString;
if (fromString == \"\") {
return inputString;
}
if (toString.indexOf(fromString) == -1) { // If the string being replaced is not a part of the replacement string (normal situation)
while (temp.indexOf(fromString) != -1) {
var toTheLeft = temp.substring(0, temp.indexOf(fromString));
var toTheRight = temp.substring(temp.indexOf(fromString)+fromString.length, temp.length);
temp = toTheLeft + toString + toTheRight;
}
} else { // String being replaced is part of replacement string (like \"+\" being replaced with \"++\") - prevent an infinite loop
var midStrings = new Array(\"~\", \"`\", \"_\", \"^\",\"#\");
var midStringLen = 1;
var midString = \"\";
// Find a string that doesn't exist in the inputString to be used
// as an \"inbetween\" string
while (midString == \"\") {
for (var i=0; i < midStrings.length; i++) {
var tempMidString = \"\";
for (var j=0; j < midStringLen; j++) { tempMidString += midStrings[i]; }
if (fromString.indexOf(tempMidString) == -1) {
midString = tempMidString;
i = midStrings.length + 1;
}
}
} // Keep on going until we build an \"inbetween\" string that doesn't exist
// Now go through and do two replaces - first, replace the \"fromString\" with the \"inbetween\" string
while (temp.indexOf(fromString) != -1) {
var toTheLeft = temp.substring(0, temp.indexOf(fromString));
var toTheRight = temp.substring(temp.indexOf(fromString)+fromString.length, temp.length);
temp = toTheLeft + midString + toTheRight;
}
// Next, replace the \"inbetween\" string with the \"toString\"
while (temp.indexOf(midString) != -1) {
var toTheLeft = temp.substring(0, temp.indexOf(midString));
var toTheRight = temp.substring(temp.indexOf(midString)+midString.length, temp.length);
temp = toTheLeft + toString + toTheRight;
}
} // Ends the check to see if the string being replaced is part of the replacement string or not
return temp; // Send the updated string back to the user
} // Ends the \"replaceSubstring\" function

function refresh_sh00tb0x(){
var pseudo=document.getElementById('sh00t_pseudo').value;
var txt2sh00t=document.getElementById('sh00t_txt').value;

if (pseudo=='') {
alert('TON PSEUDO !!!');
document.getElementById('sh00t_pseudo').focus();
return;
}
if (txt2sh00t=='') {
alert('ET TON TEXTE ALORS ?!!');
document.getElementById('sh00t_txt').focus();
return;
}
var sh00t_pseudo = document.getElementById('sh00t_pseudo').value;
var sh00t_txt = document.getElementById('sh00t_txt').value;
sh00t_pseudo = replaceSubstring (sh00t_pseudo,'+','%2B');
sh00t_pseudo = replaceSubstring (sh00t_pseudo,'#','%23');
sh00t_pseudo = replaceSubstring (sh00t_pseudo,'&','%26');
sh00t_txt = replaceSubstring (sh00t_txt,'+','%2B');
sh00t_txt = replaceSubstring (sh00t_txt,'#','%23');
sh00t_txt = replaceSubstring (sh00t_txt,'&','%26');
document.getElementById('sh00tb0x_txt').src='modules/sh00tb0x/requete.php?theme=&theme&nbre_de_sh00ts=$result_blocs->parametre2&sh00ting_pseudo='+sh00t_pseudo+'&sh00t='+sh00t_txt;
document.getElementById('sh00t_pseudo').value='$pseudo';
document.getElementById('sh00t_txt').value='';
}
</script>
<center>
<table cellspacing='0' cellpadding='0'>
<tr>


<td><iframe frameborde type='text' r='0' style=\"border: 1px solid #000000;\" id='sh00tb0x_txt' name='sh00tb0x_txt' src=\"modules/sh00tb0x/requete.php?theme=&theme&nbre_de_sh00ts=$result_blocs->parametre2\" width=\"180\" height=\"400\"></iframe></td>
</tr>
".((($result_blocs->parametre3=="on" && $pseudo!="") || $result_blocs->parametre3=="")?("<tr><td>Pseudo<br /><input type='text' name='sh00t_pseudo' id='sh00t_pseudo' style=\"width: 115px border: 1px solid #000000;\" value=\"$pseudo\" /></td></tr>
<tr>
<td>Message<br /><input type='text' name='sh00t_txt' id='sh00t_txt' style=\"width: 115px border: 1px solid #000000;\" /></td>



</tr>
<tr>
<td align='center'><br /><input type='button' value='Envoyer' onclick=\"refresh_sh00tb0x();\" /></td></tr>"):("<tr><td align='center'><br /><b>sh00tb0x réservée<br />aux membres</b></td></tr>"))."
</table><br />
[<a href=\"#\" onclick=\"javascript:document.getElementById('sh00tb0x_txt').src='modules/sh00tb0x/requete.php?theme=&theme&nbre_de_sh00ts=$result_blocs->parametre2'\">Refresh</a>]
 ".((($result_blocs->parametre3=="on" && $pseudo!="") || $result_blocs->parametre3=="")?("
[<a href=\"#\" onclick=\"javascript:window.open('modules/sh00tb0x/smileys.php?theme=&theme','Smileys','width=400, location=no, menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=yes')\">Smileys</a>]"):(""))."
<br /><br /><script type=\"text/javascript\">refresh_sh00tb0x</script>
</center>
";

bloc($result_blocs->parametre1,$chaine) ;


?>
</BODY>
</HTML>


Je l'ai fait pour le bloc.php et le requete.php
TI-BANK :
http://www.ti-bank.be
http://pagesperso.laposte.net/bankti
http://www.ti-bank.fr.tc

Forum TI-BANK :
http://tibank.forumactif.com
    
./Post n°5   Marquer comme non lu.
RHJPP Ecrit le: Samedi 12 novembre 2005 à 10:24 Déconnecté(e)    Voir le profil de RHJPP Envoyer un email à RHJPP Envoyer un message privé à RHJPP  


Mic, si tu utilises IE, il faut dans bouton droit sur la page, dans Codage, que Sélection automatique soit cochée.
    
./Post n°6   Marquer comme non lu.
mic Ecrit le: Samedi 12 novembre 2005 à 12:34 Déconnecté(e)    Voir le profil de mic Envoyer un email à mic Visiter le site WEB de mic Envoyer un message privé à mic  

Jutilise Mozilla.
TI-BANK :
http://www.ti-bank.be
http://pagesperso.laposte.net/bankti
http://www.ti-bank.fr.tc

Forum TI-BANK :
http://tibank.forumactif.com
    
./Post n°7   Marquer comme non lu.
mic Ecrit le: Samedi 12 novembre 2005 à 20:57 Déconnecté(e)    Voir le profil de mic Envoyer un email à mic Visiter le site WEB de mic Envoyer un message privé à mic  

alors, personne ne voit ??
TI-BANK :
http://www.ti-bank.be
http://pagesperso.laposte.net/bankti
http://www.ti-bank.fr.tc

Forum TI-BANK :
http://tibank.forumactif.com
    
  :: Index » Forum PC » Programmation Web » Pb de charset (7 réponse(s))
Pages : 1/1     « [1] » »|

.Répondre à ce sujet
Les boutons de code
[B]old[I]talic[U]nderline[S]trikethrough[L]ine Flip Hori[Z]ontallyFlip [V]erticallySha[D]ow[G]low[S]poilerCode [G][C]ite
Bullet [L]istList Item [K] Link [H][E]mail[P]icture SmileysHelp
Couleurs :
Saisissez votre message
Activer les smileys
     

Forum de Ti-Gen v3.0 Copyright ©2004 by Geoffrey ANNEHEIM
Webmaster: Kevin KOFLER, Content Admins: list, Server Admins: Tyler CASSIDY and Kevin KOFLER, DNS Admin: squalyl
Page générée en 63.05ms avec 18 requetes