From a3499dd8952abc93a7f75893ae9e81489ccaa0de Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 21 Feb 2021 21:01:52 +0100 Subject: [PATCH] fix new bug in ascii converter. --- src/util/unicode.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/unicode.c b/src/util/unicode.c index 6f8d4acb5..7d3b0dc5b 100644 --- a/src/util/unicode.c +++ b/src/util/unicode.c @@ -578,6 +578,9 @@ int unicode_utf8_to_ascii(unsigned char *cp_character, const char * utf8_string, if (*length > 1) { *cp_character = '?'; } + else { + *cp_character = (unsigned char)ucs4_character; + } } return result; }