| 15120 | } |
| 15121 | |
| 15122 | uint32_t headerValue(unsigned char c) { |
| 15123 | if ((c & 0xE0) == 0xC0) { |
| 15124 | return c & 0x1F; |
| 15125 | } |
| 15126 | if ((c & 0xF0) == 0xE0) { |
| 15127 | return c & 0x0F; |
| 15128 | } |
| 15129 | if ((c & 0xF8) == 0xF0) { |
| 15130 | return c & 0x07; |
| 15131 | } |
| 15132 | CATCH_INTERNAL_ERROR("Invalid multibyte utf-8 start byte encountered"); |
| 15133 | } |
| 15134 | |
| 15135 | void hexEscapeChar(std::ostream& os, unsigned char c) { |
| 15136 | std::ios_base::fmtflags f(os.flags()); |