Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tca2iso(3) — NEWS-os 4.2.1R

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ctype(3)

tca(7)

sendmail(8)

TCA2ISO(3)  —  NEWS-OS Programmer’s Manual

NAME

tca2iso, iso2tca − converts TCA codes to ISO 2022 codes and vice versa

SYNOPSIS

int tca2iso(code)
int code;

int iso2tca(code)
int code;

DESCRIPTION

TCA (Taiwan Computer Association) codes are 2-byte codes in the range 0x8130 through 0xfdfd.  The first byte is always from 0x81 to 0xfd, whereas the second byte is always from 0x30 to 0x39, 0x41 to 0x5a, 0x61 to 0x7a, or 0x80 to 0xfd. 

Under ISO 2022, any of the 94 x 94 character sets represented by codes in the range 0x2121 to 0x7e7e can be coded using escape sequences. 

tca2iso(code) classifies TCA codes into the following three categories and converts them to the corresponding ISO 2022 codes. 

TCA CodeCharacter SetISO Code
TCA-10x8130 - 0xaffd    0x000x2121 - 0x7e7e
TCA-20xb030 - 0xdefd    0x010x2121 - 0x7e7e
TCA-30xdf30 - 0xfdfd    0x020x2121 - 0x5e7e

The routine tca2iso returns (character set << 16 | ISO code) for TCA codes received. 

iso2tca is the inverse of tca2iso. 

NOTES

Under NEWS-OS 4.0, this ISO code is used for mail codes.  Some commands expect the escape sequence final characters (3/0, 3/1 or 3/15) to indicate TCA-1, TCA-2, or TCA-3, respectively: These character sets are specified as ESC $ ( 0, ESC $ ( 1, ESC # ( ?, respectively. 

SEE ALSO

ctype(3), tca(7) sendmail(8). 

NEWS-OSRelease 4.2.1R

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026