FirebirdSQL / fdb

Firebird Driver for Python
https://www.firebirdsql.org/en/devel-python-driver/
Other
60 stars 26 forks source link

German Umlaute in Database path #104

Closed Tombo89 closed 2 years ago

Tombo89 commented 2 years ago

Hello,

I'm trying to connect to a database wich has a german "ü" in its path. I can't change the path of the database on the system. When i try to connect to the database it doesn't work.

the ü gets replaced with ü

`import fdb

con = fdb.connect( dsn='localhost/5145:C:/xxx/xxx/ü/xx/xx.FDB', user='SYSDBA', password='masterkey' )`

fdb.fbcore.DatabaseError: ('Error while connecting to database:\n- SQLCODE: -902\n- I/O error during "CreateFile (open)" operation for file "C:/xxx/xxx/ü/xx/xx.FDB"\n- Error while trying to open file

if i copy the database to a path without ü it works, but this is not a option for my project.

I tried so much different things but can't get it working.

pcisar commented 2 years ago

Did you try utf8params parameter for connect() and dsn in utf8?

Tombo89 commented 2 years ago

Hello,

this is awkward, I've read this section of the readme many times yesturday but must have missed this parameter. I set utf8params=True and it works.

Thanks for the hint :)