ICU 76.1 76.1
Loading...
Searching...
No Matches
Macros
uconfig.h File Reference

User-configurable settings. More...

Go to the source code of this file.

Macros

#define U_DEBUG   0
 If this switch is defined, ICU will attempt to load a header file named "uconfig_local.h" prior to determining default settings for uconfig variables.
 
#define UCLN_NO_AUTO_CLEANUP   1
 Determines whether to enable auto cleanup of libraries.
 
#define U_DISABLE_RENAMING   0
 Determines whether to disable renaming or not.
 
#define U_NO_DEFAULT_INCLUDE_UTF_HEADERS   0
 Determines whether utypes.h includes utf.h, utf8.h, utf16.h and utf_old.h.
 
#define U_OVERRIDE_CXX_ALLOCATION   1
 Determines whether to override new and delete.
 
#define U_ENABLE_TRACING   0
 Determines whether to enable tracing.
 
#define UCONFIG_ENABLE_PLUGINS   0
 Determines whether to enable ICU plugins.
 
#define U_ENABLE_DYLOAD   1
 Whether to enable Dynamic loading in ICU.
 
#define U_CHECK_DYLOAD   1
 Whether to test Dynamic loading as an OS capability.
 
#define U_DEFAULT_SHOW_DRAFT   1
 Do we allow ICU users to use the draft APIs by default?
 
#define U_HAVE_LIB_SUFFIX   1
 1 if a custom library suffix is set.
 
#define U_LIB_SUFFIX_C_NAME_STRING   ""
 Defines the library suffix as a string with C syntax.
 
#define UCONFIG_ONLY_COLLATION   0
 This switch turns off modules that are not needed for collation.
 
#define UCONFIG_NO_FILE_IO   0
 This switch turns off all file access in the common library where file access is only used for data loading.
 
#define UCONFIG_NO_CONVERSION   0
 ICU will not completely build (compiling the tools fails) with this switch turned on.
 
#define UCONFIG_ONLY_HTML_CONVERSION   0
 This switch turns off all of the converters NOT listed in the HTML encoding standard: http://www.w3.org/TR/encoding/#names-and-labels.
 
#define UCONFIG_NO_LEGACY_CONVERSION   0
 This switch turns off all converters except for.
 
#define UCONFIG_NO_NORMALIZATION   0
 This switch turns off normalization.
 
#define UCONFIG_USE_ML_PHRASE_BREAKING   0
 This switch turns on BudouX ML phrase-based line breaking, rather than using the dictionary.
 
#define UCONFIG_NO_BREAK_ITERATION   0
 This switch turns off break iteration.
 
#define UCONFIG_NO_IDNA   0
 This switch turns off IDNA.
 
#define UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE   UMSGPAT_APOS_DOUBLE_OPTIONAL
 Determines the default UMessagePatternApostropheMode.
 
#define UCONFIG_USE_WINDOWS_LCID_MAPPING_API   1
 On platforms where U_PLATFORM_HAS_WIN32_API is true, this switch determines if the Windows platform APIs are used for LCID<->Locale Name conversions.
 
#define UCONFIG_NO_COLLATION   0
 This switch turns off collation and collation-based string search.
 
#define UCONFIG_NO_FORMATTING   0
 This switch turns off formatting and calendar/timezone services.
 
#define UCONFIG_NO_MF2   0
 This switch turns off the experimental MessageFormat 2.0 API.
 
#define UCONFIG_NO_TRANSLITERATION   0
 This switch turns off transliteration.
 
#define UCONFIG_NO_REGULAR_EXPRESSIONS   0
 This switch turns off regular expressions.
 
#define UCONFIG_NO_SERVICE   0
 This switch turns off service registration.
 
#define UCONFIG_HAVE_PARSEALLINPUT   1
 This switch turns on the "parse all input" attribute.
 
#define UCONFIG_NO_FILTERED_BREAK_ITERATION   0
 This switch turns off filtered break iteration code.
 

Detailed Description

User-configurable settings.

Miscellaneous switches:

A number of macros affect a variety of minor aspects of ICU. Most of them used to be defined elsewhere (e.g., in utypes.h or platform.h) and moved here to make them easier to find.

Switches for excluding parts of ICU library code modules:

Changing these macros allows building partial, smaller libraries for special purposes. By default, all modules are built. The switches are fairly coarse, controlling large modules. Basic services cannot be turned off.

Building with any of these options does not guarantee that the ICU build process will completely work. It is recommended that the ICU libraries and data be built using the normal build. At that time you should remove the data used by those services. After building the ICU data library, you should rebuild the ICU libraries with these switches customized to your needs.

Stable:
ICU 2.4

Definition in file uconfig.h.

Macro Definition Documentation

◆ U_CHECK_DYLOAD

#define U_CHECK_DYLOAD   1

Whether to test Dynamic loading as an OS capability.

Internal:
Do not use. This API is for internal use only.

Definition at line 163 of file uconfig.h.

◆ U_DEBUG

#define U_DEBUG   0

If this switch is defined, ICU will attempt to load a header file named "uconfig_local.h" prior to determining default settings for uconfig variables.

Internal:
Do not use. This API is for internal use only. ICU 4.0

Determines whether to include debugging code. Automatically set on Windows, but most compilers do not have related predefined macros.

Internal:
Do not use. This API is for internal use only.

Definition at line 75 of file uconfig.h.

◆ U_DEFAULT_SHOW_DRAFT

#define U_DEFAULT_SHOW_DRAFT   1

Do we allow ICU users to use the draft APIs by default?

Internal:
Do not use. This API is for internal use only.

Definition at line 172 of file uconfig.h.

◆ U_DISABLE_RENAMING

#define U_DISABLE_RENAMING   0

Determines whether to disable renaming or not.

Internal:
Do not use. This API is for internal use only.

Definition at line 92 of file uconfig.h.

◆ U_ENABLE_DYLOAD

#define U_ENABLE_DYLOAD   1

Whether to enable Dynamic loading in ICU.

Internal:
Do not use. This API is for internal use only.

Definition at line 154 of file uconfig.h.

◆ U_ENABLE_TRACING

#define U_ENABLE_TRACING   0

Determines whether to enable tracing.

Internal:
Do not use. This API is for internal use only.

Definition at line 136 of file uconfig.h.

◆ U_HAVE_LIB_SUFFIX

#define U_HAVE_LIB_SUFFIX   1

1 if a custom library suffix is set.

Internal:
Do not use. This API is for internal use only.

Definition at line 187 of file uconfig.h.

◆ U_LIB_SUFFIX_C_NAME_STRING

#define U_LIB_SUFFIX_C_NAME_STRING   ""

Defines the library suffix as a string with C syntax.

Internal:
Do not use. This API is for internal use only.

Definition at line 201 of file uconfig.h.

◆ U_NO_DEFAULT_INCLUDE_UTF_HEADERS

#define U_NO_DEFAULT_INCLUDE_UTF_HEADERS   0

Determines whether utypes.h includes utf.h, utf8.h, utf16.h and utf_old.h.

utypes.h includes those headers if this macro is defined to 0. Otherwise, each those headers must be included explicitly when using one of their macros. Defaults to 0 for backward compatibility, except inside ICU.

Stable:
ICU 49

Definition at line 110 of file uconfig.h.

◆ U_OVERRIDE_CXX_ALLOCATION

#define U_OVERRIDE_CXX_ALLOCATION   1

Determines whether to override new and delete.

ICU is normally built such that all of its C++ classes, via their UMemory base, override operators new and delete to use its internal, customizable, non-exception-throwing memory allocation functions. (Default value 1 for this macro.)

This is especially important when the application and its libraries use multiple heaps. For example, on Windows, this allows the ICU DLL to be used by applications that statically link the C Runtime library.

Stable:
ICU 2.2

Definition at line 127 of file uconfig.h.

◆ UCLN_NO_AUTO_CLEANUP

#define UCLN_NO_AUTO_CLEANUP   1

Determines whether to enable auto cleanup of libraries.

Internal:
Do not use. This API is for internal use only.

Definition at line 83 of file uconfig.h.

◆ UCONFIG_ENABLE_PLUGINS

#define UCONFIG_ENABLE_PLUGINS   0

Determines whether to enable ICU plugins.

Internal:
Do not use. This API is for internal use only.

Definition at line 145 of file uconfig.h.

◆ UCONFIG_HAVE_PARSEALLINPUT

#define UCONFIG_HAVE_PARSEALLINPUT   1

This switch turns on the "parse all input" attribute.

Binary incompatible.

Internal:
Do not use. This API is for internal use only.

Definition at line 464 of file uconfig.h.

◆ UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE

#define UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE   UMSGPAT_APOS_DOUBLE_OPTIONAL

Determines the default UMessagePatternApostropheMode.

See the documentation for that enum.

Stable:
ICU 4.8

Definition at line 379 of file uconfig.h.

◆ UCONFIG_NO_BREAK_ITERATION

#define UCONFIG_NO_BREAK_ITERATION   0

This switch turns off break iteration.

Stable:
ICU 2.4

Definition at line 358 of file uconfig.h.

◆ UCONFIG_NO_COLLATION

#define UCONFIG_NO_COLLATION   0

This switch turns off collation and collation-based string search.

Stable:
ICU 2.4

Definition at line 403 of file uconfig.h.

◆ UCONFIG_NO_CONVERSION

#define UCONFIG_NO_CONVERSION   0

ICU will not completely build (compiling the tools fails) with this switch turned on.

This switch turns off all converters.

You may want to use this together with U_CHARSET_IS_UTF8 defined to 1 in utypes.h if char* strings in your environment are always in UTF-8.

Stable:
ICU 3.2
See also
U_CHARSET_IS_UTF8

Definition at line 276 of file uconfig.h.

◆ UCONFIG_NO_FILE_IO

#define UCONFIG_NO_FILE_IO   0

This switch turns off all file access in the common library where file access is only used for data loading.

ICU data must then be provided in the form of a data DLL (or with an equivalent way to link to the data residing in an executable, as in building a combined library with both the common library's code and the data), or via udata_setCommonData(). Application data must be provided via udata_setAppData() or by using "open" functions that take pointers to data, for example ucol_openBinary().

File access is not used at all in the i18n library.

File access cannot be turned off for the icuio library or for the ICU test suites and ICU tools.

Stable:
ICU 3.6

Definition at line 256 of file uconfig.h.

◆ UCONFIG_NO_FILTERED_BREAK_ITERATION

#define UCONFIG_NO_FILTERED_BREAK_ITERATION   0

This switch turns off filtered break iteration code.

Internal:
Do not use. This API is for internal use only.

Definition at line 474 of file uconfig.h.

◆ UCONFIG_NO_FORMATTING

#define UCONFIG_NO_FORMATTING   0

This switch turns off formatting and calendar/timezone services.

Stable:
ICU 2.4

Definition at line 413 of file uconfig.h.

◆ UCONFIG_NO_IDNA

#define UCONFIG_NO_IDNA   0

This switch turns off IDNA.

Stable:
ICU 2.6

Definition at line 368 of file uconfig.h.

◆ UCONFIG_NO_LEGACY_CONVERSION

#define UCONFIG_NO_LEGACY_CONVERSION   0

This switch turns off all converters except for.

  • Unicode charsets (UTF-7/8/16/32, CESU-8, SCSU, BOCU-1)
  • US-ASCII
  • ISO-8859-1

Turning off legacy conversion is not possible on EBCDIC platforms because they need ibm-37 or ibm-1047 default converters.

Stable:
ICU 2.4

Definition at line 311 of file uconfig.h.

◆ UCONFIG_NO_MF2

#define UCONFIG_NO_MF2   0

This switch turns off the experimental MessageFormat 2.0 API.

Internal:
Do not use. This API is for internal use only. ICU 75 technology preview
Deprecated:
This API is for technology preview only.

Definition at line 424 of file uconfig.h.

◆ UCONFIG_NO_NORMALIZATION

#define UCONFIG_NO_NORMALIZATION   0

This switch turns off normalization.

It implies turning off several other services as well, for example collation and IDNA.

Stable:
ICU 2.6

Definition at line 323 of file uconfig.h.

◆ UCONFIG_NO_REGULAR_EXPRESSIONS

#define UCONFIG_NO_REGULAR_EXPRESSIONS   0

This switch turns off regular expressions.

Stable:
ICU 2.4

Definition at line 444 of file uconfig.h.

◆ UCONFIG_NO_SERVICE

#define UCONFIG_NO_SERVICE   0

This switch turns off service registration.

Stable:
ICU 3.2

Definition at line 454 of file uconfig.h.

◆ UCONFIG_NO_TRANSLITERATION

#define UCONFIG_NO_TRANSLITERATION   0

This switch turns off transliteration.

Stable:
ICU 2.4

Definition at line 434 of file uconfig.h.

◆ UCONFIG_ONLY_COLLATION

#define UCONFIG_ONLY_COLLATION   0

This switch turns off modules that are not needed for collation.

It does not turn off legacy conversion because that is necessary for ICU to work on EBCDIC platforms (for the default converter). If you want "only collation" and do not build for EBCDIC, then you can define UCONFIG_NO_CONVERSION or UCONFIG_NO_LEGACY_CONVERSION to 1 as well.

Stable:
ICU 2.4

Definition at line 218 of file uconfig.h.

◆ UCONFIG_ONLY_HTML_CONVERSION

#define UCONFIG_ONLY_HTML_CONVERSION   0

This switch turns off all of the converters NOT listed in the HTML encoding standard: http://www.w3.org/TR/encoding/#names-and-labels.

This is not possible on EBCDIC platforms because they need ibm-37 or ibm-1047 default converters.

Stable:
ICU 55

Definition at line 295 of file uconfig.h.

◆ UCONFIG_USE_ML_PHRASE_BREAKING

#define UCONFIG_USE_ML_PHRASE_BREAKING   0

This switch turns on BudouX ML phrase-based line breaking, rather than using the dictionary.

Internal:
Do not use. This API is for internal use only.

Definition at line 333 of file uconfig.h.

◆ UCONFIG_USE_WINDOWS_LCID_MAPPING_API

#define UCONFIG_USE_WINDOWS_LCID_MAPPING_API   1

On platforms where U_PLATFORM_HAS_WIN32_API is true, this switch determines if the Windows platform APIs are used for LCID<->Locale Name conversions.

Otherwise, only the built-in ICU tables are used.

Internal:
Do not use. This API is for internal use only. ICU 64

Definition at line 391 of file uconfig.h.