Escaping reserved characters in database URL

20 views
Skip to first unread message

Silvio

unread,
Apr 6, 2020, 4:43:37 AM4/6/20
to H2 Database
I am running into issues with database files that are created with file paths based on user input. One example has a path with a directory in it that has a ; in it's name. Connecting to the database fails for obvious reasons. Is there a way to encode such paths to prevent issues like this?

Noel Grandin

unread,
Apr 6, 2020, 5:01:54 AM4/6/20
to H2 Database
No, we have no encoding for stuff inside a "jdbc:h2:" URL. If you really really need this, you could create a custom filesystem extension using org.h2.store.fs.FilePath and then invent your own encoding.
Reply all
Reply to author
Forward
0 new messages