From 393c5ac4fe0063b73daee7f3bce558133def7d37 Mon Sep 17 00:00:00 2001 From: Dav999-v Date: Thu, 23 Feb 2023 04:11:36 +0100 Subject: [PATCH] Replace utfcpp by UTF8.h in CustomLevels.cpp --- desktop_version/src/CustomLevels.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/desktop_version/src/CustomLevels.cpp b/desktop_version/src/CustomLevels.cpp index de6a5eff..66453d69 100644 --- a/desktop_version/src/CustomLevels.cpp +++ b/desktop_version/src/CustomLevels.cpp @@ -7,7 +7,6 @@ #include #include #include -#include #include "Alloc.h" #include "Constants.h" @@ -24,6 +23,7 @@ #include "Map.h" #include "Screen.h" #include "Script.h" +#include "UTF8.h" #include "UtilityClass.h" #include "Vlogging.h" #include "XMLUtils.h" @@ -208,10 +208,7 @@ static std::string find_tag(const std::string& buf, const std::string& start, co { SDL_sscanf(number.c_str(), "%" SCNu32, &character); } - uint32_t utf32[] = {character, 0}; - std::string utf8; - utf8::unchecked::utf32to8(utf32, utf32 + 1, std::back_inserter(utf8)); - value.replace(start_pos, end - start_pos + 1, utf8); + value.replace(start_pos, end - start_pos + 1, UTF8_encode(character).bytes); } return value;