summaryrefslogtreecommitdiff
path: root/src/htscharset.h
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2013-06-01 09:31:43 +0000
committerXavier Roche <xroche@users.noreply.github.com>2013-06-01 09:31:43 +0000
commit7f82ef46816b65268b231e75eb403faf2801e52a (patch)
treedf875bf389f0e85c5264e3c2880c3cf8c36913c5 /src/htscharset.h
parent779cfd1126f6cba685505dc04fe26a9f9b3371f7 (diff)
Added hts_readUTF8()
Diffstat (limited to 'src/htscharset.h')
-rw-r--r--src/htscharset.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/htscharset.h b/src/htscharset.h
index c22978e..0453788 100644
--- a/src/htscharset.h
+++ b/src/htscharset.h
@@ -135,25 +135,33 @@ extern size_t hts_stringLengthUCS4(const hts_UCS4 *s);
**/
extern size_t hts_writeUTF8(hts_UCS4 uc, char *dest, size_t size);
-/* WIN32 specific. */
+/**
+ * Read the next Unicode character within 'src' of size 'size' and, upon
+ * successful reading, return the number of bytes read and place the
+ * character is 'puc'.
+ * Return 0 upon error.
+ **/
+extern size_t hts_readUTF8(const char *src, size_t size, hts_UCS4 *puc);
+/** WIN32 specific functions. **/
#ifdef _WIN32
-
/**
* Convert UTF-8 to WCHAR.
+ * This function is WIN32 specific.
**/
extern LPWSTR hts_convertUTF8StringToUCS2(const char *s, int size, int *pwsize);
/**
* Convert from WCHAR.
+ * This function is WIN32 specific.
**/
extern char *hts_convertUCS2StringToUTF8(LPWSTR woutput, int wsize);
/**
* Convert current system codepage to UTF-8.
+ * This function is WIN32 specific.
**/
extern char *hts_convertStringSystemToUTF8(const char *s, size_t size);
-
#endif
#endif