note 75286 added to function.strtr

From: Date: Tue, 22 May 2007 14:11:16 +0000
Subject: note 75286 added to function.strtr
Groups: php.notes 
Request: Send a blank email to php-notes+get-126819@lists.php.net to get a copy of this message
Here is a function to convert middle-european windows charset (cp1250) to the charset, that php script is written in: <?php function cp1250_to_utf2($text){ $dict = array(chr(225) => 'á', chr(228) => 'ä', chr(232) => 'č', chr(239) => 'ď', chr(233) => 'é', chr(236) => 'ě', chr(237) => 'í', chr(229) => 'ĺ', chr(229) => 'ľ', chr(242) => 'ň', chr(244) => 'ô', chr(243) => 'ó', chr(154) => 'š', chr(248) => 'ř', chr(250) => 'ú', chr(249) => 'ů', chr(157) => 'ť', chr(253) => 'ý', chr(158) => 'ž', chr(193) => 'Á', chr(196) => 'Ä', chr(200) => 'Č', chr(207) => 'Ď', chr(201) => 'É', chr(204) => 'Ě', chr(205) => 'Í', chr(197) => 'Ĺ', chr(188) => 'Ľ', chr(210) => 'Ň', chr(212) => 'Ô', chr(211) => 'Ó', chr(138) => 'Š', chr(216) => 'Ř', chr(218) => 'Ú', chr(217) => 'Ů', chr(141) => 'Ť', chr(221) => 'Ý', chr(142) => 'Ž', chr(150) => '-'); return strtr($text, $dict); } ?> ---- Server IP: 212.24.129.51 Probable Submitter: 147.229.197.71 ---- Manual Page -- http://www.php.net/manual/en/function.strtr.php Edit -- https://master.php.net/note/edit/75286 Del: integrated -- https://master.php.net/note/delete/75286/integrated Del: useless -- https://master.php.net/note/delete/75286/useless Del: bad code -- https://master.php.net/note/delete/75286/bad+code Del: spam -- https://master.php.net/note/delete/75286/spam Del: non-english -- https://master.php.net/note/delete/75286/non-english Del: in docs -- https://master.php.net/note/delete/75286/in+docs Del: other reasons-- https://master.php.net/note/delete/75286 Reject -- https://master.php.net/note/reject/75286 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#126819) next »