Module:Unicode data/doc

From Drifter's Wiki TEST
Revision as of 13:16, 23 October 2022 by Archer (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This is the documentation page for Module:Unicode data

Lua error: Internal error: The interpreter exited with status 127.

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, Expression error: Unexpected < operator.Lua error: Internal error: The interpreter exited with status 127.:

|A9hex
|0xA9hex
|0x00A9hex
|0x00a9hex
{{#invoke:Unicode data|lookup|name|0x00A9}}Lua error: Internal error: The interpreter exited with status 127.

Incorrect or unintended results:

169dec: {{#invoke:Unicode data|lookup|name|169}}Lua error: Internal error: The interpreter exited with status 127. Red XN —"U+00A9" &copy; expected; but is read as 00A9hex (that is, Lua error: Internal error: The interpreter exited with status 127.dec
U+00A9 {{#invoke:Unicode data|lookup|name|U+00A9}} Red XN —do not use "U+" prefix
غ {{#invoke:Unicode data|lookup|name|غ}} Red XN —cannot enter a character as codepoint

"lookup" and "is" functions

lookup, is
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, Lua error: Internal error: The interpreter exited with status 127.Lua error: Internal error: The interpreter exited with status 127..
Internally, in modules, these functions are named using underscore: lookup_name|code pointlookup_name
For &A9; ©: Lua error: Internal error: The interpreter exited with status 127. → Lua error: Internal error: The interpreter exited with status 127.

Functions overview

This table: Lua error: Internal error: The interpreter exited with status 127.
  • Code points: enter hexadecimal value, for example |0x0061 or |61; not |U+0061.
Topic Function Parameter type
(string=by character(s); c.p. by 0xHex value)
Example Returns Character
Unicode character name |lookup|name code point Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127.
Scripts |lookup|script code point Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127.
Blocks |lookup|block code point Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127.
Planes |lookup|plane code point Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127.


General Category |lookup|category code point Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127.
Controls |is|control code point Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127.
Latin script |is|Latin string Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127.
WP:Article title (WP:NCTR) |is|valid_pagename string Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127.
Bidirectionality, right-to-left scripts |is|rtl string Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127.
Combining character |is|combining code point Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127.
Character assignation |is|assigned code point Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127.
Printable |is|printable code point Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127.
Lua error: Internal error: The interpreter exited with status 127. |is|whitespace code point Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127. Lua error: Internal error: The interpreter exited with status 127.
Hangul |Hangul [application unknown] Lua error: Internal error: The interpreter exited with status 127.
Alias names |aliases [application unknown] Lua error: Internal error: The interpreter exited with status 127.
Combining class | [application unknown] Lua error: Internal error: The interpreter exited with status 127.
Age | [application unknown] Lua error: Internal error: The interpreter exited with status 127.
get_best_script |get_best_script [application unknown] Lua error: Internal error: The interpreter exited with status 127.

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.

The name data modules (Module:Unicode data/names/xxx) were compiled from UnicodeData.txt. Each one contains, at maximum, code points U+xxx000 to U+xxxFFF. Lua error: Internal error: The interpreter exited with status 127.

Copyright

The Unicode database is released by Unicode Inc. under the following terms:

Copyright © 1991-2018 Unicode, Inc. All rights reserved. Distributed under the Terms of Use in https://www.unicode.org/copyright.html.

Permission is hereby granted, free of charge, to any person obtaining a copy of the Unicode data files and any associated documentation (the "Data Files") or Unicode software and any associated documentation (the "Software") to deal in the Data Files or Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Data Files or Software, and to permit persons to whom the Data Files or Software are furnished to do so, provided that either (a) this copyright and permission notice appear with all copies of the Data Files or Software, or (b) this copyright and permission notice appear in associated Documentation.

THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE.

Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in these Data Files or Software without prior written authorization of the copyright holder.

Known issues

  • Reading data like Module:Unicode data/aliases not provided nor documented
  • Test fail: lookup_category U+FFFF (<noncharacter-FFFF>) expected: Cn.
{{#invoke:Unicode data|lookup|category|0xFFFF}}Lua error: Internal error: The interpreter exited with status 127. [Nil]

See also

  • Named entities: for example, Expression error: Unexpected < operator.Lua error: Internal error: The interpreter exited with status 127.: {{#invoke:LoadData|Numcr2namecr|0x22C1}}Lua error: Internal error: The interpreter exited with status 127.