#1 21. April 2011 problem mit charset Hi ich hab immoment ein grosses problem mit dem charset aber weiss leider nicht, wie ich das loesen kann... ich hab gerade eine neue webseite programmiert und um diese vollstaendig zu machen wollte ich ajax mit hinzupacken weil es einfach besser dann aussieht. die webseite sollte von grund auf einfach zu editieren sein aber kein grosses projekt sein. insofern hatte ich die idee ein php file zu schreiben, dass einfach den kompletten inhalt einer datei ausliest und dann als webseite darstellt. diese datei ist ein *.htm file das einfach mit word 2007 erstellt wird (dabei einfach auf speichern unter -> als webpage speichern (gefiltert)). das hat auch super funktioniert als ich noch kein AJAX drinne gehabt hab. also der inhalt wurde perfekt dargestellt auch alle sonderzeichen und alles. nun da ich ajax mit drin hab kommt z.B. vor jedem   ein  und auch alle anderen zeichen wie ' haben ein  davor oder werden als âEUR(TM) dargestellt. ich hab schon versucht alles auf UTF-8 umzustellen allerdings ist irgendwo noch nen hacken drinn... word speichert den htm-file als UTF-8 und auch die webseite ist in UTF-8 codiert. braucht ihr irgendwelche quelltexte? die wuerde ich dann hierreinstellen. weiss blos halt nicht wo der fehler liegt und wollte euch nicht gleich zubombadieren... hoffe ihr koennt mir mit dem problem helfen oder habt irgendne idee wie ich das umgehen kann.. vielen dank schonmal im vorraus :] + Multi-Zitat Zitieren
#2 21. April 2011 AW: problem mit charset Wenn du den Code zeigen wuerdest, koennte man dir auch besser helfen. + Multi-Zitat Zitieren
#3 21. April 2011 AW: problem mit charset die website is mit include aufgebaut... ich poste mal alles was glaube ich relevant waere... php-file das vom javascript aus aufgerufen wird und dann eine datei ausliehst... Spoiler PHP: <? php function open ( $fn ) { if ( $fn != 1 && file_exists ( $fn )) // file exist ? { $fp = fopen ( $fn , "r" ); // open file while( feof ( $fp ) == false ) // if not eof of file { $buffer = fgets ( $fp ); // write line in variable buffer $buffer = utf8_encode ( $buffer ); echo $buffer ; // echo buffer } fclose ( $fp ); // close file after finish reading (eof) } elseif( $fn == 1 ) //if file not exist { if ( file_exists ( "under_construct/index.html" )) // file exist (under construction)? { $fp = fopen ( "under_construct/index.html" , "r" ); // open file while( feof ( $fp ) == false ) // if not eof of file { $buffer = fgets ( $fp ); // write line in variable buffer echo $buffer ; // echo buffer } fclose ( $fp ); // close file after finish reading (eof) } else // 2 files not exist... { echo "Something went wrong...<br>" ; echo "Please check back later." ; } } else { echo "Something went wrong...<br>" ; echo "Please check back later. from last else" ; echo $fn ; } } $var = $_GET [ "item" ]; // get variable item in url via GET' $dir = 'content/' . $var . '/' ; // dir if(( $var == "swggeneral" ) || ( $var == "swgguidelines" ) || ( $var == "swgmedalists" ) || ( $var == "swgpics" )) // SWG { switch( $var ) { case "swggeneral" : $fn = "content/SWG/general.htm" ; open ( $fn ); break; case "swgguidelines" : $fn = "content/SWG/guidelines.htm" ; open ( $fn ); break; case "swgmedalists" : $fn = "content/SWG/medails.htm" ; open ( $fn ); break; case "swgpics" : include( "content/SWG/index.php" ); break; } } else //no SWG { if( file_exists ( $dir )) // file exist { $fn = $dir . $var . ".htm" ; open ( $fn ); } else // under construction { open ( 1 ); } } ?> Javascript: Spoiler Code: function getXMLHttp() { var xmlHttp try { //Firefox, Opera 8.0+, Safari xmlHttp = new XMLHttpRequest(); } catch(e) { //Internet Explorer try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { alert("Your browser does not support AJAX!") return false; } } } return xmlHttp; } function get(i) { var xmlHttp = getXMLHttp(); xmlHttp.onreadystatechange = function() { if(xmlHttp.readyState == 4) { HandleResponse(xmlHttp.responseText); } } url = 'index2.php?item='+i; xmlHttp.open("GET", url, true); xmlHttp.send(); } function HandleResponse(response) { document.getElementById('show').innerHTML = response; } die navileiste wo die javascript funktion aufgerufen wird: Spoiler PHP: <? php ?> <table border="0" cellpadding="15"> <tr align=center> <td valign=top> <div class="sidebarmenu"> <ul id="sidebarmenu1"> <li><a href="javascript:void(0)" onclick="get('wellness');" style="text-decoration:none" >Wellness</a></li> <li><a class=" subfolderstyle" href="javascript:void(0)" onclick="get('physical');" style="text-decoration:none" >Physical</a> <ul> <li><a href="javascript:void(0)" onclick="get('nutrition');" style="text-decoration:none" >Nutrition</a></li> <li><a href="javascript:void(0)" onclick="get('fitness');" style="text-decoration:none" >Fitness</a></li> <li><a href="javascript:void(0)" onclick="get('healthservices');" style="text-decoration:none" >Health Services</a></li> </ul> </li> <li><a class=" subfolderstyle" href="javascript:void(0)" onclick="get('intellectual');" style="text-decoration:none" >Intellectual</a> <ul> <li><a href="javascript:void(0)" onclick="get('computer');" style="text-decoration:none" >Computer</a></li> <li><a href="javascript:void(0)" onclick="get('art');" style="text-decoration:none" >Art and Music</a></li> <li><a href="javascript:void(0)" onclick="get('Intellectualother');" style="text-decoration:none" >Other</a></li> </ul> </li> <li><a class=" subfolderstyle" href="javascript:void(0)" onclick="get('social');" style="text-decoration:none" >Social</a> <ul> <li><a href="javascript:void(0)" onclick="get('card');" style="text-decoration:none" >Card Games</a></li> <li><a href="javascript:void(0)" onclick="get('music');" style="text-decoration:none" >Music</a></li> <li><a href="javascript:void(0)" onclick="get('crafts');" style="text-decoration:none" >Crafts</a></li> <li><a href="javascript:void(0)" onclick="get('socialother');" style="text-decoration:none" >Other</a></li> </ul> </li> <li><a class=" subfolderstyle" href="javascript:void(0)" onclick="get('emotional');" style="text-decoration:none" >Emotional</a> <ul> <li><a href="javascript:void(0)" onclick="get('volunteers');" style="text-decoration:none" >Volunteers</a></li> </ul> </li> <li><a class=" subfolderstyle" href="javascript:void(0)" onclick="get('enviromental');" style="text-decoration:none" >Enviromental</a> <ul> <li><a href="javascript:void(0)" onclick="get('greenhouse');" style="text-decoration:none" >Greenhouse</a></li> <li><a href="javascript:void(0)" onclick="get('recycling');" style="text-decoration:none" >Recycling</a></li> </ul> </li> <li><a href="javascript:void(0)" onclick="get('spiritual');" style="text-decoration:none" >Spiritual</a></li> <br> <li><a class=" subfolderstyle" href="javascript:void(0)" onclick="get('services');" style="text-decoration:none" >Services</a> <ul> <li><a href="javascript:void(0)" onclick="get('transportation');" style="text-decoration:none" >Transportation</a></li> <li><a href="javascript:void(0)" onclick="get('legal');" style="text-decoration:none" >Legal</a></li> <li><a href="javascript:void(0)" onclick="get('servicesfinancial');" style="text-decoration:none" >Financial</a></li> <li><a href="javascript:void(0)" onclick="get('german');" style="text-decoration:none" >German Volunteers</a></li> </ul> </li> <li><a href="javascript:void(0)" onclick="get('financial');" style="text-decoration:none" >Financial</a></li> <li><a class=" subfolderstyle" href="javascript:void(0)" onclick="get('swggeneral');" style="text-decoration:none" >Senior Winter Games</a> <ul> <li><a href="javascript:void(0)" onclick="get('swggeneral');" style="text-decoration:none" >General Information</a></li> <li><a href="javascript:void(0)" onclick="get('swgguidelines');" style="text-decoration:none" >Guidelines</a></li> <li><a href="javascript:void(0)" onclick="get('swgmedalists');" style="text-decoration:none" >Medalists 2011</a></li> <li><a href="javascript:void(0)" onclick="get('swgpics');" style="text-decoration:none" >Photos</a></li> </ul> </li> <li><a href="javascript:void(0)" onclick="get('newsletter');" style="text-decoration:none" >Newsletter</a></li> <br> <li><a href="javascript:void(0)" onclick="get('about');" style="text-decoration:none" >Who we are</a></li> <li><a href="javascript:void(0)" onclick="get('contact');" style="text-decoration:none" >Contact us</a></li> <li><a href="javascript:void(0)" onclick="get('mission');" style="text-decoration:none" >Mission</a></li> </ul> </div> <br> <div id="nav_weather"> <a href="http://www.wunderground.com/US/MI/Mount_Morris.html?bannertypeclick=infoboxtr"> <img src="http://weathersticker.wunderground.com/weathersticker/infoboxtr_both/language/www/US/MI/Mount_Morris.gif" alt="Click for Mount Morris, Michigan Forecast" border="0" height="108" width="144" /></a> </div> </td> <td width="1000px" valign="TOP" align="left"> <div id="show"> <?php if (isset( $_GET [ item ]) == TRUE ) // if variable has value { include( "content/index.php" ); // only include index.php } else { $_GET [ item ] = "home" ; // set item = home include( "content/index.php" ); // include index.php } ?> </div> </td> </tr> </table> wird zum beispiel auf fitness geklickt, ruft javascript das php-file auf, dass dann die datei fitness.htm ausliehst und zurueckgibt... die die datei sieht so aus: Spoiler HTML: <div class=Section1> <p class=MsoNormal align=center style='text-align:center'><u><span style='font-size:20.0pt;line-height:115%;font-family:"Times New Roman","serif"'>Fitness Programs</span></u></p> <p class=MsoNormal align=center style='text-align:center'><span style='font-size:20.0pt;line-height:115%;font-family:"Times New Roman","serif"'>Hello</span></p> <div align=center> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 style='border-collapse:collapse;border:none'> <tr style='height:256.9pt'> <td width=319 valign=top style='width:239.4pt;border:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt;height:256.9pt'> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><u><span style='font-size:20.0pt;font-family:"Times New Roman","serif"'>Laughter Yoga</span></u></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'>Mondays @ 1 pm</span></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'>Tuesdays @ 10 pm</span></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'>Thursdays @ 10 pm</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'> </span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><i><span style='font-family:"Times New Roman","serif"'>Enjoy the benefits of breathing better and laughing to exercise your aches and pains away. Laughter Yoga is a stress free way to execise.</span></i></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><i><span style='font-family:"Times New Roman","serif"'> </span></i></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'>Cost: ** Free</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'>Instructor: ****** Jimie Williams</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'> </span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><img width=93 height=96 src="fitness_files/image001.jpg"></p> </td> <td width=319 valign=top style='width:239.4pt;border:solid windowtext 1.0pt; border-left:none;padding:0in 5.4pt 0in 5.4pt;height:256.9pt'> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><u><span style='font-size:20.0pt;font-family:"Times New Roman","serif"'>Beginning Yoga</span></u></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'>Wednesdays @ 5:30 pm</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'> </span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><i><span style='font-family:"Times New Roman","serif"'>Practicing the postures, breathing exercises and meditation makes you healthier in body, mind and spirit. Specifically, research shows that yoga helps manage or control anxiety, arthritis, asthma, back pain, blood pressure, carpal tunnel syndrome, chronic fatigue, depression, diabetes, epilepsy, headaches, heart diseases, multiple sclerosis, stress and other conditions and diseases.</span></i></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'> </span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'>Cost:*** $2 per session</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'>Instructor: ****** Pam Iaquinto</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'>*********************** Absolute Health Care</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-size:14.0pt;font-family:"Times New Roman","serif"'> </span></p> </td> <td width=319 valign=top style='width:239.4pt;border:solid windowtext 1.0pt; border-left:none;padding:0in 5.4pt 0in 5.4pt;height:256.9pt'> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><u><span style='font-size:20.0pt;font-family:"Times New Roman","serif"'>Wii Fit</span></u></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'>Mondays @ 11 am</span></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'>Wednesdays @ 11 am</span></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'>Fridays @ 11 am</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'> </span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><i><span style='font-family:"Times New Roman","serif"'>Wii Fit is a combination of fitness and fun. You can work toward personal goals of better health and fitness</span></i></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'> </span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'>Cost:*** Free</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'>Provided by Seniors</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'> </span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'> </span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><u><span style='font-size:20.0pt;font-family:"Times New Roman","serif"'><img width=244 height=60 src="fitness_files/image002.jpg"></span></u></p> </td> </tr> <tr style='height:219.1pt'> <td width=319 valign=top style='width:239.4pt;border:solid windowtext 1.0pt; border-top:none;padding:0in 5.4pt 0in 5.4pt;height:219.1pt'> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><u><span style='font-size:20.0pt;font-family:"Times New Roman","serif"'>Movin’ & Groovin’</span></u></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'>Mondays @ 10 am</span></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'>Wednesdays @ 10 am</span></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'>Fridays @ 10 am</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'> </span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><i><span style='font-family:"Times New Roman","serif"'>Improve your range of motion in this stress free low impact program specifically designed for the older adults</span></i></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'> </span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'>Cost: ** $2 per session or $15 for 3 times a week for 10 weeks</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'>Instructor: ****** Nora DelMorone</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-size:14.0pt;font-family:"Times New Roman","serif"'><img width=93 height=66 src="fitness_files/image003.jpg"></span></p> </td> <td width=319 valign=top style='width:239.4pt;border-top:none;border-left: none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt;height:219.1pt'> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><u><span style='font-size:20.0pt;font-family:"Times New Roman","serif"'>Tai Chi</span></u></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'>Saturdays @ 10 am</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'> </span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><i><span style='font-family:"Times New Roman","serif"'>Tai Chi isn't just a feel-good workout: it's a therapy, a preventive measure and a remedy for almost every ailment, including arthritis.</span></i></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'> </span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'>Cost:*** Free</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'>Instructor:******* Darcey Bobb</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-size:14.0pt;font-family:"Times New Roman","serif"'><img width=113 height=113 src="fitness_files/image004.jpg"></span></p> </td> <td width=319 valign=top style='width:239.4pt;border-top:none;border-left: none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt;height:219.1pt'> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><u><span style='font-size:20.0pt;font-family:"Times New Roman","serif"'>Wii Bowling Leagues</span></u></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'>Tuesdays @ 1pm and 4 pm</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'> </span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><i><span style='font-family:"Times New Roman","serif"'>Wii-Bowling is an interactive game for kids all ages. Bowl with other seniors on the Wii and have fun while working out.</span></i></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'> </span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'>Cost:*** $5</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'>Provided by Seniors</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><u><span style='font-size:20.0pt;font-family:"Times New Roman","serif"'><img width=88 height=106 src="fitness_files/image005.jpg"></span></u></p> </td> </tr> <tr style='height:170.5pt'> <td width=319 valign=top style='width:239.4pt;border:solid windowtext 1.0pt; border-top:none;padding:0in 5.4pt 0in 5.4pt;height:170.5pt'> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><u><span style='font-size:20.0pt;font-family:"Times New Roman","serif"'>Line Dancing</span></u></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'>Tuesdays @ 5 pm and 6 pm</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><u><span style='font-family:"Times New Roman","serif"'><span style='text-decoration:none'> </span></span></u></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><i><span style='font-family:"Times New Roman","serif"'>Line dancing is done in a group where the dancers dance side by side doing the same steps. It's a fun way to exercise.</span></i></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'> </span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'>Cost:*** $3 per class</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'>Instructor:******* Pat Dominy</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'><img width=80 height=139 src="fitness_files/image006.jpg"></span></p> </td> <td width=319 valign=top style='width:239.4pt;border-top:none;border-left: none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt;height:170.5pt'> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><u><span style='font-size:20.0pt;font-family:"Times New Roman","serif"'>Zumba</span></u></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'>Saturdays @ 3 pm</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'> </span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><i><span style='font-family:"Times New Roman","serif"'>Zumba is a fusion of Latin and International music. Dance themes that create a dynamic, exicting, effective fitness system.</span></i></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'> </span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'>Cost:*** $5 per class</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'>Instructor:******* Jim Herrick</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-size:14.0pt;font-family:"Times New Roman","serif"'><img width=138 height=133 src="fitness_files/image007.jpg"></span></p> </td> <td width=319 valign=top style='width:239.4pt;border-top:none;border-left: none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt;height:170.5pt'> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><u><span style='font-size:20.0pt;font-family:"Times New Roman","serif"'>Learn to Hula</span></u></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'>Wednesdays @ 4 pm</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'> </span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><i><span style='font-family:"Times New Roman","serif"'>In hula dancing, hand and arm gestures are combined with rhythmic twisting and swirling.</span></i></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'> </span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'>Cost:*** $4 per week program</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-family:"Times New Roman","serif"'>Instructor:******* Vicki Rohlman</span></p> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-size:14.0pt;font-family:"Times New Roman","serif"'><img width=164 height=164 src="fitness_files/image008.jpg"></span></p> </td> </tr> </table> </div> <p class=MsoNormal align=center style='text-align:center'><span style='font-size:14.0pt;line-height:115%;font-family:"Times New Roman","serif"'> </span></p> <div align=center> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 style='border-collapse:collapse;border:none'> <tr> <td width=319 valign=top style='width:239.4pt;border:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNoSpacing><u><span style='font-size:20.0pt'>Swing/Ballroom Dance</span></u></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'>Tuesdays @ 7 pm</span></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'> </span></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'>Come learn the basics and improve your dancing skills while having a great time. </span></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'> </span></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'>Cost:*** $5 per class</span></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'>Instructor:******* Teri Herrick</span></p> </td> <td width=319 valign=top style='width:239.4pt;border:solid windowtext 1.0pt; border-left:none;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNoSpacing><u><span style='font-size:20.0pt'>Country Express</span></u></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'>Thursdays @ 7 pm</span></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'> </span></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'>Ya'wl invited to the Krapohl Center Country Family music night! Door Prizes... Food... Fun!</span></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'> </span></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'>Cost:*** $4 at the door</span></p> <p class=MsoNoSpacing><span style='font-size:11.0pt'>Provided by Krapohl Senior Center</span></p> </td> </tr> </table> </div> <p class=MsoNormal><span style='font-size:14.0pt;line-height:115%;font-family: "Times New Roman","serif"'> </span></p> </div> das ganze wurde von word erstellt und sollte eigentlich utf-8 codiert sein... aber es kommt anstatt diesen absatz: Spoiler Cost: $2 per session Instructor: Pam Iaquinto Absolute Health Care sowas bei raus: Spoiler Cost:   $2 per session Instructor:       Pam Iaquinto                        Absolute Health Care + Multi-Zitat Zitieren
#4 21. April 2011 AW: problem mit charset OK, also deine Files, die du ausgeben möchtest sind selbver auch utf8, richtig? Und bei deiner Webseite gibst auch sicher über den meta-Tag den utf8-Charset an? Nicht vergessen, die Datei, die du via Ajax rausschmeisst, ebenfalls über den utf8 ContentType-header zu senden. Ajax hat nix mit dem Charset oder sonstiges zu tun. Ajax selber is nur ne Technik, die HTTP-Requests asynchron absetzen kann. Ich vermute also mal sehr stark, dass entweder deine charset-Definitionen nicht stimmen - oder diese stimmen und nur die Character deiner File falsch encoded sind. + Multi-Zitat Zitieren
#5 21. April 2011 AW: problem mit charset in der webseite im <head> steht: HTML: <meta http-equiv=Content-Type content="text/html; charset=UTF-8"> und die ganzen dateien die von word erzeugt werden haben auch im <head> HTML: <meta http-equiv=Content-Type content="text/html; charset=UTF-8"> stehen... was meinst du damit? + Multi-Zitat Zitieren
#6 22. April 2011 AW: problem mit charset utf8_encode Wenn das HTML-Dokument bereits in UTF-8 kodiert ist, dann macht es keinen Sinn, das ganze nochmal zu konvertieren, denn dabei werden alle Zeichen jenseits der 8 Bit falsch dargestellt. Übrigens: utf8_encode/utf8_decode kann nur die Konvertierung nach/von UTF-8 und ISO-8859-1. ISO-8859-1 unterstützt aber noch nichtmal das gute alte €-Zeichen. Von daher sind die Funktionen ohnehin für die meisten Web-Anwendungsn nutzlos. PHP: $var = $_GET [ "item" ]; $dir = 'content/' . $var . '/' ; if( file_exists ( $dir )) { $fn = $dir . $var . ".htm" ; open ( $fn ); } else { open ( 1 ); } Das ist extrem unsicher. Damit kann man problemlos jede beliebige Datei auslesen, die auf dem Webserver liegt. => basename + Multi-Zitat Zitieren
#7 26. April 2011 AW: problem mit charset mhm ok das macht sinn... hab vergessen das utf_encode rauszunehmen als ich alles in UTF8 codiert hab... ich werds mal ohne versuchen. damit kann man nur die datein auslesen, die im pfad /content/ ist und das sind nur htm dateien die die webseite darstellen und keine konfigurierten dateien die informationen bereitstellen... aber ich werde mal gucken ob ich was mit basename anfangen kann, danke für den tipp + Multi-Zitat Zitieren
#8 26. April 2011 AW: problem mit charset falsch. damit kann man beliebige dateien auf deinem webserver auslesen. ?item=../../../../etc/passwd%00 "../" musst halt anpassen bis es stimmt zur erklärung: %00 ist ein sog. null-byte. wenn man das so angibt denkt php die zeichenkette sei an dieser stelle beendet. in deinem script wäre in $fn nun folgendes: (\0 = die php-schreibweise von null-bytes) Code: content/../../../../etc/passwd\0.htm effektiv nutzen wird php aber folgendes: Code: content/../../../../etc/passwd + Multi-Zitat Zitieren
#9 26. April 2011 AW: problem mit charset mhm stimmt... da muss ich dann wohl nochmal überlegen... danke + Multi-Zitat Zitieren