aboutsummaryrefslogtreecommitdiff
path: root/src/utf8.hh
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2009-05-26 20:25:00 -0400
committercorvid <corvid@lavabit.com>2009-05-26 20:25:00 -0400
commita11a9dbd6db6632073ec5560ec473b76ed9c5536 (patch)
tree4ecec941ca9fdfc3a777a7f37650d959b95ce999 /src/utf8.hh
parent905f51d5f73d99b45d8fd7d1bd1b1ce28796d981 (diff)
Minor utf8 refactor
Diffstat (limited to 'src/utf8.hh')
-rw-r--r--src/utf8.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/utf8.hh b/src/utf8.hh
index cdf6b50a..eaf82b6f 100644
--- a/src/utf8.hh
+++ b/src/utf8.hh
@@ -8,6 +8,13 @@ extern "C" {
#include "d_size.h"
+/*
+ * Unicode replacement character U+FFFD
+ * "used to replace an incoming character whose value is unknown or otherwise
+ * unrepresentable in Unicode"
+ */
+const char utf8_replacement_char[] = "\xEF\xBF\xBD";
+
uint_t a_Utf8_end_of_char(const char *str, uint_t i);
uint_t a_Utf8_decode(const char*, const char* end, int* len);
int a_Utf8_encode(unsigned int ucs, char *buf);