utf8_islead(): * Test whether a byte is a leading byte of a UTF-8 sequence. */
| 299 | * Test whether a byte is a leading byte of a UTF-8 sequence. |
| 300 | */ |
| 301 | private int |
| 302 | utf8_islead(int c) |
| 303 | { |
| 304 | return c < 0x80 || /* single byte char */ |
| 305 | (c >= 0xc2 && c <= 0xf4); /* start of multibyte sequence */ |
| 306 | } |
| 307 | #endif |
| 308 | |
| 309 | /* read_char(): |