| @@ 962-971 (lines=10) @@ | ||
| 959 | * @param array $input |
|
| 960 | * @return string |
|
| 961 | */ |
|
| 962 | protected function _ucs4_to_ucs4_string($input) |
|
| 963 | { |
|
| 964 | $output = ''; |
|
| 965 | // Take array values and split output to 4 bytes per value |
|
| 966 | // The bit mask is 255, which reads &11111111 |
|
| 967 | foreach ($input as $v) { |
|
| 968 | $output .= chr(($v >> 24) & 255) . chr(($v >> 16) & 255) . chr(($v >> 8) & 255) . chr($v & 255); |
|
| 969 | } |
|
| 970 | return $output; |
|
| 971 | } |
|
| 972 | ||
| 973 | /** |
|
| 974 | * Convert UCS-4 strin into UCS-4 garray |
|
| @@ 265-272 (lines=8) @@ | ||
| 262 | * Convert UCS-4 array into UCS-4 string (Little Endian at the moment) |
|
| 263 | * @access private |
|
| 264 | */ |
|
| 265 | private static function ucs4array_ucs4($input) |
|
| 266 | { |
|
| 267 | $output = ''; |
|
| 268 | foreach ($input as $v) { |
|
| 269 | $output .= chr(($v >> 24) & 255).chr(($v >> 16) & 255).chr(($v >> 8) & 255).chr($v & 255); |
|
| 270 | } |
|
| 271 | return $output; |
|
| 272 | } |
|
| 273 | ||
| 274 | /** |
|
| 275 | * Convert UCS-4 string (LE in the moment) into UCS-4 garray |
|