note 56297 deleted from function.convert-cyr-string by sean

From: Date: Tue, 30 Aug 2005 23:56:44 +0000
Subject: note 56297 deleted from function.convert-cyr-string by sean
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-94463@lists.php.net to get a copy of this message
Note Submitter: Reason: bad code ---- //I've just added some chars to win3utf converter: function win3utf($s) { for($i=0, $m=strlen($s); $i<$m; $i++) { $c=ord($s[$i]); if ($c<=127) {$t.=chr($c); continue; } if ($c>=192 && $c<=207) {$t.=chr(208).chr($c-48); continue; } if ($c>=208 && $c<=239) {$t.=chr(208).chr($c-48); continue; } if ($c>=240 && $c<=255) {$t.=chr(209).chr($c-112); continue; } if ($c==168) { $t.=chr(208).chr(129); continue; }; // ¨ if ($c==184) { $t.=chr(209).chr(145); continue; }; // ¸ if ($c==171) { $t.=chr(194).chr(171); continue; }; // « if ($c==187) { $t.=chr(194).chr(187); continue; }; // » if ($c==149) { $t.=chr(226).chr(128).chr(162); continue; }; // • if ($c==150) { $t.=chr(226).chr(128).chr(147); continue; }; // – if ($c==151) { $t.=chr(226).chr(128).chr(148); continue; }; // — if ($c==145) { $t.=chr(226).chr(128).chr(152); continue; }; // ‘ if ($c==146) { $t.=chr(226).chr(128).chr(153); continue; }; // ’ if ($c==147) { $t.=chr(226).chr(128).chr(156); continue; }; // “ if ($c==148) { $t.=chr(226).chr(128).chr(157); continue; }; // ” } return $t; } //you can check it by: echo win3utf('ÀÁÂÃÄŨÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞß àáâãä叿çèéêëìíîïðñòóôõö÷øùúûüýþÿ «» ”“ ‘’— – •');

« previous php.notes (#94463) next »