| 15444 | } |
| 15445 | |
| 15446 | uint32_t headerValue(unsigned char c) { |
| 15447 | if ((c & 0xE0) == 0xC0) { |
| 15448 | return c & 0x1F; |
| 15449 | } |
| 15450 | if ((c & 0xF0) == 0xE0) { |
| 15451 | return c & 0x0F; |
| 15452 | } |
| 15453 | if ((c & 0xF8) == 0xF0) { |
| 15454 | return c & 0x07; |
| 15455 | } |
| 15456 | CATCH_INTERNAL_ERROR("Invalid multibyte utf-8 start byte encountered"); |
| 15457 | } |
| 15458 | |
| 15459 | void hexEscapeChar(std::ostream& os, unsigned char c) { |
| 15460 | std::ios_base::fmtflags f(os.flags()); |