diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp
index 0740850d8c1..b2696bcaea8 100644
--- a/soh/soh/Enhancements/randomizer/randomizer.cpp
+++ b/soh/soh/Enhancements/randomizer/randomizer.cpp
@@ -1758,72 +1758,55 @@ std::string FormatJsonHintText(std::string jsonHint) {
     char newLine = 0x01;
     char playerName = 0x0F;
     char nextBox = 0x04;
-    char aSpeCap1 = 0x80;
-    char iSpeLow = 0x81;
-    char aSpeCap2 = 0x82;
-    char aSpeCap3 = 0x83;
-    char cSpeCap = 0x84;
-    char eSpeCap1 = 0x85;
-    char eSpeCap2 = 0x86;
-    char eSpeCap3 = 0x87;
-    char eSpeCap4 = 0x88;
-    char iSpeCap = 0x89;
-    char oSpeCap1 = 0x8A;
-    char oSpeCap2 = 0x8B;
-    char uSpeCap1 = 0x8C;
-    char uSpeCap2 = 0x8D;
-    char uSpeCap3 = 0x8E;
-    char bSpeGer3 = 0x8F;
-    char aSpeLow1 = 0x90;
-    char aSpeLow2 = 0x91;
-    char aSpeLow3 = 0x92;
-    char aSpeLow4 = 0x93;
-    char cSpeLow = 0x94;
-    char eSpeLow1 = 0x95;
-    char eSpeLow2 = 0x96;
-    char eSpeLow3 = 0x97;
-    char eSpeLow4 = 0x98;
-    char iSpeLow2 = 0x99;
-    char oSpeLow1 = 0x9A;
-    char oSpeLow2 = 0x9B;
-    char uSpeLow1 = 0x9C;
-    char uSpeLow2 = 0x9D;
-    char uSpeLow3 = 0x9E;
     std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), '&', newLine);
     std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), '^', nextBox);
     std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), '@', playerName);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'À', aSpeCap1);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'î', iSpeLow);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'Â', aSpeCap2);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'Ä', aSpeCap3);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'Ç', cSpeCap);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'È', eSpeCap1);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'É', eSpeCap2);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'Ê', eSpeCap3);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'Ë', eSpeCap4);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'Ï', iSpeCap);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'Ô', oSpeCap1);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'Ö', oSpeCap2);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'Ù', uSpeCap1);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'Û', uSpeCap2);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'Ü', uSpeCap3);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'ß', bSpeGer3);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'à', aSpeLow1);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'á', aSpeLow2);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'â', aSpeLow3);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'ä', aSpeLow4);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'ç', cSpeLow);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'è', eSpeLow1);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'é', eSpeLow2);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'ê', eSpeLow3);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'ë', eSpeLow4);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'ï', iSpeLow2);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'ô', oSpeLow1);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'ö', oSpeLow2);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'ù', uSpeLow1);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'û', uSpeLow2);
-    std::replace(formattedHintMessage.begin(), formattedHintMessage.end(), 'ü', uSpeLow3);
-    
+
+    std::unordered_map<std::string, char> textBoxSpecialCharacters = {
+        {"À", 0x80 },
+        {"î", 0x81 },
+        {"Â", 0x82 },
+        {"Ä", 0x83 },
+        {"Ç", 0x84 },
+        {"È", 0x85 },
+        {"É", 0x86 },
+        {"Ê", 0x87 },
+        {"Ë", 0x88 },
+        {"Ï", 0x89 },
+        {"Ô", 0x8A },
+        {"Ö", 0x8B },
+        {"Ù", 0x8C },
+        {"Û", 0x8D },
+        {"Ü", 0x8E },
+        {"ß", 0x8F },
+        {"à", 0x90 },
+        {"á", 0x91 },
+        {"â", 0x92 },
+        {"ä", 0x93 },
+        {"ç", 0x94 },
+        {"è", 0x95 },
+        {"é", 0x96 },
+        {"ê", 0x97 },
+        {"ë", 0x98 },
+        {"ï", 0x99 },
+        {"ô", 0x9A },
+        {"ö", 0x9B },
+        {"ù", 0x9C },
+        {"û", 0x9D },
+        {"ü", 0x9E }
+    };
+
+    // add special characters
+    for (auto specialCharacterPair : textBoxSpecialCharacters) {
+        size_t start_pos = 0;
+        std::string textBoxSpecialCharacterString = "";
+        textBoxSpecialCharacterString += specialCharacterPair.second;
+        while((start_pos = formattedHintMessage.find(specialCharacterPair.first, start_pos)) != std::string::npos) {
+            formattedHintMessage.replace(start_pos, specialCharacterPair.first.length(), textBoxSpecialCharacterString);
+            start_pos += textBoxSpecialCharacterString.length();
+        }
+    }
+
     // add icons to altar text
     for (char iconChar : {'0', '1', '2', '3', '4', '5', '6', '7', '8', 'o', 'c', 'i', 'l', 'b', 'L', 'k'}) {
         std::string textToReplace = "$";
