Index: trunk/extensions/CategoryMultisortChinese/CategoryMultisortChinese.hooks.php |
— | — | @@ -112,10 +112,10 @@ |
113 | 113 | $result = ''; |
114 | 114 | foreach ( $this->onCategoryMultisortSortkeys_splitString( $str ) as $ch ) { |
115 | 115 | # One UTF-8 character can have 4 bytes max. |
116 | | - $c = str_pad( $ch, 4, "\0"); |
| 116 | + $c = str_pad( $ch, 4, '_'); |
117 | 117 | $chcp = utf8ToCodepoint( $ch ); |
118 | 118 | # One Mandarin entry can have 7 bytes max. |
119 | | - $md = str_pad( array_key_exists( $chcp, $data->mandarin ) ? $data->mandarin[$chcp] : '', 7, "\0"); |
| 119 | + $md = str_pad( array_key_exists( $chcp, $data->mandarin ) ? $data->mandarin[$chcp] : '', 7, '_'); |
120 | 120 | $result .= $md . $c; |
121 | 121 | } |
122 | 122 | return $result; |
— | — | @@ -125,7 +125,7 @@ |
126 | 126 | $result = ''; |
127 | 127 | foreach ( $this->onCategoryMultisortSortkeys_splitString( $str ) as $ch ) { |
128 | 128 | # One UTF-8 character can have 4 bytes max. |
129 | | - $c = str_pad( $ch, 4, "\0"); |
| 129 | + $c = str_pad( $ch, 4, '_'); |
130 | 130 | $chcp = utf8ToCodepoint( $ch ); |
131 | 131 | # One stroke entry always has 3 bytes. |
132 | 132 | $s = $this->onCategoryMultisortSortkeys_getStroke( $data, $chcp ); |
— | — | @@ -138,7 +138,7 @@ |
139 | 139 | $result = ''; |
140 | 140 | foreach ( $this->onCategoryMultisortSortkeys_splitString( $str ) as $ch ) { |
141 | 141 | # One UTF-8 character can have 4 bytes max. |
142 | | - $c = str_pad( $ch, 4, "\0"); |
| 142 | + $c = str_pad( $ch, 4, '_'); |
143 | 143 | $chcp = utf8ToCodepoint( $ch ); |
144 | 144 | # One radical-stroke entry always has 3 (radical) + 3 (stroke) = 6 bytes. |
145 | 145 | $r = $this->onCategoryMultisortSortkeys_getRadical( $data, $chcp ); |