I'm making a uiautomator based application where the app touches the objects based on text. I've written the uiautomator methods in Java and have made a C# app which asks the used which text to touch. I'm using cmd/adb to execute the uiautomator commands.
The problem comes when I change the phone language to something other than English. Cmd/adb replaces the text (in other language) with ???. It passes the same to uiautomator. Is there a way I can make cmd understand the other language?
C# code
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();
where strCommand looks like this for other languages
adb shell uiautomator runtest UiAutomatorTest.jar -c com.lge.uiautomatorTest.UiAutomatorClass#UiEnterText -e edit संदेश%दर्ज%करें -e text को
and it shows like this on cmd
adb shell uiautomator runtest UiAutomatorTest.jar -c com.lge.uiautomatorTest.UiAutomatorClass#UiEnterText -e edit ?????%????%???? -e text ??