added is_utf8 license

This commit is contained in:
TLINDEN
2016-01-15 21:06:18 +01:00
parent feaa022b10
commit a67149229f
2 changed files with 3 additions and 3 deletions

View File

@@ -35,6 +35,9 @@ static char *begins[] = {
/* via http://stackoverflow.com/a/1031773, slightly modified,
licensed under CC-BY-SA, written by Christoph
*/
uint8_t is_utf8(const byte *bytes) {
if( (// non-overlong 2-byte
(0xC2 <= bytes[0] && bytes[0] <= 0xDF) &&