cancel
Showing results for 
Search instead for 
Did you mean: 

Use unicode text strings in scripts?

Highlighted
New Contributor

Use unicode text strings in scripts?

I am dealing with an application that is an add-in to PowerPoint.  I can copy/paste the different language text strings I need to validate in the PowerPoint fields just fine.  When I try to paste them in to a string statement in a keyword test the characters pasted are replaced by ???.  If I set the variable value in a script, the text input to the control is still ??? or blank spaces.  I have to do this same test with other language strings as well.  How to I tell TestComplete to just use the characters I am telling it to?  The application is still in English as is the Windows system.  I just want to put the string in to a field.  Is there any way of doing this without resorting to copy/paste?
5 REPLIES 5
Highlighted
Community Hero

RE: Use unicode text strings in scripts?

Your project needs to be set to use Unicode.



There is a setting in the project properties.



Project > Properties > General



And there are Unicode settings in there.



See also: http://support.smartbear.com/viewarticle/55219/



I got caught out by this a while back as well. 🙂
Highlighted
New Contributor

RE: Use unicode text strings in scripts?

That was set to Auto, even if I change it to UTF-16 my strings get converted back to ?? or spaces.
Highlighted
Contributor

RE: Use unicode text strings in scripts?

Maybe you are using the wrong coding type.



Read more in: Text Coding Type





Highlighted
New Contributor

RE: Use unicode text strings in scripts?

Certain things do work after following the document, but others don't, that's where it gets confusing.  Variables being set in a keyword test are still a problem, have to set those programmatically in a script instead.  If you can do a SetText on a control, no problem, if you have to do a Keys method, still problems.  Just working around this for the situations where SetText isn't available to use a copy/paste instead.  Ugly but it does work.



Add-ins to PowerPoint have all the PowerPoint issues and the PowerPoint controls are just not pretty in TestComplete, even after adding the UIAutomation to them.
Highlighted
Community Manager

RE: Use unicode text strings in scripts?


Hi Nadine,


 


Go through this article to try another approach.


 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors