UniCreateUconvObject returns a conversion object that describes a UCS-2
conversion between the code page specified by cpname and UCS.
A conversion object remains valid until it is freed.
cpname is normally the Unicode string IBM- followed by the
decimal number of the code page. Other names may be used. UCONV tables are
kept in the \language\codepage directory on the boot drive.
If the cpname parameter contains an empty string, UniCreateUconvObject
creates a conversion object based upon the value of the process code page
setting.
UniCreateUconvObject allows modifiers to be concatenated onto cpname.
These modifiers change the default behavior of conversion objects. The caller
can concatenate the following modifiers onto cpname.
Modifiers are separated from the conversion object name by an at (@), and
multiple modifiers are separated by a comma (,).
displaymask
- map=cdra
Use IBM standard control conversion.
@map=crlf
CR and LF are
controls; others are glyphs.
@map=data
All
characters less than space are controls (default).
@map=display
All characters less than space are glyphs.
converttype
- path=no
When performing Unicode conversions
strings are assumed to contain non-path names. This setting is only applicable
when converting to or from DBCS code pages.
@path=yes
When performing Unicode conversions strings are
assumed to contain path names. This setting is only applicable when converting
to or from DBCS code pages (default).
endian
- endian=Both
If only one endian is given, it
applies to both source and target. The endian type can be one of the following:
big
little
Use little endian (default).
system
For
example:
@endian=little
@endian=Source:Target
Source
applies to UniUconvFromUcs. Target
applies to UniUconvToUcs. The endian
type can be one of the following:
big
little
Use little endian (default).
system
For
example:
@endian=big:system
options
- sub=yes
Perform substitutions when converting
to and from Unicode (default).
@sub=no
Do
not perform substitutions when converting to and from Unicode.
@sub=to-ucs
Only perform substitutions when converting to Unicode.
@sub=from-ucs
Only perform
substitutions when converting from Unicode.
@subchar=\xXX
Where XX is a hexadecimal number.
@subchar=\DD
Where DD is a decimal number. The substitution
character attribute specifies which character the conversion object should
use when there is no identical character for a given code element while
converting from Unicode.
@subuni=\xXX\xXX
Where XX is a hexadecimal number.
@subuni=\xXXXX
Where XXXX is a hexadecimal number.
The substitution character attribute specifies which character the conversion
object should use when there is no identical character for a given code
element while converting to Unicode.
Examples of typical usage include:
IBM-942@path=yes,map=display
This example creates a conversion object based on an IBM-942 encoding. When
conversions are performed, all strings are treated as path names and all
characters less than space are considered glyphs.
@path=yes,sub=no
This example creates a conversion object based on the current process code
page setting. When conversions are performed, all strings are treated as
path names and no substitutions are made.
IBM-850@path=no,sub=yes
This example creates a conversion object based on an IBM-850 encoding. When
conversions are performed, all strings are treated as non-path names. Substitutions
are made when converting to and from Unicode, if necessary.
UniCreateUconvObject returns a conversion object in uconv_object for
use in subsequent calls to either UniUconvFromUcs
or UniUconvToUcs.
[Back: UniCreateUconvObject - Parameters]
[Next: UniCreateUconvObject - Related Functions]