summaryrefslogtreecommitdiff
path: root/src/utf8.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/utf8.cc')
-rw-r--r--src/utf8.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/utf8.cc b/src/utf8.cc
index 0138c616..3d25f4f5 100644
--- a/src/utf8.cc
+++ b/src/utf8.cc
@@ -9,7 +9,7 @@
* (at your option) any later version.
*/
-#include <fltk/utf.h>
+#include <FL/fl_utf8.h>
#include "../dlib/dlib.h" /* TRUE/FALSE */
#include "utf8.hh"
@@ -45,7 +45,7 @@ uint_t a_Utf8_end_of_char(const char *str, uint_t i)
*/
uint_t a_Utf8_decode(const char* str, const char* end, int* len)
{
- return utf8decode(str, end, len);
+ return fl_utf8decode(str, end, len);
}
/*
@@ -53,7 +53,7 @@ uint_t a_Utf8_decode(const char* str, const char* end, int* len)
*/
int a_Utf8_encode(unsigned int ucs, char *buf)
{
- return utf8encode(ucs, buf);
+ return fl_utf8encode(ucs, buf);
}
/*
@@ -63,7 +63,7 @@ int a_Utf8_encode(unsigned int ucs, char *buf)
*/
int a_Utf8_test(const char* src, unsigned int srclen)
{
- return utf8test(src, srclen);
+ return fl_utf8test(src, srclen);
}
/*
@@ -100,3 +100,8 @@ bool_t a_Utf8_combining_char(int unicode)
(unicode >= 0x20d0 && unicode <= 0x20ff) ||
(unicode >= 0xfe20 && unicode <= 0xfe2f));
}
+
+int a_Utf8_char_count(const char *str, int len)
+{
+ return fl_utf_nb_char((const uchar_t*)str, len);
+}