ImageGear Professional DLL v17.1 for Windows Accusoft
IG_REC_util_unicode_to_codepage_length_get
Send Feedback  
ImageGear Professional DLL v17.1 for Windows > API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Utility Functions > IG_REC_util_unicode_to_codepage_length_get

Glossary Item Box

Gets the length the Unicode character will require if converted into the current code page.

Declaration:

  Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_util_unicode_to_codepage_length_get(
   AT_WCHAR Unicode,
   LPAT_INT lpCodepageLength
);

Arguments:

Unicode Character code to be converted.
lpCodepageLength Address of a variable to receive the number of bytes needed for the converted character.

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 current Code Page can be changed by a previous IG_REC_output_codepage_set function call. The converted character can be retrieved with the IG_REC_util_unicode_to_codepage function call.

Example:

  Copy Code
AT_ERRCOUNT ErrCount = 0;
HIGEAR higImage = 0;
HIG_REC_IMAGE higRecImage = 0;
AT_INT iActualLen = 0;

ErrCount += IG_load_file("Image.tif", &higImage);
ErrCount += IG_REC_image_import(higImage, &higRecImage);
ErrCount += IG_REC_image_recognize(higRecImage);

ErrCount += IG_REC_output_codepage_set("Windows ANSI");
ErrCount += IG_REC_util_unicode_to_codepage_length_get(L'�', &iActualLen);
//...

ErrCount += IG_REC_image_delete(higRecImage);
ErrCount += IG_image_delete(higImage);

©2012. Accusoft Corporation. All Rights Reserved.