Template:Chset-ctrl3

From HandWiki
Revision as of 15:26, 8 May 2019 by imported>Retro (Easy-to-read spacing.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


 

Template documentation[view] [edit] [history] [purge]


Note

This template replaces Template:chset-ctrl. Template:chset-ctrl4 is available to additionally display the code point in octal.

Usage

Used with Template:chset-tableformat to indicate a table cell for a control character or non-printing punctuation character.

  • Parameter 1: hhhh, Hexadecimal Unicode value, 4 digits (e.g., 0020)
  • Parameter 2: XX, Character name (e.g., SP), with link to appropriate article
  • Parameter 3: dd, Decimal character code, 1–3 digits (e.g., 32)

For example, the first four ASCII control characters (Unicode U+0000 thru U+0003, decimal 0 thru 3) are coded as rows in a character set table like this:

{|
|{{chset-color-ctrl}}|{{chset-ctrl3|0000|[[Null character|NUL]]|0}}
|{{chset-color-ctrl}}|{{chset-ctrl3|0001|[[Start of heading|SOH]]|1}}
|{{chset-color-ctrl}}|{{chset-ctrl3|0002|[[Start of text|STX]]|2}}
|{{chset-color-ctrl}}|{{chset-ctrl3|0003|[[End of text|ETX]]|3}}
|}

Which yields:

NUL
0000
0
SOH
0001
1
STX
0002
2
ETX
0003
3

Another example illustrates the coding for a few of the ISO/IEC non-printing punctuation characters:

{|
|{{chset-color-misc}}|{{chset-ctrl3|0020|[[Space (character)|SP]]|32}}
|{{chset-color-misc}}|{{chset-ctrl3|00A0|[[Non-breaking space|NBSP]]|160}}
|{{chset-color-ctrl}}|{{chset-ctrl3|00AD|[[Soft hyphen|SHY]]|173}}
|}

Which yields:

SP
0020
32
NBSP
00A0
160
SHY
00AD
173

Template:Chset-table-header/family-doc