When the Integration Service runs in ASCII mode, it passes data to the Custom transformation procedure in ASCII. When the Integration Service runs in Unicode mode, it passes data to the procedure in UCS-2.
Use the INFA_CTChangeStringMode() and INFA_CTSetDataCodePageID() functions in the Custom transformation procedure code to request the data in a different format or in a different code page.
The functions you can use depend on the data movement mode of the Integration Service:
ASCII mode.
Use the INFA_CTChangeStringMode() function to request the data in UCS-2. When you use this function, the procedure must pass only ASCII characters in UCS-2 format to the Integration Service. You cannot use the INFA_CTSetDataCodePageID() function to change the code page when the Integration Service runs in ASCII mode.
Unicode mode.
Use the INFA_CTChangeStringMode() function to request the data in MBCS (multi-byte character set). When the procedure requests the data in MBCS, the Integration Service passes data in the Integration Service code page. Use the INFA_CTSetDataCodePageID() function to request the data in a different code page from the Integration Service code page. The code page you specify in the INFA_CTSetDataCodePageID() function must be two-way compatible with the Integration Service code page.
You can also use the INFA_CTRebindInputDataType() function to change the format for a specific port in the Custom transformation.