String and Text both support a "collation" option to set the encoding of the parameter:
collation
Optional, a column-level collation for use in DDL and CAST expressions. Renders using the COLLATE keyword supported by SQLite, MySQL, and PostgreSQL. E.g.:
from sqlalchemy import cast, select, String
>>> print(select([cast('some string', String(collation='utf8'))]))
SELECT CAST(:param_1 AS VARCHAR COLLATE utf8) AS anon_1
We could allow users to specify a CCSID here, eg.
from sqlalchemy import cast, select, String
>>> print(select([cast('some string', String(10, collation=37))]))
SELECT CAST(:param_1 AS VARCHAR(10) CCSID 37) AS anon_1
I think we target this for a future version.
String and Text both support a "collation" option to set the encoding of the parameter:
We could allow users to specify a CCSID here, eg.
I think we target this for a future version.