UniQueryUconvObject: Difference between revisions
Appearance
No edit summary |
mNo edit summary |
||
Line 3: | Line 3: | ||
=== Parameters === | === Parameters === | ||
; uconvObj - [[ | ; uconvObj - [[UconvObject]] - input : The conversion object created from [[UniCreateUconvObject]]. | ||
; uconvAttr - [[ | ; 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 [[ | ; uconvAttrLen - (size_t) - input : Size of the attribute item. It must be, at minimum, be the size of the [[uconv_attribute_t]] structure. | ||
; startingBytes - [[ | ; 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. | * 1 Single-byte character. | ||
* 2 Double-byte character. | * 2 Double-byte character. | ||
Line 16: | Line 16: | ||
* 1 Is used as a secondary character. | * 1 Is used as a secondary character. | ||
Note - some codepages may not set this flag correctly. | Note - some codepages may not set this flag correctly. | ||
; charRange - [[ | ; charRange - [[udcrange_t]] - output : Set of ranges of characters that is the user-defined character range. | ||
=== Constants === | === Constants === | ||
Line 25: | Line 25: | ||
* [[OS2 API:Unicode:error#ULS_BADOBJECT|ULS_BADOBJECT]] | * [[OS2 API:Unicode:error#ULS_BADOBJECT|ULS_BADOBJECT]] | ||
* [[OS2 API:Unicode:error#ULS_SUCCESS|ULS_SUCCESS]] | * [[OS2 API:Unicode:error#ULS_SUCCESS|ULS_SUCCESS]] | ||
=== Calling conversion === | === Calling conversion === | ||
Line 36: | Line 30: | ||
=== Example Code === | === Example Code === | ||
UconvObject uconvObj; | |||
uconv_attribute_t uconvAttr; | |||
size_t uconvAttrLen; | size_t uconvAttrLen; | ||
CHAR[256] startingBytes; | |||
CHAR[256] moreBytes; | |||
udcrange_t[32] charRange; | |||
integer rc; | integer rc; | ||
... | ... | ||
Line 48: | Line 42: | ||
=== Related Functions === | === Related Functions === | ||
[[ | *[[UniCreateUconvObject]] | ||
[[ | *[[UniFreeUconvObject]] | ||
[[ | *[[UniSetUconvObject]] | ||
=== Notes === | === Notes === | ||
This function queries the given conversion object for its attributes and characteristics. | 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. | 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 [[ | 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 [[ | The uconvAttr, startingBytes, moreBytes, or charRange parameters, when set to [[NULL]], will return no data. | ||
See [[ | 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 Version Introduced === | ||
OS/2 Warp | OS/2 Warp | ||
[[Category:Uni]] | |||
[[Category: |
Revision as of 04:35, 5 December 2016
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:
Calling conversion
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
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