mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-17 12:00:56 +01:00
added is_utf8 license
This commit is contained in:
3
TODO
3
TODO
@@ -15,8 +15,5 @@ vault checksum: add keysigs as well
|
|||||||
|
|
||||||
Add newlines to headers in define.h, so strlen() later catches the whole length.
|
Add newlines to headers in define.h, so strlen() later catches the whole length.
|
||||||
|
|
||||||
Check is_utf8 license.
|
|
||||||
also found in https://gd.meizo.com/_files/lpc/ext/utf8.c
|
|
||||||
|
|
||||||
c++ destructor double free mess
|
c++ destructor double free mess
|
||||||
|
|
||||||
|
|||||||
@@ -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) {
|
uint8_t is_utf8(const byte *bytes) {
|
||||||
if( (// non-overlong 2-byte
|
if( (// non-overlong 2-byte
|
||||||
(0xC2 <= bytes[0] && bytes[0] <= 0xDF) &&
|
(0xC2 <= bytes[0] && bytes[0] <= 0xDF) &&
|
||||||
|
|||||||
Reference in New Issue
Block a user