diff --git a/Test/SmppTestClient/Program.cs b/Test/SmppTestClient/Program.cs index bbe20e4..fe12b29 100644 --- a/Test/SmppTestClient/Program.cs +++ b/Test/SmppTestClient/Program.cs @@ -49,7 +49,27 @@ static void Main(string[] args) Console.Write("\n#>"); - string? command = Console.ReadLine(); + Console.WriteLine("Select language for testing: "); + Console.WriteLine("1. English"); + Console.WriteLine("2. Arabic"); + + string choice = Console.ReadLine(); + string? command; + + switch (choice) + { + case "1": + command = "send 12223334444 Hello"; + break; + case "2": + command = "send 12223334444 سلام علیکم"; + break; + default: + Console.WriteLine("Invalid choice, defaulting to English."); + command = "send 12223334444 Hello"; + break; + } + if (command == null || command.Length == 0) continue; @@ -99,11 +119,13 @@ private static void SendMessage(ESMEManager connectionManager, string command) // This is set in the Submit PDU to the SMSC // If you are responding to a received message, make this the same as the received message - DataCodings submitDataCoding = DataCodings.Default; + // Adjusted to ucs2 for supporting Arabic character. + DataCodings submitDataCoding = DataCodings.UCS2; // Use this to encode the message // We need to know the actual encoding. - DataCodings encodeDataCoding = DataCodings.ASCII; + // Adjusted to ucs2 for supporting Arabic character. + DataCodings encodeDataCoding = DataCodings.UCS2; // There is a default encoding set for each connection. This is used if the encodeDataCoding is Default