summaryrefslogtreecommitdiff
path: root/src/htscharset.h
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2013-05-13 11:17:31 +0000
committerXavier Roche <xroche@users.noreply.github.com>2013-05-13 11:17:31 +0000
commit8cdb6d6fb056575f58eaf7e1a8fae2f31c321d13 (patch)
tree03cf143582b475f3a973ee5569501e7d313a5645 /src/htscharset.h
parent1c496d66c8d39fac3ec5dee010e5ef7f3cba83ba (diff)
Limit the final destination path lenght to 256 (Windows compatibility)
See http://code.google.com/p/httrack/issues/detail?id=9
Diffstat (limited to 'src/htscharset.h')
-rw-r--r--src/htscharset.h8
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