@@ 4052-4055 (lines=4) @@ | ||
4049 | if ($c <= 0x7F) { |
|
4050 | $unicode[] = $c; // use the character "as is" because is ASCII |
|
4051 | $numbytes = 1; |
|
4052 | } elseif (($c >> 0x05) === 0x06) { // 2 bytes character (0x06 = 110 BIN) |
|
4053 | $bytes[] = ($c - 0xC0) << 0x06; |
|
4054 | $numbytes = 2; |
|
4055 | } elseif (($c >> 0x04) === 0x0E) { // 3 bytes character (0x0E = 1110 BIN) |
|
4056 | $bytes[] = ($c - 0xE0) << 0x0C; |
|
4057 | $numbytes = 3; |
|
4058 | } elseif (($c >> 0x03) === 0x1E) { // 4 bytes character (0x1E = 11110 BIN) |
|
@@ 4058-4061 (lines=4) @@ | ||
4055 | } elseif (($c >> 0x04) === 0x0E) { // 3 bytes character (0x0E = 1110 BIN) |
|
4056 | $bytes[] = ($c - 0xE0) << 0x0C; |
|
4057 | $numbytes = 3; |
|
4058 | } elseif (($c >> 0x03) === 0x1E) { // 4 bytes character (0x1E = 11110 BIN) |
|
4059 | $bytes[] = ($c - 0xF0) << 0x12; |
|
4060 | $numbytes = 4; |
|
4061 | } else { |
|
4062 | // use replacement character for other invalid sequences |
|
4063 | $unicode[] = 0xFFFD; |
|
4064 | $bytes = array(); |