Jump to content

UniQueryUconvObject

From EDM2
Revision as of 21:34, 1 November 2011 by Martini (talk | contribs)

UniQueryUconvObject

UniQueryUconvObject(uconvObj, uconvAttr, uconvAttrLen, startingBytes, moreBytes, charRange)
Queries the attributes of the conversion object.

Parameters

uconvObj - UconvObject - input
The conversion object created from UniCreateUconvObject.
uconvAttr - uconv_attribute_t - output
Receives the attribute information.
uconvAttrLen - (size_t) - input
Size of the attribute item. It must be, at minimum, be the size of the uconv_attribute_t structure.
startingBytes - CHAR - output
Get the array of beginning byte of a multi-byte character set. For some forms of stateful code pages, the length is based on state and not the returned table. If this parameter is NULL, no value is returned. Each byte has one of the following values:
  • 1 Single-byte character.
  • 2 Double-byte character.
  • 3 Triple-byte character.
  • 4 Quad-byte character.
  • 255 Invalid code point for this codepage.
moreBytes - CHAR - output
Array indicating the secondary byte is in a multi-byte sequence; used to allocate buffers. Values for bytes are:
  • 0 Not used as a secondary character.
  • 1 Is used as a secondary character.
  Note - some codepages may not set this flag correctly.
charRange - udcrange_t - output
Set of ranges of characters that is the user-defined character range.

Constants

None

Returns

An integer with value(s) of:

Module

Define (C/C++)

Export name/Ordinal

Calling conversion

Cdecl32

Example Code

UconvObject       uconvObj;
uconv_attribute_t uconvAttr;
size_t            uconvAttrLen;
CHAR[256]         startingBytes;
CHAR[256]         moreBytes;
udcrange_t[32]    charRange;
integer           rc;
...
rc = UniQueryUconvObject(uconvObj, uconvAttr, uconvAttrLen, startingBytes, moreBytes, charRange);
...

Related Functions

UniCreateUconvObject UniFreeUconvObject UniSetUconvObject

Notes

This function queries the given conversion object for its attributes and characteristics.

The substitution character attributes specify how to handle situations where there are no identical characters for a given element. This function can be used to query the substitution characters used by the conversion.

Some are static and bound by the conversion table; others can be set via UniSetUconvObject.

The uconvAttr, startingBytes, moreBytes, or charRange parameters, when set to NULL, will return no data.

See uconv_attribute_t for the conversion object attributes; it indicates which fields can be queried and which can be set via UniSetUconvObject.

OS Version Introduced

OS/2 Warp


Back to OS/2 API