Module:Unicode data/doc explained

Usage

This module provides functions that access information on Unicode code points. The information is retrieved from data modules generated from the Unicode Character Database, or derived by rules given in the Unicode Specification. It and its submodules were copied from English Wiktionary and then modified; see there for more information.

Parameters and functions

code point

The code point is to be entered as hexadecimal value. For example, :

<nowiki>{{#invoke:Unicode data|lookup|name|0x00A9}}</nowiki>

Incorrect or unintended results:

<nowiki>{{#invoke:Unicode data|lookup|name|169}}</nowiki> → - "U+00A9" expected; but is read as  (that is, 

<nowiki>{{#invoke:Unicode data|lookup|name|U+00A9}}</nowiki> - do not use "U+" prefix

<nowiki>{{#invoke:Unicode data|lookup|name|غ}}</nowiki> - cannot enter a character as codepoint

"" and "" functions

: Template-invokable functions that allow access to the functions starting with lookup and is.For most of the functions, add the code point in hexadecimal base as the next parameter. For is{{!}}Latin, is{{!}}rtl, and is{{!}}valid_pagename, add character string. HTML character references in the text are decoded by the module into code points.
  • For example, → .

    Internally, in modules, these functions are named using underscore: ←

    For &amp;A9; ©:  →

    Functions overview

    TopicFunctionParameter type
    (string=by character(s); c.p. by value)
    ExampleReturnsCharacter
    Unicode character namecode point
    Scriptscode point
    Blockscode point
    Planescode point
    General Categorycode point
    Controlscode point
    Latin scriptstring
    WP:Article title string
    Bidirectionality, right-to-left scriptsstring
    Combining charactercode point
    Character assignationcode point
    Printablecode point
    code pointlookupname to generate names of characters in the Hangul Syllables block -->
    Alias names[application unknown]
    Combining class[application unknown]
    Age[application unknown]
    get_best_script[application unknown]

    Data modules

    The data used by functions in this module is found in submodules. Some are generated by AWK scripts shown at User:Kephir/Unicode on English Wiktionary, others by Lua scripts on the /make subpages of the submodules.