UNICODE command: Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
m (misc cleanup)
Line 1: Line 1:
<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>
<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&nbsp;204</var>.</p>


The <var>UNICODE</var> command is used to manage the Unicode tables,
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>.
which specify translations between EBCDIC and Unicode/ASCII &mdash; 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 have specified.
   
   
__TOC__
__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
Where:
<dl>
<dl>
<dt>subcommand
<dt>subcommand
Line 26: 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 40: Line 39:
substituted for a particular value in the command.
substituted for a particular value in the command.
   
   
The UNICODE command is available as of <var class="product">Sirius Mods</var> version 7.3.
For <var>UNICODE</var> examples and more information about Unicode support, see the [[Unicode]] page.
For UNICODE examples and
more information about Sirius Unicode support, see the [[Unicode]] page.


==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 53: Line 50:
</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 ''''Map'''' update subcommand in
[[#Update forms of UNICODE|"Update forms of UNICODE"]])
of the codepage specified by <i>name</i>.
of the codepage specified by <i>name</i>.
<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 ''''Trans'''' update subcommands in
(see the <var>Trans</var> update subcommands in
[[#Update forms of UNICODE|"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 ''''Table'''' and have the following format:
keyword <var>Table</var> and have the following format:
<p class="code">UNICODE Table Standard subcommand
<p class="syntax">UNICODE Table Standard <span class="term">subcommand</span>
</p>
</p>
   
   
The ''subcommand'' values are described below.
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 ''''UNICODE Display'''' (described in the previous section).
of <code>UNICODE Display</code> (described in the previous section). </li>
</ul>
</ul>
   
   
The ''subcommand'' values of the updating form of 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>Base Codepage name
Line 129: Line 129:
<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>M
<dt>Map E=h2 Is U=hex4
ap 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 150: Line 149:
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

Revision as of 23:29, 26 May 2016

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.

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.
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)
  • &amp; (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.