$LangUst: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (misc cleanup)
No edit summary
 
Line 8: Line 8:
Where:</p>
Where:</p>
<ul>
<ul>
<li>The <var class="term">string</var> argument is a literal enclosed in quotation marks, or it is a %variable containing the data in collating sequence to be translated back to its original form.</li>
<li>The <var class="term">string</var> argument is a literal enclosed in quotation marks, or it is a %variable containing the data in a collating sequence to be translated back to its original form.</li>


<li>The optional <var class="term">language</var> argument is the name of one of the defined languages, specifying which collating sequence to use. The <var class="term">language</var> argument is handled as follows:
<li>The optional <var class="term">language</var> argument is the name of one of the defined languages, specifying which collating sequence to use. The <var class="term">language</var> argument is handled as follows:
Line 16: Line 16:
<li>An asterisk enclosed in quotation marks (<tt>'*'</tt>) instructs <var class="product">Model&nbsp;204</var> to use the value of the <var>LANGUSER</var> parameter.</li>
<li>An asterisk enclosed in quotation marks (<tt>'*'</tt>) instructs <var class="product">Model&nbsp;204</var> to use the value of the <var>LANGUSER</var> parameter.</li>


<li>If you omit the <var class="term">language</var> argument, <var class="product">Model&nbsp;204</var> performs the validation in U.S. English, even if the value of the <var>LANGUSER</var> parameter is not <code>US</code>, and lowercase characters are not recognized.</li>
<li>If you omit the <var class="term">language</var> argument, <var class="product">Model&nbsp;204</var> performs the validation in U.S. English (even if the value of the <var>LANGUSER</var> parameter is not <code>US</code>) and lowercase characters are not recognized.</li>
</ul></li>
</ul></li>
</ul>
</ul>
<p class="note"><b>Note:</b> If encoding information was truncated, either during <var>$LangSrt</var> processing or during subsequent expression evaluation, then the <var>$LangUstT</var> function does not return the exact string that was originally translated by the <var>$LangSrt</var> processing. Truncated variant characters are returned as the associated base character, for example, &Agrave; is returned as A.</p>
<p class="note"><b>Note:</b> If encoding information was truncated, either during <var>$LangSrt</var> processing or during subsequent expression evaluation, then the <var>$LangUst</var> function does not return the exact string that was originally translated by the <var>$LangSrt</var> processing. Truncated variant characters are returned as the associated base character; for example, &Agrave; is returned as A.</p>


==Example==
==Example==

Latest revision as of 23:13, 8 March 2016

The $LangUst function translates back to its original form a string previously translated by $LangSrt processing, which is useful for applications that maintain sorted arrays of data and need to display the values.

Syntax

$LangUst('string'[,language])

Where:

  • The string argument is a literal enclosed in quotation marks, or it is a %variable containing the data in a collating sequence to be translated back to its original form.
  • The optional language argument is the name of one of the defined languages, specifying which collating sequence to use. The language argument is handled as follows:
    • You can enter the name of a valid language enclosed in quotation marks or a %variable containing a valid language. If the value you enter is not supported, the request is canceled with an error message. See the LANGUSER parameter for the valid values.
    • An asterisk enclosed in quotation marks ('*') instructs Model 204 to use the value of the LANGUSER parameter.
    • If you omit the language argument, Model 204 performs the validation in U.S. English (even if the value of the LANGUSER parameter is not US) and lowercase characters are not recognized.

Note: If encoding information was truncated, either during $LangSrt processing or during subsequent expression evaluation, then the $LangUst function does not return the exact string that was originally translated by the $LangSrt processing. Truncated variant characters are returned as the associated base character; for example, À is returned as A.

Example

If your site maintains two types of terminals and keyboards that store and display the same character set, individual characters might be assigned differing hexadecimal codes on different keyboards. You can translate the character equivalents back and forth as follows:

$LANGUST($LANGSRT(string, source-language), target-language)

A character without an equivalent converts to its base character. A special character without an equivalent converts to a space.