bu kod türkçe yazılan kodları UTF-8 arayüzünde düzgün göstermenizi sağlar
türkçe dilleri (iso-8859-9) ları veya ANSI leri UTF-8 e uygun hale çevirir metnin karakter kodlamasınım değiştirmeden
işime yarıyor baya, umarım sizin de işinize yarar
buyrun:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | <?php //if(!iSUPERADMIN && $userdata['user_id']!=1) { redirect (BASEDIR."index.php"); } function trascii($text) { $search = array("Ç", "İ", "Ğ", "Ö", "Ş", "Ü", "ç", "ı", "ğ", "ö", "ş", "ü"); $replace = array("Ç", "İ", "Ğ", "Ö", "Ş", "Ü", "ç", "ı", "ğ", "ö", "ş", "ü"); $text = str_replace($search, $replace, $text); return $text; } // Strip Input Function, prevents HTML in unwanted places //fusiondan alıntı bu fonktison function stripinput($text) { if (QUOTES_GPC) $text = stripslashes($text); $search = array("&", "\"", "'", "\\", '\"', "\'", "<", ">", " "); $replace = array("&", """, "'", "\", """, "'", "<", ">", " "); $text = str_replace($search, $replace, $text); return $text; } $text='';//ilk değer boş if (isset($_POST['gonder'])) { $text=$_POST['veri']; //geri döndermek için ayrıca echo "<div style='margin: 0px auto; padding-bottom: 15px;'>"; echo "çıktısı:<br /><textarea rows='3' cols='50'>".stripinput(trascii($text)); echo "</textarea></div>"; } echo "<div style='margin: 0px auto;'>"; echo "<form name='inputform' method='post' action='".$_SERVER['PHP_SELF']."'>"; echo "<textarea name='veri' rows='3' cols='50' class='textbox'>".$text."</textarea><br />"; echo "<input type='submit' name='gonder' value='ascii yap' />"; echo "</form>"; echo "</div>"; ?> |
Download Link:
Download Link