Jump to content

UniStrToUcs

From EDM2
Revision as of 17:38, 15 September 2006 by Daniel.lee.kruse (talk | contribs) (major IBM documentation mistakes)

UniStrToUcs

UniStrToUcs(uconvObj, ucsBuffer, inBuffer, ucsBufferLen)
Convert a code page string to a UCS string.

Parameters

uconvObj - UconvObject - input
The conversion object created from UniCreateUconvObject.
ucsBuffer - UniChar - output
The ucs buffer.
inBuffer - (character) - input
The input buffer that is null terminated.
ucsBufferLen - (integer) - input
Number of unicode character elements in the ucsBuffer.

Constants

None

Returns

An integer with values of:

Module

Define (C/C++)

Export name/Ordinal

Calling conversion

Cdecl32

Example Code

UconvObject uconvObj;
UniChar     ucsBuffer;
void**      inBuffer;
integer     ucsBufferLen;
integer     rc;
...
rc = UniStrToUcs(uconvObj, ucsBuffer, inBuffer, ucsBufferLen);
...

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