[ studio-bild @ 02.06.2008. 19:57 ] @
Kupim tekst sa rss stranice http://www.cafemontenegro.com/rss/?group=22 koji se nalazi u UTF8 enkodingu. Treba da ga prebacim u windows-1252 encoding. Jedan nacin je da stavim ovaj kod u <head> stranice <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> ali meni on ne odgovara jer mi je ceo sajt u windows-1252. PItanje je da li postoji neka finkcija u PHP-u koja bi prebacila utf8 u windows-1252. Nasao sam jednu funkciju ali ne radi bas najbolje(nece da cita neka slova kao sto je č, ć ... ) function utf2windows1250 ($text) { $text = str_replace("Ä„", 'Ą', $text); //Ą $text = str_replace("Ć", 'Ć', $text); //Ć $text = str_replace("Ę", 'Ę', $text); //Ę $text = str_replace("Å", 'Ł', $text); //Ł $text = str_replace("Ń", 'Ń', $text); //Ń $text = str_replace("Ó", 'Ó', $text); //Ó $text = str_replace("Åš", 'Ś', $text); //Ś $text = str_replace("Ź", 'Ź', $text); //Ź $text = str_replace("Å»", 'Ż', $text); //Ż $text = str_replace("Ä…", 'ą', $text); //ą $text = str_replace("ć", 'ć', $text); //ć $text = str_replace("Ä™", 'ę', $text); //ę $text = str_replace("Å‚", 'ł', $text); //ł $text = str_replace("Å„", 'ń', $text); //ń $text = str_replace("ó", 'ó', $text); //ó $text = str_replace("Å›", 'ś', $text); //ś $text = str_replace("ź", 'ź', $text); //ź $text = str_replace("š", 'ż', $text); //ż return $text; } LJUDI BAS ME OVO IZNERVIRALO POMAGAJTE |