FET Forum

FET Support (English) => Programming Help => Topic started by: rasha5 on September 09, 2020, 11:01:29 AM

Title: Can't Read Arabic message Return from FET CL
Post by: rasha5 on September 09, 2020, 11:01:29 AM
Hello,

I'm using the fet-cl executable in c# project (on windows) when I use the command line with Ar parameter (Arabic language) it returns the conflict or error messages with  ?? characters and can't read them

and I'm using the last version of FET

Title: Re: Can't Read Arabic message Return from FET CL
Post by: Liviu Lalescu on September 09, 2020, 11:11:13 AM
The file fet_ar.qm must be in the same directory as fet-cl.exe or translations/fet_ar.qm must be in the same directory as fet-cl.exe.
Title: Re: Can't Read Arabic message Return from FET CL
Post by: rasha5 on September 09, 2020, 01:16:50 PM
i am already have the "fet_ar.qm" in the "translations" folder and i tried to put it in the same directory folder with "fet-cl.exe" file
and then still get the "?? ?? ??" text ,
i will show you my code  here :
                string command = "--inputfile=\"D:\\TimeTable\\input\\Test3_data_and_timetable last.fet\" --outputdir=\"D:\\TimeTable\\output\" --language=ar";   
                string exec = @"C:\fet-5.46.1\fet-cl.exe";
                string retMessage = String.Empty;
                ProcessStartInfo startInfo = new ProcessStartInfo();
                Process p = new Process();

                startInfo.CreateNoWindow = true;
                startInfo.RedirectStandardOutput = true;
                startInfo.RedirectStandardInput = true;

                startInfo.UseShellExecute = false;
                startInfo.Arguments = command;
                startInfo.FileName = exec;
                p.StartInfo = startInfo;
                p.Start();

                using (StreamReader output = p.StandardOutput )
                {

                    retMessage = output.ReadToEnd();
                }

after this code the "retMessage" should give me the output and it shows in arabic somthing like this "?? ? ?? ?? ??" 
Title: Re: Can't Read Arabic message Return from FET CL
Post by: Liviu Lalescu on September 09, 2020, 02:04:04 PM
I'm sorry, but I think I cannot help you too much. I can only say that FET uses Unicode characters (UTF-8, I think). Try to make your script in Unicode as well.
Title: Re: Can't Read Arabic message Return from FET CL
Post by: Volker Dirr on September 09, 2020, 09:11:55 PM
maybe the terminal of your operating system doesn't support it?