aboutsummaryrefslogtreecommitdiffstats
path: root/libwc/utf8.h
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@vega.ocn.ne.jp>2011-05-04 07:18:09 +0000
committerTatsuya Kinoshita <tats@vega.ocn.ne.jp>2011-05-04 07:18:09 +0000
commit5f8e0f8ef9a422691dd72e8a953a42a41478fcb4 (patch)
tree4b2df4796a534793648b3c4fc532fc36bd0cd525 /libwc/utf8.h
parentReleasing debian version 0.3-2.4 (diff)
downloadw3m-debian/0.5.1-1.tar.gz
w3m-debian/0.5.1-1.zip
Releasing debian version 0.5.1-1debian/0.5.1-1
Diffstat (limited to 'libwc/utf8.h')
-rw-r--r--libwc/utf8.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/libwc/utf8.h b/libwc/utf8.h
new file mode 100644
index 0000000..c56c68e
--- /dev/null
+++ b/libwc/utf8.h
@@ -0,0 +1,23 @@
+
+#ifndef _WC_UTF8_H
+#define _WC_UTF8_H
+
+#define WC_C_UTF8_L2 0x80
+#define WC_C_UTF8_L3 0x800
+#define WC_C_UTF8_L4 0x10000
+#define WC_C_UTF8_L5 0x200000
+#define WC_C_UTF8_L6 0x4000000
+
+#define WC_UTF8_NOSTATE 0
+#define WC_UTF8_NEXT 1
+
+extern wc_uint8 WC_UTF8_MAP[];
+
+extern size_t wc_ucs_to_utf8(wc_uint32 ucs, wc_uchar *utf8);
+extern wc_uint32 wc_utf8_to_ucs(wc_uchar *utf8);
+extern Str wc_conv_from_utf8(Str is, wc_ces ces);
+extern void wc_push_to_utf8(Str os, wc_wchar_t cc, wc_status *st);
+extern void wc_push_to_utf8_end(Str os, wc_status *st);
+extern Str wc_char_conv_from_utf8(wc_uchar c, wc_status *st);
+
+#endif