ImageGear Professional v18.4 > API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Utility Functions > IG_REC_util_unicode_to_codepage_length_get |
Gets the length the Unicode character will require if converted into the current code page.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_REC_util_unicode_to_codepage_length_get( AT_WCHAR Unicode, LPAT_INT lpCodepageLength ); |
Name | Type | Description |
Unicode | AT_WCHAR | Character code to be converted. |
lpCodepageLength | LPAT_INT | Address of a variable to receive the number of bytes needed for the converted character. |
This function does not process image pixels.
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); |
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.