aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utf8.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/utf8.h')
-rw-r--r--src/utf8.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/utf8.h b/src/utf8.h
index 33ed6a5e..99a12a8e 100644
--- a/src/utf8.h
+++ b/src/utf8.h
@@ -14,23 +14,22 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/*
- * utf8: implementation of UTF-8 charset encoding (RFC3629).
- */
+// Implementation of UTF-8 charset encoding (RFC3629).
#ifndef _UTF8_H_
#define _UTF8_H_
#include <stddef.h>
-
#include <string>
-#define UTF8_IGNORE_ERROR 0x01
-#define UTF8_SKIP_BOM 0x02
+#define UTF8_IGNORE_ERROR 0x01
+#define UTF8_SKIP_BOM 0x02
-/* Convert a string between UTF8 and UCS-2/4 (depending on size of wchar_t). Returns true if successful, storing the result of the conversion in *result */
+/// Convert a string between UTF8 and UCS-2/4 (depending on size of wchar_t). Returns true if
+/// successful, storing the result of the conversion in *result*.
bool wchar_to_utf8_string(const std::wstring &input, std::string *result);
-/* Convert a string between UTF8 and UCS-2/4 (depending on size of wchar_t). Returns nonzero if successful, storing the result of the conversion in *out */
+/// Convert a string between UTF8 and UCS-2/4 (depending on size of wchar_t). Returns nonzero if
+/// successful, storing the result of the conversion in *out*.
size_t utf8_to_wchar(const char *in, size_t insize, std::wstring *out, int flags);
size_t wchar_to_utf8(const wchar_t *in, size_t insize, char *out, size_t outsize, int flags);