Jump to content

UniQueryUconvObject: Difference between revisions

From EDM2
No edit summary
Ak120 (talk | contribs)
mNo edit summary
Line 3: Line 3:


=== Parameters ===
=== Parameters ===
; uconvObj - [[OS2 API:DataType:UconvObject|UconvObject]] - input : The conversion object created from [[OS2_API:UniCreateUconvObject|UniCreateUconvObject]].
; uconvObj - [[UconvObject]] - input : The conversion object created from [[UniCreateUconvObject]].
; uconvAttr - [[OS2 API:DataType:uconv_attribute_t|uconv_attribute_t]] - output : Receives the attribute information.
; 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 [[OS2_API:DataType:uconv_attribute_t|uconv_attribute_t]] structure.
; uconvAttrLen - (size_t) - input : Size of the attribute item.  It must be, at minimum, be the size of the [[uconv_attribute_t]] structure.
; startingBytes - [[OS2 API:DataType:CHAR|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:
; 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 - [[OS2 API:DataType:udcrange_t|udcrange_t]] - output : Set of ranges of characters that is the user-defined character range.
; 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]]
=== Module ===
=== Define (C/C++) ===
=== Export name/Ordinal ===


=== Calling conversion ===
=== Calling conversion ===
Line 36: Line 30:


=== Example Code ===
=== Example Code ===
  [[OS2 API:DataType:UconvObject|UconvObject]]       uconvObj;
  UconvObject      uconvObj;
  [[OS2 API:DataType:uconv_attribute_t|uconv_attribute_t]] uconvAttr;
  uconv_attribute_t uconvAttr;
  size_t            uconvAttrLen;
  size_t            uconvAttrLen;
  [[OS2 API:DataType:CHAR|CHAR]][256]        startingBytes;
  CHAR[256]        startingBytes;
  [[OS2 API:DataType:CHAR|CHAR]][256]        moreBytes;
  CHAR[256]        moreBytes;
  [[OS2 API:DataType:udcrange_t|udcrange_t]][32]    charRange;
  udcrange_t[32]    charRange;
  integer          rc;
  integer          rc;
  ...
  ...
Line 48: Line 42:


=== Related Functions ===
=== Related Functions ===
[[OS2 API:UniCreateUconvObject|UniCreateUconvObject]]
*[[UniCreateUconvObject]]
[[OS2 API:UniFreeUconvObject|UniFreeUconvObject]]
*[[UniFreeUconvObject]]
[[OS2 API:UniSetUconvObject|UniSetUconvObject]]
*[[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. This function can be used to query the substitution characters used by the conversion.
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 [[OS2_API:UniSetUconvObject|UniSetUconvObject]].
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 [[OS2 API:Constant:NULL|NULL]], will return no data.
The uconvAttr, startingBytes, moreBytes, or charRange parameters, when set to [[NULL]], will return no data.


See [[OS2 API:DataType:uconv_attribute_t|uconv_attribute_t]] for the conversion object attributes; it indicates which fields can be queried and which can be set via [[OS2 API:UniSetUconvObject|UniSetUconvObject]].
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]]
[[OS2_API | Back to OS/2 API]]
 
 
[[Category:The OS/2 API Project]]

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

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

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