Cyrillic in odbc_prepare predicate

I’m using: SWI-Prolog version (threaded, 64 bits, version 8.0.3)

I’ve encountered a problem while transmitting parameters query containing cyrillic alphabet.

My odbc connection is set with odbc_set_connection(db,encoding(unicode)) because unicode is the only coding that works well with the Oracle odbc driver.

Here’s the code:
predicate_example(FIO) :- odbc_prepare(db,
‘INSERT INTO TABLE_NAME(FIO) VALUES (?)’,[atom>varchar(100)],
St), odbc_execute(St,[FIO]), odbc_free_statement(St).

When FIO contains only latin letters everything works just fine, but when FIO contains cyrillic I get this error:
ERROR: Type error: ‘atom’ expected, found ‘text containing кириллица here’ (an atom)

Any help would be appreciated!

Bit hard to tell what is going on. A first step might be calling ?- odbc_debug(2). (the arg is 0…9, where 0 disables debugging). Get the source and checkout packages/odbc/odbc.c where the messages come from. I think this should work in theory and I see no obvious omissions in the code. Hard to debug without an environment where this can be reproduced though. If you (can) run a self-compiled version, a debugger or some more print statements may help …