Difference between revisions of "Template:GB18030/main"

From blackwiki
Jump to navigation Jump to search
imported>HarJIT
m (HarJIT moved page Template:Charmap/GB18030/main to Template:GB18030/main: move for general use outside of Charmap)
imported>HarJIT
Line 23: Line 23:
 
The next edition of GB 18030 might fully swap them, of course (à la the 2005 edition and ḿ),
 
The next edition of GB 18030 might fully swap them, of course (à la the 2005 edition and ḿ),
 
but it could also e.g. move the PUA codes to the sizeable reserved four-byte regions after
 
but it could also e.g. move the PUA codes to the sizeable reserved four-byte regions after
the BMP or after the SPUAB. So I'm merely clearing the encodings of the PUA codes in response
+
the BMP or after the SPUAB. So I'm merely clearing the encodings of those PUA codes in
to edition=newucs for the time being. -->
+
response to edition=newucs for the time being. -->
 
|40884={{#ifeq:{{{edition|}}}|newucs|FE 59|82 35 90 37}}
 
|40884={{#ifeq:{{{edition|}}}|newucs|FE 59|82 35 90 37}}
 
|40885={{#ifeq:{{{edition|}}}|newucs|FE 61|82 35 90 38}}
 
|40885={{#ifeq:{{{edition|}}}|newucs|FE 61|82 35 90 38}}
Line 76: Line 76:
 
   -->|{{hexadecimal|{{{1|128169}}}|no}}<!--
 
   -->|{{hexadecimal|{{{1|128169}}}|no}}<!--
 
   -->|{{#ifexpr:{{{1|128169}}} > 65535<!--
 
   -->|{{#ifexpr:{{{1|128169}}} > 65535<!--
     -->|{{Charmap/GB18030/astral|{{{1|128169}}} }}<!--
+
     -->|{{GB18030/astral|{{{1|128169}}} }}<!--
     -->|{{Charmap/GB18030/BMP|{{{1|128169}}} }}<!--
+
     -->|{{GB18030/BMP|{{{1|128169}}} }}<!--
 
   -->}}<!--
 
   -->}}<!--
 
-->}}
 
-->}}
 
}}<noinclude>{{documentation}}</noinclude>
 
}}<noinclude>{{documentation}}</noinclude>

Revision as of 08:06, 18 August 2020

94 39 DA 33

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

Contains the overriding logic of {{GB18030}}. Defines mappings for problem codes (those which differ between editions, or between implementations, or four-byte codes out of order resulting from this) itself. Handles ASCII characters itself. For other characters, invokes Template:GB18030/BMP or Template:GB18030/astral.

Usage

Takes one positional parameter: a Unicode code point in decimal. Outputs a GB 18030 byte sequence in hexadecimal, with bytes delimited by spaces.

Optional named parameters include gb1988 (a boolean controlling if ¥ is mapped to 0x24—if in doubt, leave this off) and edition (2000, 2005, web or newucs—defaulting to 2005).