From efde261c3ef60f22df711c2420383b0c9884fdb0 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Fri, 8 Nov 2024 21:18:40 +0100 Subject: [PATCH] added converting additional UTF-8 characters to internal format --- src/libgame/misc.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/libgame/misc.c b/src/libgame/misc.c index 8003dda8..15c46411 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -2350,7 +2350,18 @@ char *getLatin1FromUTF8(char *utf8) src[1] >= 128 && src[1] < 192 && src[2] >= 128 && src[2] < 192) { - *dst++ = '?'; + // detect and substitute selected UTF-8 characters + if (src[0] == 226 && + src[1] == 128 && + src[2] >= 152 && src[2] <= 155) + *dst++ = '\''; + else if (src[0] == 226 && + src[1] == 128 && + src[2] >= 156 && src[2] <= 159) + *dst++ = '"'; + else + *dst++ = '?'; + src += 3; } else if (src[0] >= 240 && src[0] < 248 && -- 2.34.1