note 73736 added to function.utf8-decode

From: Date: Thu, 08 Mar 2007 11:32:17 +0000
Subject: note 73736 added to function.utf8-decode
Groups: php.notes 
Request: Send a blank email to php-notes+get-124229@lists.php.net to get a copy of this message
I searched a lot everywhere to find a suitable function which converts my UTF8 characters to the windows-1250 charset for Polish language, but couldn't find anything :( Following is a function which does that: function show_polish ($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; } You can refer to http://hermes.umcs.lublin.pl/~awmarcz/awm/info/pl-codes.htm if you want to use HTML hex. code rather than HTML dec. code which I used in my function. ---- Server IP: 217.160.72.57 Probable Submitter: 217.7.133.193 (proxied: 1.1 VADERS02) ---- Manual Page -- http://www.php.net/manual/en/function.utf8-decode.php Edit -- https://master.php.net/note/edit/73736 Del: integrated -- https://master.php.net/note/delete/73736/integrated Del: useless -- https://master.php.net/note/delete/73736/useless Del: bad code -- https://master.php.net/note/delete/73736/bad+code Del: spam -- https://master.php.net/note/delete/73736/spam Del: non-english -- https://master.php.net/note/delete/73736/non-english Del: in docs -- https://master.php.net/note/delete/73736/in+docs Del: other reasons-- https://master.php.net/note/delete/73736 Reject -- https://master.php.net/note/reject/73736 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#124229) next »