On 12-02-2022 10:44, Patrick de Torcy wrote:
> You were right about my wrong version of Jaybird. I added the
> file jaybird-full-4.0.5.java8.jar in the lib folder (in the same folder
> than the old one firebirdsql-full.jar) and in my project Netbeans, I
> picked up the new jar. But it doesn't work. Anyway, it' more a Netbeans
> issue than a jaybird's one...
> For UNICODE_FSS, I used it because my database is an old firebird 2.5
> one, converted in the new format 4.0 using gbak...
> Do you think I can use UTF-8 instead, without no further modifications ?
Even with Firebird 2.5, UTF8 was the 'better' choice. UTF8 was
introduced in Firebird 1.5 as a replacement of UNICODE_FSS, while
UNICODE_FSS was introduced in InterBase 6.0 or earlier.
That said, unless you need to full range of Unicode characters, and
UNICODE_FSS worked fine for you before, continuing to use UNICODE_FSS
probably won't be that much of a problem.
The primary difference is that UNICODE_FSS is only max 3 bytes in
length, thus it can't support all Unicode characters, and it has some
additional restrictions on its character set (FSS stands for File System
Safe). Switching to UTF8 does come at a cost because it is max 4 bytes,
storage could increase by 1/3, and maximum length of fields is reduced
from 10922 to 8191.
In addition, I believe - based on a comment in the Firebird 1.5 release
notes - that Firebird doesn't check character length requirements of
UNICODE_FSS, only byte length requirements, which would make it possible
to have stored 32766 characters from the ASCII range in a VARCHAR(10922)
CHARACTER SET UNICODE_FSS (on the other hand, mechanisms in Jaybird
might prevent you from storing such values).