Subject Re: need help writing a unicode collation
Author martinknappe
Would someone please have a look at my collation under

As you can see in lc_example.c, I initialised

cache->texttype_bytes_per_char = 1;

which I feel is actually wrong cause this is a unicode_fss collation
so it should be 3 right?
I tried 3 before, but that wouldn't work so I left 1 there standing
which works.
You can compile the driver with make gdsintl2.dll and then declare it
as a unicode_fss collation under collation id 250 (FIrebird 1.5)
But here's the catch: When I access this database with my
(unicode-enabled) delphi controls, the fields in the database are
found to be of type string (not widestring), virtually obliterating
the unicode functionality
(everything works fine when I use the code point order collation of
charset unicode_fss so I figure something must be wrong in my code,
but I can't see what (well beside the cache->texttype_bytes_per_char =

Please, if someone can help me out here, have a look at it; I really
need this collation thing done.


--- In, "martinknappe" <martin@...>
> hi all
> i really really need help getting this done; i've looked at it over
> and over again and i can't see what i'm doing wrong.
> i'm trying to write a custom unicode_fss collation for interbase 1.5
> i've followed the instructions under
> I do get the example compiled and running so I can see that it works
> in principle.
> Now what I did was modify the example source so that it compiles a
> unicode_fss instead of a win1252 collation.
> This modified source can be found under
> For anyone familiar with writing collations for interbase I hope it
> should be easy to see what I'm trying to do here. The functions in the
> collation itself (to_upper, to_key, etc) aren't yet implemented; I
> only wanted to see if I can get it the collation compiled and declared
> in my database).
> The lc_example.c file contains the texttype object I'm trying to create.
> The gdsintl2.dll file is generated with make gdsintl2.dll (maybe
> compiler path in the makefile has to be modified).
> Then I copied gdsintl2.dll into my firebird intl directory and made
> yet another copy of it to fbintl2.dll
> Next I ran test.sql, which creates a test database, defines several
> procedures, declares my new unicode collation and then tries to create
> a table which makes use of this new collation and that's where it all
> fails; the error message is:
> Error Message:
> ----------------------------------------
> Unsuccessful execution caused by a system error that precludes
> successful execution of subsequent statements.
> internal gds software consistency check (can't continue after bugcheck).
> Is there anyone who can help me please?
> Thanx,
> Martin