summaryrefslogtreecommitdiffstats
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/libguess.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/engines/libguess.c b/engines/libguess.c
index 18d2ca5..dd89ced 100644
--- a/engines/libguess.c
+++ b/engines/libguess.c
@@ -19,9 +19,31 @@
#include <stdio.h>
#include <string.h>
+#include "../config.h"
#include <librcc.h>
-#include <libguess.h>
+
+#ifdef HAVE_LIBGUESS_LIBGUESS_H
+# include <libguess/libguess.h>
+static const char *guess_jp(const char *buf, int buflen) {
+ return libguess_determine_encoding(buf, buflen, GUESS_REGION_JP);
+}
+
+static const char *guess_cn(const char *buf, int buflen) {
+ return libguess_determine_encoding(buf, buflen, GUESS_REGION_CN);
+}
+
+static const char *guess_tw(const char *buf, int buflen) {
+ return libguess_determine_encoding(buf, buflen, GUESS_REGION_TW);
+}
+
+static const char *guess_kr(const char *buf, int buflen) {
+ return libguess_determine_encoding(buf, buflen, GUESS_REGION_KR);
+}
+
+#else /* HAVE_LIBGUESS_H */
+# include <libguess.h>
+#endif /* HAVE_LIBGUESS_LIBGUESS_H */
#define UTF8_ID 0
#define UTF16_ID 1