]> git.deb.at Git - rhonda/impostor.git/commitdiff
Sync IsCharAllowed with Innersloth implementation
authorminiduikboot <mini@duikbo.at>
Mon, 10 Jan 2022 19:47:02 +0000 (20:47 +0100)
committerminiduikboot <mini@duikbo.at>
Mon, 10 Jan 2022 19:54:45 +0000 (20:54 +0100)
src/Impostor.Api/Innersloth/TextBox.cs

index 1928ce28326d7edae47841d6cb4dc480ea95a109..11ad22d45408b8d6b1aa92869d11e5b1b6febe21 100644 (file)
@@ -4,7 +4,19 @@
     {
         public static bool IsCharAllowed(char i)
         {
-            return i == ' ' || (i >= 'A' && i <= 'Z') || (i >= 'a' && i <= 'z') || (i >= '0' && i <= '9') || (i >= 'À' && i <= 'ÿ') || (i >= 'Ѐ' && i <= 'џ') || (i >= 'ㄱ' && i <= 'ㆎ') || (i >= '가' && i <= '힣');
+            return i == ' ' ||
+                (i >= 'A' && i <= 'Z') ||
+                (i >= 'a' && i <= 'z') ||
+                (i >= '0' && i <= '9') ||
+
+                // U+00C0 to U+00FF (Latin-1 Supplement)
+                (i >= 'À' && i <= 'ÿ') ||
+
+                // U+0400 to U+045F (Cyrillic)
+                (i >= 'Ѐ' && i <= 'џ') ||
+
+                // U+2C61 to U+D7A3 (CJK)
+                (i >= 'ⱡ' && i <= '힣');
         }
     }
 }