From e6a35344c3f4a94552a5c4c13b2f89fe0eac3bf9 Mon Sep 17 00:00:00 2001 From: miniduikboot Date: Mon, 10 Jan 2022 20:47:02 +0100 Subject: [PATCH] Sync IsCharAllowed with Innersloth implementation --- src/Impostor.Api/Innersloth/TextBox.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Impostor.Api/Innersloth/TextBox.cs b/src/Impostor.Api/Innersloth/TextBox.cs index 1928ce2..11ad22d 100644 --- a/src/Impostor.Api/Innersloth/TextBox.cs +++ b/src/Impostor.Api/Innersloth/TextBox.cs @@ -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 <= '힣'); } } } -- 2.39.5