[Linux-programlama] Re: PHP dosya upload ederken türkçe karakter sorunu

---------

[Linux-programlama] Re: PHP dosya upload ederken türkçe karakter sorunu

From: Brend <brendtumi_at_gmail.com>
Date: Fri, 15 Aug 2008 12:38:12 +0300
Message-ID: <89a048d90808150238ga740892k29d5b10f234d33b2@mail.gmail.com>

Bu fonsiyon iþini görecektir.

function cleanTr(&$text){
        $text = str_replace ( array ("&#304;", "\u0130", "\xDD", "Ý" ), "I",
$text );
        $text = str_replace ( array ("&#305;", "\u0131", "\xFD", "ý" ), "i",
$text );
        $text = str_replace ( array ("&#286;", "\u011e", "\xD0", "Ð" ), "G",
$text );
        $text = str_replace ( array ("&#287;", "\u011f", "\xF0", "ð" ), "g",
$text );
        $text = str_replace ( array ("&Uuml;", "\u00dc", "\xDC", "Ü" ), "U",
$text );
        $text = str_replace ( array ("&uuml;", "\u00fc", "\xFC", "ü" ), "u",
$text );
        $text = str_replace ( array ("&#350;", "\u015e", "\xDE", "Þ" ), "S",
$text );
        $text = str_replace ( array ("&#351;", "\u015f", "\xFE", "þ" ), "s",
$text );
        $text = str_replace ( array ("&Ouml;", "\u00d6", "\xD6", "Ö" ), "O",
$text );
        $text = str_replace ( array ("&ouml;", "\u00f6", "\xF6", "ö" ), "o",
$text );
        $text = str_replace ( array ("&Ccedil;", "\u00c7", "\xC7", "Ç" ),
"C", $text );
        $text = str_replace ( array ("&ccedil;", "\u00e7", "\xE7", "ç" ),
"c", $text );
    }

15 Aðustos 2008 Cuma 11:10 tarihinde Erdem Uyguner <erdem.linux_at_gmail.com>yazdý:

> Herkese günaydýn...
>
> php ile dosya upload ederken, dosya adýndaki türkçe karakterlerde
> sorun yaþýyorum bunu düzeltmek için birkaç tane fonksiyon buldum ancak
> herhangi bir düzelme olmadý. Kullandýðým fonksiyonlar
>
> function isimTR($str) {
> $str = trim($str);
> $search =
> array(chr(199),chr(231),chr(208),chr(240),chr(253),chr(221),chr(214),chr(246),chr(222),chr(254)
> ,chr(220),chr(252),chr(32));
> $replace = array('C','c','G','g','i','I','O','o','S','s','U','u','_');
> $newstr = str_replace($search,$replace,$str);
> return $newstr;
> }
>
> ve
>
> function turkcesiz($Gelen)
> {
> $Donus = strtr($Gelen,"ÜÞÇÝÐüöþçýð","USCIGuoscig");
> return $Donus;
> }
>
> bu sorunu nasýl çözebileceðim hakkýnda fikri olan arkadaþlar yardým
> ederse sevinirim...
>
> Zaman ayýrýp cevap yazan arkadaþlara þimdiden çok teþekkür ederim.
> _______________________________________________
> Linux-programlama mailing list
> Linux-programlama_at_liste.linux.org.tr
> http://liste.linux.org.tr/mailman/listinfo/linux-programlama
>

-- 
Ýyi çalýþmalar;
Tümay ÇEBER

_______________________________________________
Linux-programlama mailing list
Linux-programlama_at_liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-programlama
Received on Fri 15 Aug 2008 - 12:03:30 EEST

---------

Bu arsiv hypermail 2.2.0 tarafindan uretilmistir.