summaryrefslogtreecommitdiff
path: root/src/core/utf8.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/utf8.c')
-rw-r--r--src/core/utf8.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/utf8.c b/src/core/utf8.c
index d931ba19..c9303d19 100644
--- a/src/core/utf8.c
+++ b/src/core/utf8.c
@@ -28,9 +28,9 @@
/* Provide is_utf8(): */
#include "recode.h"
-int string_advance(char const **str, gboolean utf8)
+int string_advance(char const **str, int policy)
{
- if (utf8) {
+ if (policy == TREAT_STRING_AS_UTF8) {
gunichar c;
c = g_utf8_get_char(*str);
@@ -38,6 +38,7 @@ int string_advance(char const **str, gboolean utf8)
return unichar_isprint(c) ? mk_wcwidth(c) : 1;
} else {
+ /* Assume TREAT_STRING_AS_BYTES: */
*str += 1;
return 1;