Subject | Re: Problems with IB_IncSearch and German Umlauts |
---|---|
Author | Dieter Tremel |
Post date | 2001-10-09T11:10:50Z |
--- In IBObjects@y..., "Dieter Tremel" <tremel@t...> wrote:
The problem is even more complex, because ISO8859_1 with Collation
DE_DE does also not do a good job. It ignores (or orders) blanks in
strings so that there are unexpected results and the IncSearch again
needs correction. For Instance DE_DE orders
Haupt Anna
Haupt Doris
Hauptmann Berta
Hauptmann Klaus
Haupt Norbert
Haupt Paul
which is very strange for my users. The IncSearch can handle this
only if you set the following custom compare functions with
NORM_IGNORESYMBOLS at the connection:
function TDataModuleDB.DBDataCustomCompareStr(IB_Field: TIB_Column;
const S1, S2: String): Integer;
begin
Result := CompareString(LOCALE_USER_DEFAULT, NORM_IGNORESYMBOLS,
PChar(S1),
Length(S1), PChar(S2), Length(S2)) - 2;
end;
function TDataModuleDB.DBDataCustomCompareText(IB_Field: TIB_Column;
const S1, S2: String): Integer;
begin
Result := CompareString(LOCALE_USER_DEFAULT, NORM_IGNORECASE +
NORM_IGNORESYMBOLS, PChar(S1),
Length(S1), PChar(S2), Length(S2)) - 2;
end;
I fear I have to go back to WIN1252 again. It looks like Interbase
has no really satisfying collation order for german users. Any other
experiences to this topic?
Dieter Tremel
> My workaround was to go to ISO8859_1 with Collation DE_DE whichJust to inform other german IB users:
> corresponds to AnsiCompareStr and all is OK, but it is not easy to
> transform all customers databases.
The problem is even more complex, because ISO8859_1 with Collation
DE_DE does also not do a good job. It ignores (or orders) blanks in
strings so that there are unexpected results and the IncSearch again
needs correction. For Instance DE_DE orders
Haupt Anna
Haupt Doris
Hauptmann Berta
Hauptmann Klaus
Haupt Norbert
Haupt Paul
which is very strange for my users. The IncSearch can handle this
only if you set the following custom compare functions with
NORM_IGNORESYMBOLS at the connection:
function TDataModuleDB.DBDataCustomCompareStr(IB_Field: TIB_Column;
const S1, S2: String): Integer;
begin
Result := CompareString(LOCALE_USER_DEFAULT, NORM_IGNORESYMBOLS,
PChar(S1),
Length(S1), PChar(S2), Length(S2)) - 2;
end;
function TDataModuleDB.DBDataCustomCompareText(IB_Field: TIB_Column;
const S1, S2: String): Integer;
begin
Result := CompareString(LOCALE_USER_DEFAULT, NORM_IGNORECASE +
NORM_IGNORESYMBOLS, PChar(S1),
Length(S1), PChar(S2), Length(S2)) - 2;
end;
I fear I have to go back to WIN1252 again. It looks like Interbase
has no really satisfying collation order for german users. Any other
experiences to this topic?
Dieter Tremel