X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;ds=inline;f=src%2Flibgame%2Ftext.c;h=eb36ab2285a47c42e0f8394e49a4d7850d419cf2;hb=51cc8f17af487cc53aafccf050ff1b16fec878a9;hp=36096240203880ba31d6744f0c9bab2d9cc05eb0;hpb=b17343806da99bd24842f0b2e58d8513e0108bb7;p=rocksndiamonds.git diff --git a/src/libgame/text.c b/src/libgame/text.c index 36096240..eb36ab22 100644 --- a/src/libgame/text.c +++ b/src/libgame/text.c @@ -371,6 +371,15 @@ char *GetTextBufferFromFile(char *filename, int max_lines) closeFile(file); + if (getTextEncoding(buffer) == TEXT_ENCODING_UTF_8) + { + char *body_latin1 = getLatin1FromUTF8(buffer); + + checked_free(buffer); + + buffer = body_latin1; + } + return buffer; }