Template:Unichar/gc: Difference between revisions
Richardpruen (talk | contribs) m (1 revision imported: Wikipedia article on Nicotine templates needed) |
Richardpruen (talk | contribs) m (1 revision imported) |
||
(One intermediate revision by one other user not shown) | |||
Line 23: | Line 23: | ||
-->}} }} }} }} }} }} }} }} }}<!-- | -->}} }} }} }} }} }} }} }} }}<!-- | ||
-->|<!--in planes 1-16, not 0 | -->|<!--in planes 1-16, not 0 | ||
-->{{#switch: {{ | -->{{#switch: {{#invoke:ustring|sub|{{{hval|}}}|-4}}<!-- | ||
-->| FFFE | FFFF = Cn <!--hhFFFE hhFFFF Not-a-character | -->| FFFE | FFFF = Cn <!--hhFFFE hhFFFF Not-a-character | ||
-->| {{#ifexpr: ((983040<={{{1}}}) and ({{{1}}}<=1114111))<!-- | -->| {{#ifexpr: ((983040<={{{1}}}) and ({{{1}}}<=1114111))<!-- |
Latest revision as of 14:53, 2 January 2022
<#not a Unicode code point#>
Usage
Returns Unicode General Category (gc) Cc Cf Cn Cs Zl Zp Zs <blank>
for special code points (like <control>, space characters, formatting characters). When regular gc like Letter, Symbol, Mark, or Punctuation, it returns a blank.
Parameters
This is a subtemplate, so parameters may have tight requirements. Input: (unnamed)
{{Unichar/gc
|1= <!--decimal value of the code point-->
}}
The code point value is required as a decimal value, because we are using the #ifexpr:
numerical calculations.
For five Arabic number markings U+0600..U+0603 and U+60DD, it returns Cf (visible)
. While Cf formatting characters usually have no glyph, these five have. By adding the "(visible)" text, these characters are shown (while regular Cf characters are hidden).
See also
See main template {{unichar}} for full documentation.