For example, there is a path (English, Ukrainian, Armenian and Greek) that I pass to the console with any command.
I am passing the given string through C#. Here is an example:
Process p = new Process();
p.StartInfo.FileName = "cmd.exe";
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.CreateNoWindow = true;
p.StartInfo.StandardInputEncoding = Encoding.UTF8;
p.Start();
using (StreamWriter sw = p.StandardInput)
{
if (sw.BaseStream.CanWrite)
{
sw.WriteLine(@"dir D:\A1g0r\Project Visual Studio\Проект\Նախագիծ\Εργο");
}
}
The problem arises that Unicode does not help or I can specify the encoding for one language + English, which may not be enough. But we don't know what folder names users have. Therefore, the question arises from this, how to make it work multilingually? I will clarify that I can have many commands that I execute in the console
I googled, read articles, and of course turned to ChatGPT, but I didn’t even find an approximate answer