UniStrToUcs: Difference between revisions
m corrected typos |
m removed INCL_; appears to be not used |
||
Line 31: | Line 31: | ||
=== Define (C/C++) === | === Define (C/C++) === | ||
=== Export name/Ordinal === | === Export name/Ordinal === |
Revision as of 06:08, 19 April 2006
UniStrToUcs
- UniStrToUcs(uconvObj, inBuffer, inBufferLen, ucsBuffer, ucsBufferLen, nonIdenticalConv)
Convert a code page string to a UCS string.
Parameters
- uconvObj - UconvObject - input
The conversion object created from UniCreateUconvObject.
- inBuffer - (void **) - input
The input buffer.
- inBufferLen - (size_t *) - input/output
The input buffer's length, in bytes.
- ucsBuffer - UniChar - output
The ucs buffer.
- ucsBufferLen - (size_t *) - output
Number of unicode character elements in the ucsBuffer.
- nonIdenticalConv - (size_t *) - output
Number of non-identical conversions.
Constants
None
Returns
An integer with values of:
Module
Define (C/C++)
Export name/Ordinal
Calling conversion
Example Code
UconvObject uconvObj; void** inBuffer; size_t* inBufferLen; UniChar ucsBuffer; size_t* ucsBufferLen; size_t* nonIdenticalConv; integer rc; ... rc = UniStrToUcs(uconvObj, inBuffer, inBufferLen, ucsBuffer, ucsBufferLen, nonIdenticalConv); ...
Related Functions
UniUconvFromUcs UniUconvToUcs UniStrFromUcs
Notes
The sequence of the code page characters in inBuffer is converted into a sequence of Unicode characters in ucsBuffer. The code page was set by UniCreateUnconvObject call in the UconvObject.
Conversion is only on bytes that convert. The process stops converting on the first non-valid byte. If the ucsBuffer isn't large enough, conversion ends on the byte previous to any buffer overflow. inBuffer is updated truncating the point of failure to the end and updating the ucsBufferLen to indicate the number of successfully converted elements.
OS Version Introduced
OS/2 Warp