CHAR_ENCODE_CONVERT

Encoding type conversion callback function.

Callback Function Definition

typedef int(CALLBACK *CHAR_ENCODE_CONVERT)(
  char        *pInput,
  DWORD       dwInputLen,
  DWORD       dwInEncodeType, 
  char        *pOutput,
  DWORD       dwOutputLen, 
  DWORD       dwOutEncodeType
);

Parameters

pInput

[IN] Input string, whose memory and size is applied and provided by the third-party platform

dwInputLen

[IN] Input buffer size.

dwInEncodeType

[IN] Encoding types of input string: 0-no encoding information, 1-GB2312 (Simplified Chinese), 2-GBK, 3-BIG5 (Traditional Chinese), 4-Shift_JIS (Japanese), 5-EUC-KR (Korean), 6-UTF-8, 7-ISO8859-1, 8-ISO8859-2, 9-ISO8859-3, ..., 21-ISO8859-15 (Western Europe).

pOutput

[OUT] Output string, whose memory is applied by the third-party platform.

dwOutputLen

[OUT] Output buffer size.

dwOutEncodeType

[OUT] Encoding tupes of output string: 0-no encoding information, 1-GB2312 (Simplified Chinese), 2-GBK, 3-BIG5 (Traditional Chinese), 4-Shift_JIS (Japanese), 5-EUC-KR (Korean), 6-UTF-8, 7-ISO8859-1, 8-ISO8859-2, 9-ISO8859-3, ..., 21-ISO8859-15 (Western Europe).

Return Values

Return -1 for failure, and return 0 for success.