UNICODE command: Difference between revisions
mNo edit summary |
|||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<p class="note"><b>Note:</b> This is a <var class="product">[[Sirius Mods]]</var>-only command prior to | <p class="note"><b>Note:</b> This is a <var class="product">[[Sirius Mods]]</var>-only command prior to version 7.5 of <var class="product">Model 204</var>.</p> | ||
The <var>UNICODE</var> command is used to manage the Unicode tables, | |||
which specify translations between EBCDIC and Unicode/ASCII — a key facet of the [[Unicode|Unicode feature]] of <var class="product">Model 204</var>. | |||
The command also lets you | The command also lets you | ||
replace individual Unicode characters by designated character strings, | replace individual Unicode characters by designated character strings, | ||
and it has varied options for displaying translation table codepages | and it has varied options for displaying translation table codepages | ||
and code point mappings, as well as displaying any translation customizations | and code point mappings, as well as displaying any translation customizations you specified. | ||
you | |||
__TOC__ | |||
==Syntax== | ==Syntax== | ||
The general form of the UNICODE command is: | The general form of the <var>UNICODE</var> command is: | ||
<p class="syntax">UNICODE subcommand operands </p> | <p class="syntax">UNICODE <span class="term">subcommand operands</span> </p> | ||
Where: | |||
<dl> | <dl> | ||
<dt>subcommand | <dt>subcommand | ||
Line 23: | Line 25: | ||
</dl> | </dl> | ||
The UNICODE subcommands are described below in separate sections according | The <var>UNICODE</var> subcommands are described below in separate sections according | ||
to type (display or update). | to type (display or update). | ||
Only the [[#Update forms of UNICODE|update forms]] | Only the [[#Update forms of UNICODE|update forms]] | ||
of UNICODE require System Administrator (or User 0) privileges. | of <var>UNICODE</var> require System Administrator (or User 0) privileges. | ||
Subcommand and operand keywords of the UNICODE command may be entered in any | Subcommand and operand keywords of the <var>UNICODE</var> command may be entered in any | ||
combination of uppercase or lowercase letters. | combination of uppercase or lowercase letters. | ||
The term <code>UNICODE</code> that starts the | The term <code>UNICODE</code> that starts the | ||
Line 37: | Line 39: | ||
substituted for a particular value in the command. | substituted for a particular value in the command. | ||
For <var>UNICODE</var> examples and more information about Unicode support, see the [[Unicode]] page. | |||
more information about | ==Common command:UNICODE Table Standard Base Codepage xxxx== | ||
One common choice made by a customer is which Unicode codepage to use for their Model 204 onlines. This is achieved by a form of the <var>UNICODE</var> command that specifies the <var>[[#baseCpg|Base Codepage]]</var>. | |||
===Default Base Codepage shipped with Model 204: 1047=== | |||
If the <var>UNICODE Table Standard Base Codepage</var> <i>xxxx</i> command has not been specified in the online, the codpage used is 1047. | |||
==Display forms of UNICODE== | ==Display forms of UNICODE== | ||
The UNICODE subcommands that produce information displays are described below. | The <var>UNICODE</var> subcommands that produce information displays are described below. | ||
In the descriptions: | In the descriptions: | ||
<ul> | <ul> | ||
Line 50: | Line 55: | ||
</ul> | </ul> | ||
The display forms of the UNICODE command are: | The display forms of the <var>UNICODE</var> command are: | ||
<dl> | <dl> | ||
<dt>UNICODE List Codepages | <dt>UNICODE List Codepages | ||
<dd>Obtains a list of all codepages. | <dd>Obtains a list of all codepages. | ||
<dt>UNICODE Difference Codepages name1 And name2 [Range E=h2 To E=h2] | <dt>UNICODE Difference Codepages name1 And name2 [Range E=h2 To E=h2] | ||
<dd>Obtains a list of the differences | <dd>Obtains a list of the differences | ||
between two codepages for the EBCDIC range specified. | between two codepages for the EBCDIC range specified. | ||
The default range is 00 to FF. | The default range is 00 to FF. | ||
<dt>UNICODE Difference Xtab name1 And Codepage name2 [Range E=h2 To E=h2] | <dt>UNICODE Difference Xtab name1 And Codepage name2 [Range E=h2 To E=h2] | ||
<dd>Obtains a list of the differences | <dd>Obtains a list of the differences | ||
between a JANUS XTAB table and a codepage for the EBCDIC range specified. | between a JANUS XTAB table and a codepage for the EBCDIC range specified. | ||
The default range is 00 to FF. | The default range is 00 to FF. | ||
<dt>UNICODE Display Codepage name | <dt>UNICODE Display Codepage name | ||
<dd>Obtains, in commented form, the | <dd>Obtains, in commented form, the maps (see the <var>Map</var> update subcommand in [[#Update forms of UNICODE|Update forms of UNICODE]]) | ||
maps (see the | of the codepage specified by <i>name</i>. | ||
[[#Update forms of UNICODE| | |||
of the specified | |||
<dt>UNICODE Display Table Standard | <dt>UNICODE Display Table Standard | ||
<dd>Obtains, in command form, a display of any | <dd>Obtains, in command form, a display of any | ||
current replacements and current maps and/or translations | current replacements and current maps and/or translations | ||
(see the | (see the <var>Trans</var> update subcommands in | ||
[[#Update forms of UNICODE| | [[#Update forms of UNICODE|Update forms of UNICODE]]) | ||
that differ from the base. | that differ from the base. | ||
</dl> | </dl> | ||
==Update forms of UNICODE== | ==Update forms of UNICODE== | ||
The updating forms of the UNICODE command begin with the | The updating forms of the <var>UNICODE</var> command begin with the | ||
keyword | keyword <var>Table</var> and have the following format: | ||
<p class=" | <p class="syntax">UNICODE Table Standard <span class="term">subcommand</span> | ||
</p> | </p> | ||
The | The <var class="term">subcommand</var> values are described below. | ||
For the updating subcommands: | For the updating subcommands: | ||
<ul> | <ul> | ||
<li>The user must be a System Administrator (or user 0). | <li>The user must be a System Administrator (or user 0). </li> | ||
<li>These commands should only be invoked during <var class="product">Model 204</var> initialization, | <li>These commands should only be invoked during <var class="product">Model 204</var> initialization, | ||
because other users running at the same time as the change may | because other users running at the same time as the change may | ||
obtain inconsistent results, including the results | obtain inconsistent results, including the results | ||
of | of <code>UNICODE Display</code> (described in the previous section). </li> | ||
</ul> | </ul> | ||
The | The <var class="term">subcommand</var> values of the updating form of the | ||
UNICODE command follow: | <var>UNICODE</var> command follow: | ||
<dl> | <dl> | ||
<dt>Base Codepage name | <dt id="baseCpg">Base Codepage name | ||
<dd>Replace the current translation tables with those derived from the | <dd>Replace the current translation tables with those derived from the | ||
named codepage. | named codepage. | ||
<p>If the <var>UNICODE Table Standard Base Codepage</var> <i>xxxx</i> command has not been specified in the online, the codpage used is 1047.</p> | |||
<dt>Trans E=h2 To U=hex4 | <dt>Trans E=h2 To U=hex4 | ||
Line 126: | Line 135: | ||
<dd>Remove any customized translation or mapping specified from all | <dd>Remove any customized translation or mapping specified from all | ||
Unicode and EBCDIC points. | Unicode and EBCDIC points. | ||
<dt> | <dt>Map E=h2 Is U=hex4 | ||
<dd>Specify mapping from EBCDIC point ''h2'' to Unicode point | <dd>Specify mapping from EBCDIC point ''h2'' to Unicode point | ||
''hex4'', and from Unicode point ''hex4'' to EBCDIC point ''h2''. | ''hex4'', and from Unicode point ''hex4'' to EBCDIC point ''h2''. | ||
Line 147: | Line 155: | ||
127 characters. | 127 characters. | ||
No character in the replacement string | No character in the replacement string | ||
may be the <code>U=hex4</code> value in any Rep subcommand. | may be the <code>U=hex4</code> value in any <var>Rep</var> subcommand. | ||
<dt>Norep U=hex4 | <dt>Norep U=hex4 | ||
Line 155: | Line 163: | ||
<dd>Specify that there is no replacement string for any Unicode point. | <dd>Specify that there is no replacement string for any Unicode point. | ||
</dl> | </dl> | ||
==Use of codepages in the CharacterToUnicodeMap class== | |||
In addition to establishing the standard codepage using the <code>UNICODE Table Standard Base Codepage <i>name</i></code> command, any of the codepages may be used to establish a <var>[[CharacterToUnicodeMap class|CharacterToUnicodeMap]]</var> object, using the <var>[[NewFromEbcdicCodepage (CharacterToUnicodeMap function)|NewFromEbcdicCodepage]]</var> function. | |||
[[Category:System administrator commands]] | [[Category:System administrator commands]] | ||
[[Category:Commands]] | [[Category:Commands]] |
Latest revision as of 14:02, 3 December 2018
Note: This is a Sirius Mods-only command prior to version 7.5 of Model 204.
The UNICODE command is used to manage the Unicode tables, which specify translations between EBCDIC and Unicode/ASCII — a key facet of the Unicode feature of Model 204.
The command also lets you replace individual Unicode characters by designated character strings, and it has varied options for displaying translation table codepages and code point mappings, as well as displaying any translation customizations you specified.
Syntax
The general form of the UNICODE command is:
UNICODE subcommand operands
Where:
- subcommand
- A term that indicates which operation is being performed. List, Difference, and Display are subcommands that only produce an information display; Table produces a character translation update.
- operands
- The operands specific to the operation.
The UNICODE subcommands are described below in separate sections according to type (display or update). Only the update forms of UNICODE require System Administrator (or User 0) privileges.
Subcommand and operand keywords of the UNICODE command may be entered in any
combination of uppercase or lowercase letters.
The term UNICODE
that starts the
command must be entered entirely in uppercase letters.
The command descriptions that follow use an initial capital letter to indicate a keyword, and they use all-lowercase letters to indicate a term that is substituted for a particular value in the command.
For UNICODE examples and more information about Unicode support, see the Unicode page.
Common command:UNICODE Table Standard Base Codepage xxxx
One common choice made by a customer is which Unicode codepage to use for their Model 204 onlines. This is achieved by a form of the UNICODE command that specifies the Base Codepage.
Default Base Codepage shipped with Model 204: 1047
If the UNICODE Table Standard Base Codepage xxxx command has not been specified in the online, the codpage used is 1047.
Display forms of UNICODE
The UNICODE subcommands that produce information displays are described below. In the descriptions:
- h2 is two hexadecimal digits.
- hex4 is four hexadecimal digits, excluding FFFE, FFFF, and the surrogate areas (D800 through and including DFFF).
The display forms of the UNICODE command are:
- UNICODE List Codepages
- Obtains a list of all codepages.
- UNICODE Difference Codepages name1 And name2 [Range E=h2 To E=h2]
- Obtains a list of the differences between two codepages for the EBCDIC range specified. The default range is 00 to FF.
- UNICODE Difference Xtab name1 And Codepage name2 [Range E=h2 To E=h2]
- Obtains a list of the differences between a JANUS XTAB table and a codepage for the EBCDIC range specified. The default range is 00 to FF.
- UNICODE Display Codepage name
- Obtains, in commented form, the maps (see the Map update subcommand in Update forms of UNICODE) of the codepage specified by name.
- UNICODE Display Table Standard
- Obtains, in command form, a display of any current replacements and current maps and/or translations (see the Trans update subcommands in Update forms of UNICODE) that differ from the base.
Update forms of UNICODE
The updating forms of the UNICODE command begin with the keyword Table and have the following format:
UNICODE Table Standard subcommand
The subcommand values are described below.
For the updating subcommands:
- The user must be a System Administrator (or user 0).
- These commands should only be invoked during Model 204 initialization,
because other users running at the same time as the change may
obtain inconsistent results, including the results
of
UNICODE Display
(described in the previous section).
The subcommand values of the updating form of the UNICODE command follow:
- Base Codepage name
- Replace the current translation tables with those derived from the
named codepage.
If the UNICODE Table Standard Base Codepage xxxx command has not been specified in the online, the codpage used is 1047.
- Trans E=h2 To U=hex4
- Specify one-way translation from EBCDIC point h2 to Unicode point hex4.
- Trans E=h2 Invalid
- Specify that the given EBCDIC point is not translatable to Unicode.
- Trans E=h2 Base
- Remove any customized translation or mapping specified for the given EBCDIC point, thus returning to the base codepage translation for the point.
- Trans U=hex4 To E=h2
- Specify one-way translation from Unicode point hex4 to EBCDIC point h2.
- Trans U=hex4 Invalid
- Specify that the given Unicode point is not translatable to EBCDIC.
- Trans U=hex4 Base
- Remove any customized translation or mapping specified for the given Unicode point, thus returning to the base codepage translation for the point.
- Trans All Base
- Remove any customized translation or mapping specified from all Unicode and EBCDIC points.
- Map E=h2 Is U=hex4
- Specify mapping from EBCDIC point h2 to Unicode point hex4, and from Unicode point hex4 to EBCDIC point h2.
- Map U=hex4 Is E=h2
- Same as 'Map E=h2 Is U=hex4'.
- Rep U=hex4 'str'
- Specify replacement for Unicode point hex4 by the Unicode
string str.
str may be a series of the following:
- Non-ampersand EBCDIC characters (which must be translatable to Unicode)
&
(for an ampersand)- A character reference of the form
&#xhhhh;
The length of the resulting Unicode replacement string is limited to 127 characters. No character in the replacement string may be the
U=hex4
value in any Rep subcommand. - Norep U=hex4
- Specify that there is no replacement string for Unicode point hex4.
- Norep All
- Specify that there is no replacement string for any Unicode point.
Use of codepages in the CharacterToUnicodeMap class
In addition to establishing the standard codepage using the UNICODE Table Standard Base Codepage name
command, any of the codepages may be used to establish a CharacterToUnicodeMap object, using the NewFromEbcdicCodepage function.