summaryrefslogtreecommitdiff
path: root/lib/util/charset/codepoints.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util/charset/codepoints.c')
-rw-r--r--lib/util/charset/codepoints.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/util/charset/codepoints.c b/lib/util/charset/codepoints.c
index 3d444a6df31..2c9a9c4b136 100644
--- a/lib/util/charset/codepoints.c
+++ b/lib/util/charset/codepoints.c
@@ -16817,6 +16817,10 @@ _PUBLIC_ codepoint_t next_codepoint_ext(const char *str, size_t len,
_PUBLIC_ codepoint_t next_codepoint(const char *str, size_t *size)
{
+ if ((str[0] & 0x80) == 0) {
+ *size = 1;
+ return str[0];
+ }
return next_codepoint_handle(get_iconv_handle(), str, size);
}