Alternatively, this will probably work as well, SQLAlchemy will pass it through to the client:
create_engine("oracle+cx_oracle://user:pass@dsn/?encoding=utf-8") will update the docs now. >>> e = >>> create_engine("oracle+cx_oracle://scott:tiger@oracle1120/?encoding=utf-8") >>> e.dialect.create_connect_args(e.url) ([], {'encoding': 'utf-8', 'dsn': 'oracle1120', 'password': 'tiger', 'user': 'scott'}) On Wed, May 6, 2020, at 8:43 AM, Mike Bayer wrote: > I see you are using an "encoding" on cx_Oracle connect(), which SQLAlchemy > does not use; this parameter appears to be added to cx_Oracle only recently. > > The standard way to set Oracle encodings is via the NLS_LANG environment > variable, please use this parameter when dealing with Oracle client libraries > and unicode. > > https://www.oracle.com/database/technologies/faq-nls-lang.html > > > On Wed, May 6, 2020, at 8:15 AM, Anno Nühm wrote: >> Engine object configuration >> * convert_unicode = False >> * cx_oracle_ver = (7, 3, 0) >> * driver = cx_oracle >> * encoding = UTF8 >> * nencoding = <attribute not available> >> >> >> -- >> SQLAlchemy - >> The Python SQL Toolkit and Object Relational Mapper >> >> http://www.sqlalchemy.org/ >> >> To post example code, please provide an MCVE: Minimal, Complete, and >> Verifiable Example. See http://stackoverflow.com/help/mcve for a full >> description. >> --- >> You received this message because you are subscribed to the Google Groups >> "sqlalchemy" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to sqlalchemy+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/sqlalchemy/5934e2d1-c55a-49e8-8ea0-96d284c645b2%40googlegroups.com >> >> <https://groups.google.com/d/msgid/sqlalchemy/5934e2d1-c55a-49e8-8ea0-96d284c645b2%40googlegroups.com?utm_medium=email&utm_source=footer>. > -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/05bed84a-afc7-40a4-9c90-62fc1213667b%40www.fastmail.com.