Subject Automatic encoding value (jdbc:xxxx?encoding=auto)?
Author mailmur
I have a Firebird2 database with default UTF8 encoding for all string
columns. All is fine if clients know adding "encoding=UTF8" url
parameter before creating a connection.

But if some of the clients don't use it then application cannot
display values properly.

I have created a (very) simple query tool to test it:

url with encoding:

url without encoding:

This is so common mistake clients make and it varies per database what
to use if not all databases are UTF8 enabled. I have (tried)
programmed all programs as "point-to-point unicode/UTF8" applications.

Is it technically possible to make it all automatic, Java jdbc drivers
after all should give just unicodes due to java IS unicode already.
Or to have a special url parameter "encoding=auto" and client would
decide what to use based on a database default charset.

Probably most people use same encoding within a database and don't
change it per column.

Java clients should only give url

If that breaks old applications then using a new encoding value
and expect to receive proper results.