note 73639 added to function.utf8-decode

From: Date: Mon, 05 Mar 2007 15:22:22 +0000
Subject: note 73639 added to function.utf8-decode
Groups: php.notes 
Request: Send a blank email to php-notes+get-124099@lists.php.net to get a copy of this message
Comment to AJGORS reply from 28-Dec-2006 02:38: You have used twice "ż" instead of "ź". Correct code should be: ISO version: function utf82iso88592($text) { $text = str_replace("\xC4\x85", '±', $text); $text = str_replace("\xC4\x84", 'ˇ', $text); $text = str_replace("\xC4\x87", 'ć', $text); $text = str_replace("\xC4\x86", 'Ć', $text); $text = str_replace("\xC4\x99", 'ę', $text); $text = str_replace("\xC4\x98", 'Ę', $text); $text = str_replace("\xC5\x82", 'ł', $text); $text = str_replace("\xC5\x81", 'Ł', $text); $text = str_replace("\xC3\xB3", 'ó', $text); $text = str_replace("\xC3\x93", 'Ó', $text); $text = str_replace("\xC5\x9B", '¶', $text); $text = str_replace("\xC5\x9A", '¦', $text); $text = str_replace("\xC5\xBC", 'ż', $text); $text = str_replace("\xC5\xBB", 'Ż', $text); $text = str_replace("\xC5\xBA", 'Ľ', $text); $text = str_replace("\xC5\xB9", '¬', $text); $text = str_replace("\xc5\x84", 'ń', $text); $text = str_replace("\xc5\x83", 'Ń', $text); return $text; } CP version: function utf82iso88592($text) { $text = str_replace("\xC4\x85", 'ą', $text); $text = str_replace("\xC4\x84", 'Ą', $text); $text = str_replace("\xC4\x87", 'ć', $text); $text = str_replace("\xC4\x86", 'Ć', $text); $text = str_replace("\xC4\x99", 'ę', $text); $text = str_replace("\xC4\x98", 'Ę', $text); $text = str_replace("\xC5\x82", 'ł', $text); $text = str_replace("\xC5\x81", 'Ł', $text); $text = str_replace("\xC3\xB3", 'ó', $text); $text = str_replace("\xC3\x93", 'Ó', $text); $text = str_replace("\xC5\x9B", 'ś', $text); $text = str_replace("\xC5\x9A", 'Ś', $text); $text = str_replace("\xC5\xBC", 'ż', $text); $text = str_replace("\xC5\xBB", 'Ż', $text); $text = str_replace("\xC5\xBA", 'ź', $text); $text = str_replace("\xC5\xB9", 'Ź', $text); $text = str_replace("\xc5\x84", 'ń', $text); $text = str_replace("\xc5\x83", 'Ń', $text); return $text; } ---- Server IP: 83.64.128.68 Probable Submitter: 83.30.54.64 ---- Manual Page -- http://www.php.net/manual/en/function.utf8-decode.php Edit -- https://master.php.net/note/edit/73639 Del: integrated -- https://master.php.net/note/delete/73639/integrated Del: useless -- https://master.php.net/note/delete/73639/useless Del: bad code -- https://master.php.net/note/delete/73639/bad+code Del: spam -- https://master.php.net/note/delete/73639/spam Del: non-english -- https://master.php.net/note/delete/73639/non-english Del: in docs -- https://master.php.net/note/delete/73639/in+docs Del: other reasons-- https://master.php.net/note/delete/73639 Reject -- https://master.php.net/note/reject/73639 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#124099) next »