[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 16:12:52 +0300
Message-ID: <89a048d90808150612x18fb0ed0xf04ed8067561898e@mail.gmail.com>

Hayır Yüce bey doğru görmektesiniz.str_replace fonksiyonu tam 12 kere
çağırılmakta. Ayrıca her seferince 3 farklı string değerini aramakta. yani
36 farklı string'i arıyor. tabiki bunu tek satırda da halledebilirdik ama
okuması pek kolay olmazdı. Yada unicode utf ve iso'yu aynı anda
değiştirebilen tek fonksiyon yerine 3 fonksiyona ayırıp sıraylada
çağırabilirdiniz. Ama inanın en rahat ve en kolay okunabilir hali budur.
İsterseniz hız konusunda ayrıca konuşabiliriz.

15 Ağustos 2008 Cuma 15:58 tarihinde Yuce Tekol <yucetekol_at_gmail.com> yazdı:

> Merhaba,
>
> Ben mi yanlis goruyorum yoksa asagidaki fonksiyon tek bir string
> degeri degistirmek icin str_replace fonksiyonunu 12 kere cagiriyor?
> Ayhan Yigid Beyin onerdigi fonksiyonu denediniz mi? Ben de Turkce
> karakterlerin cogu yanlis gorunuyor, bu iki cozum birlestirilebilir.
>
>
>
> >
> > 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 );
> > return $text;
> > }
> >
> >
> > --
> > İyi çalışmalar...
> >
> > =======================================
> > Altan Tanrıverdi
> > Çağ Grup Bilgi İşlem Müdürü
> >
> > www.cagajans.com www.turkiyevitrin.com
> > Becerikli Sok. No: 19/ 8-9 06660 Kızılay/ANKARA
> > T/F: 0312 434 29 34
> > =======================================
> >
> > _______________________________________________
> > Linux-programlama mailing list
> > Linux-programlama_at_liste.linux.org.tr
> > http://liste.linux.org.tr/mailman/listinfo/linux-programlama
> >
> >
> _______________________________________________
> 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 - 15:38:04 EEST

---------

Bu arsiv hypermail 2.2.0 tarafindan uretilmistir.