I am using .Replace()
method to replace a placeholder [CITY]
in arabic language.
public static void Main()
{
Console.WriteLine("Hello World");
var replace = "سنغافورة";
var input = "ABC [CITY] مرحبا بالعالم";
Console.WriteLine(input);
var final = input.Replace("[CITY]", replace);
Console.WriteLine(final);
}
I get the following output
ABC [CITY] مرحبا بالعالم
ABC سنغافورة مرحبا بالعالم
As you can see the city instead of being placed next to ABC is added at the extreme right.
This issue happens only for arabic and works fine for other languages (english/thai/spanish etc)
Not sure whats going wrong here.
C# fiddle - https://dotnetfiddle.net/mvIcHt