CPP-catch
view release on metacpan or search on metacpan
src/catch.hpp view on Meta::CPAN
118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889}
// Plain ASCII: Write it to stream
if
(c < 0x7F) {
os << c;
break;
}
// UTF-8 territory
// Check
if
the encoding is valid and
if
it is not,
hex
escape bytes.
// Important: We
do
not check the exact decoded
values
for
validity, only the encoding
format
// First check that this bytes is a valid lead byte:
// This means that it is not encoded as 1111 1XXX
// Or as 10XX XXXX
if
(c < 0xC0 ||
c >= 0xF8) {
hexEscapeChar(os, c);
break;
}
auto encBytes = trailingBytes(c);
( run in 0.256 second using v1.01-cache-2.11-cpan-1dc43b0fbd2 )