http://www.mediawiki.org/wiki/Special:Code/MediaWiki/67690
Revision: 67690 Author: liangent Date: 2010-06-09 08:04:26 +0000 (Wed, 09 Jun 2010) Log Message: ----------- pad with spaces Modified Paths: -------------- trunk/extensions/CategoryMultisortChinese/CategoryMultisortChinese.hooks.php Modified: trunk/extensions/CategoryMultisortChinese/CategoryMultisortChinese.hooks.php =================================================================== --- trunk/extensions/CategoryMultisortChinese/CategoryMultisortChinese.hooks.php 2010-06-09 07:44:08 UTC (rev 67689) +++ trunk/extensions/CategoryMultisortChinese/CategoryMultisortChinese.hooks.php 2010-06-09 08:04:26 UTC (rev 67690) @@ -112,10 +112,10 @@ $result = ''; foreach ( $this->onCategoryMultisortSortkeys_splitString( $str ) as $ch ) { # One UTF-8 character can have 4 bytes max. - $c = str_pad( $ch, 4, '_'); + $c = str_pad( $ch, 4); $chcp = utf8ToCodepoint( $ch ); # One Mandarin entry can have 7 bytes max. - $md = str_pad( array_key_exists( $chcp, $data->mandarin ) ? $data->mandarin[$chcp] : '', 7, '_'); + $md = str_pad( array_key_exists( $chcp, $data->mandarin ) ? $data->mandarin[$chcp] : '', 7); $result .= $md . $c; } return $result; @@ -125,7 +125,7 @@ $result = ''; foreach ( $this->onCategoryMultisortSortkeys_splitString( $str ) as $ch ) { # One UTF-8 character can have 4 bytes max. - $c = str_pad( $ch, 4, '_'); + $c = str_pad( $ch, 4); $chcp = utf8ToCodepoint( $ch ); # One stroke entry always has 3 bytes. $s = $this->onCategoryMultisortSortkeys_getStroke( $data, $chcp ); @@ -138,7 +138,7 @@ $result = ''; foreach ( $this->onCategoryMultisortSortkeys_splitString( $str ) as $ch ) { # One UTF-8 character can have 4 bytes max. - $c = str_pad( $ch, 4, '_'); + $c = str_pad( $ch, 4); $chcp = utf8ToCodepoint( $ch ); # One radical-stroke entry always has 3 (radical) + 3 (stroke) = 6 bytes. $r = $this->onCategoryMultisortSortkeys_getRadical( $data, $chcp ); _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs