Issues with Spanish special characters


I have some problems with the readBlocking function.

I have a script where I read the tooltip from a tag, the tooltip has the Spanish character 'ñ'.

when using the readBlocking function. the result is as expected. the text displays fine.

but when reading only the value. the text is no longer displayed correctly.

To explain better, I put a screenshot of my code.
as shown, I add the qualified value to the list, then add just the value.
the qualified value is displayed fine but the value is not.

It isn't wrong. You are seeing the repr() form instead of the unicode() form from jython's object print. It is a side-effect of print. Are you actually seeing the wrong character when that value is assigned to a component property?

when I assign the value to a property of a component it looks good but when I insert values into a database table they get inserted wrong.

That usually means the database hasn't been configured for unicode correctly. Assuming you are passing the strings to the DB via named query value parameters or via scripted "Prep" DB calls with question mark parameters.

However, if you are using curly braces to inject strings into a query, then it is unfixable. If you are assembling a scripted query with string substitution, it probably isn't fixable either.

the database was set to unicode, and to insert the data it used a Named Query, I just used.

I am now using runPrepQuery and the data is inserted correctly.
thank you