runPrepUpdate with ciryllic caraters

When I make this request, I have that ‘???’ in the database MySql

system.db.runPrepUpdate("INSERT INTO translate (e,r) VALUES (?,?)",['AIR','воздух'])

Any idea ? thanks.

Ok, we are tracking this here and I am showing that this has been fixed for Ignition version 7.6.4

In addition to the fix on our end, I think you’re also going to need to use python’s unicode string syntax:

system.db.runPrepUpdate("INSERT INTO translate (e,r) VALUES (?,?)",['AIR',u'воздух'])

Note the ‘u’ before the quotes for the string containing unicode characters. You might try this out on the current release just in case that’s all that was needed.

I had already tried with the ‘u’, the problem is the same.
I use 7.5.10 lts. correction also applies to this version?

Yes, this will be back ported to 7.5

We’re still working on the issue. Some parts are fixed, some aren’t.

Fixed in 7.5.11 and 7.6.4:
[ul][li]* Binding unicode to component properties[/li][li]* Unicode output in message boxes[/li][li]* Unicode output to console in Linux[/li][/ul]

Still working on:
[ul][li]* runPrepUpdate[/li][li]* output to console in Windows[/li][/ul]

Great thanks !

In MySQL, runPrepUpdate works with non-Latin characters. You just need to fix your connection URL.

Go to the Gateway, and under Configure -> Databases -> Connections -> Connection URL add ?useUnicode=yes&characterEncoding=UTF-8 to the end of your connection URL

It work in 7.5 and with URL connection modified.
Perfect !