Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxDiacriticStringOptions Class

Stores global diacritic mark-related settings for string data comparison operations.

#Declaration

Delphi
TdxDiacriticStringOptions = class sealed(TObject)

#Remarks

A diacritic mark is a glyph added to a base letter. The majority of European languages uses diacritic marks to stress vowels and designate different sounds for the same base letter in an alphabet.

DevExpress data controllers and text field-based editors treat a base letter with different diacritic marks as different characters for all comparison operations that allow you to search, sort, and filter data. The TdxDiacriticStringOptions class implements global settings you can use to change this behavior.

Tip

We recommend that you configure string comparison settings in the initialization section of the main application as demonstrated in the code example below. If you need to change these settings while the application is running, refresh all data controllers to apply your changes.

#Main API Member

The list below outlines key members of the TdxDiacriticStringOptions class. These members allow you to change string data comparison behavior in relation to diacritic marks.

ComparisonMode
Allows you to switch between comparison modes.
NormalizationMode

Specifies the string normalization algorithm used for string comparison in diacritic-insensitive mode.

Tip

Use this property only if diacritic-insensitive string comparison yields incorrect results for the target language.

#Code Example: Customize Global Diacritic Mark Settings at Startup

The following code example configures global diacritic mark-related settings at application startup:

uses
  dxCore;
// ...
begin
  TdxDiacriticStringOptions.ComparisonMode := TdxDiacriticStringComparisonMode.Insensitive;
  TdxDiacriticStringOptions.NormalizationMode := TdxDiacriticStringNormalizationMode.System;
  // ...
  Application.Initialize;
  Application.MainFormOnTaskBar := True;
  Application.CreateForm(TMyForm, MyForm);
  Application.Run;
end.

#String Comparison Performance

Compared to the default string comparison mode, diacritic-insensitive string normalization and comparison algorithms are more time-consuming. We recommend that you use the default mode if the performance of string comparison operations is critical for your application.

#Limitations

Diacritic mark settings have no effect on server mode data controllers and the following lookup editors:

TcxExtLookupComboBox
An unbound lookup combo box editor that displays a data-aware Table or Banded Table grid View as its drop-down window.
TcxDBExtLookupComboBox
A data-aware lookup combo box editor that displays a data-aware Table or Banded Table grid View in its drop-down window.
TcxDBLookupComboBox
A data-aware lookup combo box editor.
TcxLookupComboBox
An unbound lookup combo box editor.

Tip

You can use database collation options instead of these global diacritic settings if you use Server Mode.

Available database collation options depend on the SQL server you use. Refer to the corresponding SQL server documentation for details (for example, Collation and Unicode Support in Microsoft SQL Server).

#Inheritance

TObject
TdxDiacriticStringOptions
See Also