ImageGear for C and C++ on Windows v19.7 - Updated
IG_REC_filterplus_set
API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Language Settings Functions > IG_REC_filterplus_set

Specifies a set of individual characters, the FilterPlus characters.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_filterplus_set(
   LPCWSTR pFilterPlus
);

Arguments:

Name Type Description
pFilterPlus LPCWSTR Pointer to a UNICODE string containing the FilterPlus characters to be set. (The string is terminated with a double zero.)

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

This function does not process image pixels.

Remarks:

The FilterPlus characters broaden or define the filtered set of characters globally or on a per-zone basis. To validate these FilterPlus characters, the zone's filter field should have the IG_REC_FILTER_PLUS value enabled, with or without other filter elements.

  1. When characters to be added are contained in the ANSI (1252) Code Page, they can be defined in the pFilterPlus string with a wide-character-string literal, L"characters". Characters outside the ANSI (1252) Code Page can be converted one after the other with the IG_REC_util_codepage_to_unicode() utility. This converts a single character code from the current single-byte Code Page value (IG_REC_output_codepage_set()) to its UNICODE representation.
  2. To broaden the Character Set by the defined characters, the filter value needed in the zone structure is:

    IG_REC_FILTER_ALL | IG_REC_FILTER_PLUS.
  3. To add characters to a filtered language environment, IG_REC_FILTER_PLUS should be binary ORed with the other filter values. The FilterPlus characters are added after the effect of the other filter elements. For example, to validate only letters and digits and the filter plus characters (with the punctuation and miscellaneous character categories disabled), the needed value is:

    IG_REC_FILTER_ALPHA | IG_REC_FILTER_DIGIT | IG_REC_FILTER_PLUS
  4. To validate only the FilterPlus characters, IG_REC_FILTER_PLUS must be the only filter element in the zone structure field. This disables even the letters validated by the language selection.

Example:

 
Copy Code
AT_ERRCOUNT ErrCount = 0;
enumIGRecChrFilter eFilter = {IG_REC_FILTER_ALPHA | IG_REC_FILTER_DIGIT | IG_REC_FILTER_PLUS};
ErrCount += IG_REC_default_filter_set(eFilter);
ErrCount += IG_REC_filterplus_set(L"-|+=");