summaryrefslogtreecommitdiff
path: root/src/htsencoding.h
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2013-06-01 09:30:59 +0000
committerXavier Roche <xroche@users.noreply.github.com>2013-06-01 09:30:59 +0000
commit779cfd1126f6cba685505dc04fe26a9f9b3371f7 (patch)
tree4f9677a7d7e4fa5da3b4fbff74a0d4d62a988969 /src/htsencoding.h
parent7268b3d7d8ef137da82987cc469449bf2a3e9020 (diff)
Added hts_unescapeUrl()
Diffstat (limited to 'src/htsencoding.h')
-rw-r--r--src/htsencoding.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/htsencoding.h b/src/htsencoding.h
index cd35a00..4ab660b 100644
--- a/src/htsencoding.h
+++ b/src/htsencoding.h
@@ -46,7 +46,7 @@ Please visit our Website: http://www.httrack.com
* and replace them in-place by their UTF-8 equivalents.
* Note: source and destination may be the same, and the destination only
* needs to hold as space as the source.
- * Returns 0 upon success.
+ * Returns 0 upon success, -1 upon overflow or error.
**/
extern int hts_unescapeEntities(const char *src,
char *dest, const size_t max);
@@ -56,11 +56,19 @@ extern int hts_unescapeEntities(const char *src,
* and replace them in-place by their charset equivalents.
* Note: source and destination may be the same, and the destination only
* needs to hold as space as the source.
- * Returns 0 upon success.
+ * Returns 0 upon success, -1 upon overflow or error.
**/
extern int hts_unescapeEntitiesWithCharset(const char *src,
char *dest, const size_t max,
const char *charset);
-#endif
+/**
+ * Unescape an URL-encoded string. The implicit charset is UTF-8.
+ * In case of UTF-8 decoding error inside URL-encoded characters,
+ * the characters are left undecoded.
+ * Note: source and destination MUST NOT be the same.
+ * Returns 0 upon success, -1 upon overflow or error.
+ **/
+extern int hts_unescapeUrl(const char *src, char *dest, const size_t max);
+#endif