[C# Express 2008] Problem on executing program with parameter directory japanese
Hello to everyone, first of all sorry for my bad english, I will try to explain my problem.
I am trying to make a simple program in c# that using the sofware FFMpeg: http://www.videohelp.com/tools/ffmpeg
can extract some information from the output created from it.
So I just created a ProcessStartInfo(pathofffmpeg , parameters)
where parameters it's a string just like that:
" -i pathoffileandfile.avi"
All work fine if the directory or the file have just normal ascii code, but as per example I have to extract information from that file:
then I just get from ffmpeg an error because can't get the file E:\??????\Somefile.avi and as you can see the ?????? substitute the correct character of the path.
So I did another try, I went to my XP pc and change Locale to japanese, and try to execute the same command inside a BAT file or just from command prompt and that work !
ffmpeg parameters input expected to be codified into UTF-8 format and actually I tried it too as follow:
private string RunProcess(string Parameters)
//create a process info
ProcessStartInfo oInfo = new ProcessStartInfo(this.FFmpegPath, Parameters);
oInfo.UseShellExecute = false;
oInfo.CreateNoWindow = true;
oInfo.RedirectStandardOutput = true;
oInfo.RedirectStandardError = true;
//Create the output
string output = null;
//try the process
//run the process
Process proc = System.Diagnostics.Process.Start(oInfo);
//now put it in a string
output = proc.StandardError.ReadToEnd();
//Wait for exit
output = string.Empty;
Results, not working Any suggestion about what to do ?????