'String interpolation acting strange with special characters
I'm trying to do file save/remove in .NET (C#), but I bumped into strange behavior. I have the following string:
string baseName = "קומה 1";
string extension = "xyz";
I want this string to be concatenated with another string, let's say "_00".
I tried following:
string finalName = baseName + "_00." + extension;
string finalInterpolatedName = $"{baseName}_00.{extension}";
string finalInterpolatedNameWithCulture = $"{baseName.ToString(CultureInfo.InvariantCulture)}_00.{extension}";
I'm expecting to get something like strangeString_00.xyz, but instead I'm getting 00_strangeString.xyz. And I just realized that I cannot even write that in any notepad or SO text box, for some reason, after "קומה 1" numbers kept going to the left side. I would like to understand what is happening and why.
Tnx
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
