[Hastymail-cvs] hastymail/lib general.php,1.223,1.224
Brought to you by:
sailfrog,
slushpupie
From: <sai...@us...> - 2004-12-16 16:21:00
|
Update of /cvsroot/hastymail/hastymail/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5180 Modified Files: general.php Log Message: removing old utf8 convert functions. It is a TINY bit faster but for some reason buggy. The slowdown is so small that its in no way a bottle neck and since this version seems more portable its the better way to go. Index: general.php =================================================================== RCS file: /cvsroot/hastymail/hastymail/lib/general.php,v retrieving revision 1.223 retrieving revision 1.224 diff -u -d -r1.223 -r1.224 --- general.php 16 Dec 2004 15:57:44 -0000 1.223 +++ general.php 16 Dec 2004 16:20:52 -0000 1.224 @@ -287,24 +287,7 @@ * @param $code_page array conversion table for the text charset * @return string converted text * -function hm_utf8_convert($text, $code_page) { - $utf8=''; - while($text) { - if (ord(substr($text, 0, 1)) > 127) { - $char = substr($text, 0, 1); - $text = substr($text, 1); - $index = '0x'.strtoupper(dechex(ord($char))); - $utf8 .= '&#x'.substr($code_page[$index], 2).';'; - } - else { - $utf8 .= substr($text, 0, 1); - $text = substr($text, 1); - } - } - return $utf8; -} */ - function hm_utf8_convert($text, $code_page) { $utf8=''; $text_array = preg_split('//', $text, -1, PREG_SPLIT_NO_EMPTY); |