| 8348 | } |
| 8349 | |
| 8350 | uint32_t headerValue(unsigned char c) { |
| 8351 | if ((c & 0xE0) == 0xC0) { |
| 8352 | return c & 0x1F; |
| 8353 | } |
| 8354 | if ((c & 0xF0) == 0xE0) { |
| 8355 | return c & 0x0F; |
| 8356 | } |
| 8357 | if ((c & 0xF8) == 0xF0) { |
| 8358 | return c & 0x07; |
| 8359 | } |
| 8360 | CATCH_INTERNAL_ERROR("Invalid multibyte utf-8 start byte encountered"); |
| 8361 | } |
| 8362 | |
| 8363 | void hexEscapeChar(std::ostream& os, unsigned char c) { |
| 8364 | std::ios_base::fmtflags f(os.flags()); |