0

I'm having an issue with sorting strings that have special characters like ^ and ! in a Firebird database.

When using the TADTable component with the following settings and a table that uses collation unicode_ci_ai

CachedUpdates := false;
FetchOptions.Unidirectional := false;
FetchOptions.CursorKind := ckAutomatic;
FetchOptions.Mode := fmOnDemand;
FormatOptions.SortOptions := [soNoCase];

The server will put strings that start with ^ before strings that start with !, but TADTable does the opposite. This results in duplicates when bringing down the records.

I'm looking for best practice when sorting strings with special characters. I have to use TADTable (legacy system) and Live Data Window mode for speed.

Thank you.

cjmarques
  • 632
  • 1
  • 7
  • 17

1 Answers1

0

This is most likely to do with the database connections having different default character encoding. See Firebird Character Sets and Collations

Chris Reynolds
  • 5,453
  • 1
  • 15
  • 12
  • I'm sure it is a collation issue. I'm having trouble syncing the server and client collations. I've read the site you referenced a couple times and implemented it's suggestions to no avail. I guess I'm looking for some code samples or more insight into how this all works. – cjmarques Dec 02 '16 at 16:20