mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-16 19:40:57 +01:00
added is_utf8 license
This commit is contained in:
@@ -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) &&
|
||||
|
||||
Reference in New Issue
Block a user