aboutsummaryrefslogtreecommitdiff
path: root/src/include/ndpi_api.h
diff options
context:
space:
mode:
authorLuca <deri@ntop.org>2025-03-27 08:04:14 +0100
committerLuca <deri@ntop.org>2025-03-27 08:04:14 +0100
commit229b285c6545191e33ee918f9adde61377a58be7 (patch)
treed808b045b90510c67e1d4c91e03bc10443947b36 /src/include/ndpi_api.h
parent8bb3a9faf7c9e9c7e92a810d7832a53f76a7d52a (diff)
Added ndpi_str_to_utf8() API call to convert an ISO 8859 stirng to UTF-8
Diffstat (limited to 'src/include/ndpi_api.h')
-rw-r--r--src/include/ndpi_api.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h
index c4079f122..3b06b0f9d 100644
--- a/src/include/ndpi_api.h
+++ b/src/include/ndpi_api.h
@@ -2455,7 +2455,20 @@ extern "C" {
* @return Length of src string
*/
size_t ndpi_strlcpy(char* dst, const char* src, size_t dst_len, size_t src_len);
-
+
+ /**
+ * @brief Converts a string from ISO 8859 to UTF-8
+ *
+ * @param in String to convert
+ * @param in_len Source string lenght
+ * @param out Destination string buffer (UTF-8)
+ * @param out_len Length of destination string buffer. It must be at least (2*in_len)+1
+ *
+ * @return The destination string buffer
+ */
+ u_char* ndpi_str_to_utf8(u_char *in, u_int in_len, u_char *out, u_int out_len);
+
+
#ifdef __cplusplus
}
#endif