UniSetUconvObject: 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]] - input : The conversion object attributes. | ||
==== options ==== | ==== options ==== | ||
; options : Substitution options can be: | ; options : Substitution options can be: | ||
* [[ | * [[UCONV#UCONV_OPTION_SUBSTITUTION_BOTH|UCONV_OPTION_SUBSTITUTION_BOTH]] | ||
* [[ | * [[UCONV#UCONV_OPTION_SUBSTITUTION_FROM_UNICODE|UCONV_OPTION_SUBSTITUTION_FROM_UNICODE]] | ||
* [[ | * [[UCONV#UCONV_OPTION_SUBSTITUTION_TO_UNICODE|UCONV_OPTION_SUBSTITUTION_TO_UNICODE]] | ||
; endian : Source and target endian. Source applies to [[ | ; endian : Source and target endian. Source applies to [[UniUconvFromUcs]]; target applies to [[OS2 API:UniUconvToUcs|UniUconvToUcs]]. | ||
* 0x000 Use system endian. | * 0x000 Use system endian. | ||
* 0xfeff Use big endian. | * 0xfeff Use big endian. | ||
Line 35: | Line 36: | ||
; state : When set to 0, the conversion object is put into its base conversion state. | ; state : When set to 0, the conversion object is put into its base conversion state. | ||
=== Returns === | === Returns === | ||
Line 46: | Line 44: | ||
* [[OS2 API:Unicode:error#ULS_BADATTR|ULS_BADATTR]] | * [[OS2 API:Unicode:error#ULS_BADATTR|ULS_BADATTR]] | ||
* [[OS2 API:Unicode:error#ULS_SUCCESS|ULS_SUCCESS]] | * [[OS2 API:Unicode:error#ULS_SUCCESS|ULS_SUCCESS]] | ||
=== Calling conversion === | === Calling conversion === | ||
Line 57: | Line 49: | ||
=== Example Code === | === Example Code === | ||
UconvObject uconvObj; | |||
uconv_attribute_t uconvAttr; | |||
integer rc; | integer rc; | ||
... | ... | ||
Line 65: | Line 57: | ||
=== Related Functions === | === Related Functions === | ||
[[ | *[[UniCreateUconvObject]] | ||
[[ | *[[UniFreeUconvObject]] | ||
[[ | *[[UniQueryUconvObject]] | ||
=== Notes === | === Notes === | ||
'''UniSetUconvObject''' sets the attributes of the conversion object. The given attributes are used to modify the default conversion. It is left up to each conversion to decide which attributes it will recognize. | |||
The substitution character attribute specifies to the conversion object what to do when this is no identical character for a given code element. | The substitution character attribute specifies to the conversion object what to do when this is no identical character for a given code element. | ||
Line 77: | Line 69: | ||
OS/2 Warp | OS/2 Warp | ||
[[Category:Uni]] | |||
[[Category: |
Revision as of 21:17, 4 December 2016
UniSetUconvObject
- UniSetUconvObject(uconvObj, uconvAttr)
- Set the attributes of a conversion object.
Parameters
- uconvObj - UconvObject - input
- The conversion object created from UniCreateUconvObject.
- uconvAttr - uconv_attribute_t - input
- The conversion object attributes.
options
- options
- Substitution options can be:
- UCONV_OPTION_SUBSTITUTION_BOTH
- UCONV_OPTION_SUBSTITUTION_FROM_UNICODE
- UCONV_OPTION_SUBSTITUTION_TO_UNICODE
- endian
- Source and target endian. Source applies to UniUconvFromUcs; target applies to UniUconvToUcs.
- 0x000 Use system endian.
- 0xfeff Use big endian.
- 0xffff Use little endian.
- displaymask
- 32 bit display and data mask. Each bit represents a control character below space (1<<char). The bit being a zero the character represents a glyph. The bit being one the character represents a control.
- converttype
- Conversion flags which can be ORed together.
- subchar_len
- Code page substitution length whose value is from 1 to and including 13. A value of 0 the substitution character from the conversion table should be used.
- subchar
- Substitution bytes.
- subuni_len
- Unicode substitution length whose value can be 0 or 1. A value of 0 the Unicode substitution should come from the conversion table.
- subuni
- If subuni_len is 1, the first element is the Unicode substitution character.
- state
- When set to 0, the conversion object is put into its base conversion state.
Returns
An integer with values of:
Calling conversion
Example Code
UconvObject uconvObj; uconv_attribute_t uconvAttr; integer rc; ... rc = UniSetUconvObject(uconvObj, uconvAttr); ...
Related Functions
Notes
UniSetUconvObject sets the attributes of the conversion object. The given attributes are used to modify the default conversion. It is left up to each conversion to decide which attributes it will recognize.
The substitution character attribute specifies to the conversion object what to do when this is no identical character for a given code element.
OS Version Introduced
OS/2 Warp