CPP-catch

 view release on metacpan or  search on metacpan

src/catch.hpp  view on Meta::CPAN

11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
}
 
// 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 )