On 15-03-2021 11:45, Ertan Küçükoglu wrote:
> It would be great if it is possible to use an existing database and do
> UTF8 conversion on it without any need to create and copy over data to a
> new database file. As above script seems to be doing something like that.
>
> I also appreciate any advice for such a conversion.
That linked script performs direct system table manipulation, which is
discouraged in 2.5 and earlier, and no longer possible in Firebird 3.
It is not really possible to change the character set of a column (and
the script shown can result in index issues and potentially conversion
issues).
If you want to change the character set, there are really only two options:
1. Create a new database with the same structure but updated character
set for the columns and pump the data over
2. Create a new column with the right character set, assign values from
old to new column, drop old column, rename new column (and all
associated fixes necessary for dependencies).
Usually option 2 is a lot more work than option 1, unless there are just
a few columns involved with few dependencies.
Mark
--
Mark Rotteveel