cmd将英语以外的语言转换为垃圾语言

时间:2015-06-24 10:00:44

标签: c# cmd

我正在创建一个基于uiautomator的应用程序,其中应用程序根据文本触摸对象。 我用Java编写了uiautomator方法,并制作了一个C#应用程序,询问用过的文本。我正在使用cmd / adb来执行uiautomator命令。

当我将手机语言更改为英语以外的其他语言时,问题就出现了。 Cmd / adb用???替换文本(用其他语言)。它将它传递给uiautomator。 有没有办法让cmd理解另一种语言?

C#代码

            Process procToExecute = new Process();
            procToExecute.StartInfo.FileName = "adb.exe";                
            procToExecute.StartInfo.Arguments = strCommand;                 
            procToExecute.StartInfo.CreateNoWindow = true;
            procToExecute.StartInfo.UseShellExecute = false;
            procToExecute.StartInfo.RedirectStandardOutput = true;
            procToExecute.StartInfo.RedirectStandardInput = true;
            Thread.Sleep(1500);
            procToExecute.Start();
            procToExecute.WaitForExit();

其中strCommand对于其他语言看起来像这样

adb shell uiautomator runtest UiAutomatorTest.jar -c com.lge.uiautomatorTest.UiAutomatorClass#UiEnterText -e edit संदेश%दर्ज%करें -e text को

并且它在cmd上显示如下

adb shell uiautomator runtest UiAutomatorTest.jar -c com.lge.uiautomatorTest.UiAutomatorClass#UiEnterText -e edit ?????%????%???? -e text ??

0 个答案:

没有答案
相关问题