| @@ 292-306 (lines=15) @@ | ||
| 289 | } |
|
| 290 | // Multibyte sequence leading byte |
|
| 291 | else {
|
|
| 292 | if ($c < 0xE0) {
|
|
| 293 | $s = 2; |
|
| 294 | } |
|
| 295 | else if ($c < 0xF0) {
|
|
| 296 | $s = 3; |
|
| 297 | } |
|
| 298 | else if ($c < 0xF8) {
|
|
| 299 | $s = 4; |
|
| 300 | } |
|
| 301 | // 5/6 byte sequences not possible for Unicode. |
|
| 302 | else {
|
|
| 303 | $out .= "\xFF\xFD"; |
|
| 304 | while (ord($txt{$i + 1}) >= 0x80 && ord($txt{$i + 1}) < 0xC0) { ++$i; }
|
|
| 305 | continue; |
|
| 306 | } |
|
| 307 | ||
| 308 | $q = array($c); |
|
| 309 | // Fetch rest of sequence |
|
| @@ 393-407 (lines=15) @@ | ||
| 390 | } |
|
| 391 | // Multibyte sequence leading byte |
|
| 392 | else {
|
|
| 393 | if ($c < 0xE0) {
|
|
| 394 | $s = 2; |
|
| 395 | } |
|
| 396 | else if ($c < 0xF0) {
|
|
| 397 | $s = 3; |
|
| 398 | } |
|
| 399 | else if ($c < 0xF8) {
|
|
| 400 | $s = 4; |
|
| 401 | } |
|
| 402 | // 5/6 byte sequences not possible for Unicode. |
|
| 403 | else {
|
|
| 404 | $out[] = 0xFFFD; |
|
| 405 | while (ord($txt{$i + 1}) >= 0x80 && ord($txt{$i + 1}) < 0xC0) { ++$i; }
|
|
| 406 | continue; |
|
| 407 | } |
|
| 408 | ||
| 409 | $q = array($c); |
|
| 410 | // Fetch rest of sequence |
|