From: Holger Schemel Date: Fri, 8 Nov 2024 20:18:40 +0000 (+0100) Subject: added converting additional UTF-8 characters to internal format X-Git-Tag: 4.4.0.0-test-4~72 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=efde261c3ef60f22df711c2420383b0c9884fdb0;p=rocksndiamonds.git added converting additional UTF-8 characters to internal format --- 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 &&