On 22-04-2023 00:13, 'Jonathan Boarman' via firebird-java wrote:
> Perhaps the UTF-8 could be one of those breaking changes in v6.
Given using UTF8 reduces the maximum size of CHAR and VARCHAR by 3/4,
and the fact changing the default is a great way to break or logically
corrupt existing database using columns with character set NONE, that is
not going to happen. And as long as you use explicit character sets for
your columns, NONE generally works fine, and will allow you to mix
character sets. With connection character set NONE, Jaybird will only
use the JVM default character set when the column character set is also
NONE.
In Jaybird 3, not specifying an explicit character set was not allowed
in 3.0.0 and 3.0.1. My original idea was to then switch to UTF8 as the
default in Jaybird 4 or 5 (so people relying on the default of NONE had
time to switch to explicitly specifying it as the connection character).
However, given my experience (e.g. the questions/complaints) when using
no explicit character set was not allowed with version 3.0.0 and 3.0.1,
a lot of users don't read release notes (nor do they read error
messages; or I'm bad at writing them). Hence the change in Jaybird 3.0.2
to only register a SQLWarning on the connection and log a warning. I
might be a fan of breaking changes, but introducing such an extreme
breaking change like switching to UTF8 (or any other character set) as a
default connection character set is simply not going to happen,
especially given the risks of logical corruption of databases of people
who upgrade to major versions without reading release notes.
I even removed the warning in Jaybird 5, because indeed people either
ignore warnings, or they even complain about warnings instead of fixing
the cause of the warning.
TL;DR: NONE will remain the default.
Mark
--
Mark Rotteveel