|
From: FlorinCB <ory...@us...> - 2008-12-31 02:05:48
|
Update of /cvsroot/mxbb/phpbb2mxp/includes/utf In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv12742/includes/utf Added Files: utf_normalizer.php utf_tools.php Log Message: upgrade to 2.0.24-beta1 --- NEW FILE: utf_tools.php --- <?php /** * * @package utf * @version $Id: utf_tools.php,v 1.1 2008/12/31 01:44:31 orynider Exp $ * @copyright (c) 2006 phpBB Group * @license http://opensource.org/licenses/gpl-license.php GNU Public License * */ /** */ if (!defined('IN_PHPBB')) { exit; } // Enforce ASCII only string handling setlocale(LC_CTYPE, 'C'); [...1881 lines suppressed...] if (utf8_strlen($new_lines[$index] . $word) > $width) { $new_lines[$index] = substr($new_lines[$index], 0, -1); $index++; $new_lines[$index] = ''; } $new_lines[$index] .= $word . ' '; } $new_lines[$index] = substr($new_lines[$index], 0, -1); $index++; $new_lines[$index] = ''; } unset($new_lines[$index]); return implode($break, $new_lines); } ?> --- NEW FILE: utf_normalizer.php --- <?php /** * * @package utf * @version $Id: utf_normalizer.php,v 1.1 2008/12/31 01:44:31 orynider Exp $ * @copyright (c) 2005 phpBB Group * @license http://opensource.org/licenses/gpl-license.php GNU Public License * */ /** */ if (!defined('IN_PHPBB')) { exit; } /** * Some Unicode characters encoded in UTF-8 [...1477 lines suppressed...] { // If the $tmp_pos cursor was moved then at least one character was not in normal form. Replace $str with the fixed version if ($tmp_pos == $len) { // The $tmp_pos cursor is at the end of $str, therefore $tmp holds the whole $str return $tmp; } else { // The rightmost chunk of $str has not been appended to $tmp yet return $tmp . substr($str, $tmp_pos); } } // The string was already in normal form return $str; } } ?> |