diff options
Diffstat (limited to 'src/htscharset.h')
-rw-r--r-- | src/htscharset.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/htscharset.h b/src/htscharset.h index f8f4ca6..55aa2a8 100644 --- a/src/htscharset.h +++ b/src/htscharset.h @@ -44,6 +44,9 @@ Please visit our Website: http://www.httrack.com #include <windows.h> #endif +/** Leading character (ASCII or leading UTF-8 sequence) **/ +#define HTS_IS_LEADING_UTF8(C) ((unsigned char)(C) < 0x80 || (unsigned char)(C) >= 0xc0) + /** * Convert the string "s" from charset "charset" to UTF-8. * Return NULL upon error. @@ -78,6 +81,11 @@ extern char *hts_convertUCS2StringToUTF8(LPWSTR woutput, int wsize); **/ extern char *hts_convertStringSystemToUTF8(const char *s, size_t size); +/** + * Get an UTF-8 string length in characters. + **/ +extern size_t hts_stringLengthUTF8(const char *s); + #endif #endif |