यह मॉड्यूल:Unicode data हेतु प्रलेख पृष्ठ है

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

संपादित करें

The code point is to be entered as hexadecimal value. For example, Error using {{unichar}}: Input "A9" is not a hexadecimal value (expected: like "09AF") :

|A9hex
|0xA9hex
|0x00A9hex
|0x00a9hex
{{#invoke:Unicode data|lookup|name|0x00A9}} → COPYRIGHT SIGN

Incorrect or unintended results:

169dec: {{#invoke:Unicode data|lookup|name|169}} → LATIN SMALL LETTER U WITH TILDE साँचा:Nay —"U+00A9"
©
expected; but is read as 00A9hex (that is, 361dec
U+00A9 {{#invoke:Unicode data|lookup|name|U+00A9}} साँचा:Nay —do not use "U+" prefix
غ {{#invoke:Unicode data|lookup|name|غ}} साँचा:Nay —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, {{#invoke:Unicode data|is|Latin|àzàhàr̃iyyā̀}} → true.
Internally, in modules, these functions are named using underscore:
lookup_name|code point
lookup_name
For &A9; ©: {{#invoke:Unicode data|lookup|name|A9}} → COPYRIGHT SIGN
Topic Function Parameter type
(string=by character(s); c.p. by 0xHex value)
Example Returns Character
Unicode character name
|lookup|name
code point
  • {{#invoke:Unicode data|lookup|name|0xA9}}
  • {{#invoke:Unicode data|lookup|name|0x0007}}
  • COPYRIGHT SIGN
  • <control-0007>
  • ©
  • &#x0007;
Scripts
|lookup|script
code point {{#invoke:Unicode data|lookup|script|A061}} Yiii
Blocks
|lookup|block
code point {{#invoke:Unicode data|lookup|block|A061}} Yi Syllables
Planes
|lookup|plane
code point
  • {{#invoke:Unicode data|lookup|plane|0xA9}}
  • {{#invoke:Unicode data|lookup|plane|0x1F608}}
  • Basic Multilingual Plane
  • Supplementary Multilingual Plane
  • ©
  • 😈


General Category
|lookup|category
code point
  • {{#invoke:Unicode data|lookup|category|0xA9}}
  • {{#invoke:Unicode data|lookup|category|0x002B}}
  • So
  • Sm
  • ©
  • +
Controls
|is|control
code point
  • {{#invoke:Unicode data|lookup|control|A9}}
  • {{#invoke:Unicode data|lookup|control|FFFF}}
  • assigned
  • unassigned
  • ©
  • &#xFFFF;
Latin script
|is|Latin
string
  • {{#invoke:Unicode data|is|Latin|abcŁíā̀}}
  • {{#invoke:Unicode data|is|Latin|abc文xyz}}
  • true
  • false
WP:Article title (WP:NCTR)
|is|valid_pagename
string साँचा:Ubli
  • true
  • false
Bidirectionality, right-to-left scripts
|is|rtl
string
  • {{#invoke:Unicode data|is|rtl|ش}}
  • {{#invoke:Unicode data|is|rtl|34}}
साँचा:Ubli
  • ش
  • 4
Combining character
|is|combining
code point
  • {{#invoke:Unicode data|is|combining|0300}}
  • {{#invoke:Unicode data|is|combining|64}}
  • true
  • false
  • ̀
  • d
Character assignation
|is|assigned
code point
  • {{#invoke:Unicode data|is|assigned|A061}}
  • {{#invoke:Unicode data|is|assigned|FFEF}}
  • true
  • false
  • ;
Printable
|is|printable
code point
  • {{#invoke:Unicode data|is|printable|0061}}
  • {{#invoke:Unicode data|is|printable|0007}}
  • {{#invoke:Unicode data|is|printable|FFFF}}
  • >true<
  • >false<
  • >false<
  • >a<
  • >&#x0007;<
  • >&#xFFFF;<
मॉड्यूल:Unicode data/doc § Notes
|is|whitespace
code point
  • {{#invoke:Unicode data|is|whitespace|0x20}}
  • {{#invoke:Unicode data|is|whitespace|0xA0}}
  • {{#invoke:Unicode data|is|whitespace|0x64}}
  • >true<
  • >true< NBSP
  • >false<
  • > <
  • > <
  • >d<
Hangul
|Hangul
[application unknown]
  • &#x;
  • &#x;
Alias names
|aliases
[application unknown]
  • &#x;
  • &#x;
Combining class
|
[application unknown]
  • &#x;
  • &#x;
Age
|
[application unknown]
get_best_script
|get_best_script
[application unknown]

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.

Character name data modules,
organized by first three digits of codepoint in hexadecimal base
0 1 2 3 4 5 6 7 8 9 A B C D E F
00x U+0000–
U+0FFF
U+1000–
U+1FFF
U+2000–
U+2FFF
U+3000–
U+3FFF
U+4000–
U+4FFF
U+A000–
U+AFFF
U+D000–
U+DFFF
U+F000–
U+FFFF
01x U+10000–
U+10FFF
U+11000–
U+11FFF
U+12000–
U+12FFF
U+13000–
U+13FFF
U+14000–
U+14FFF
U+16000–
U+16FFF
U+18000–
U+18FFF
U+1A000–
U+1AFFF
U+1B000–
U+1BFFF
U+1C000–
U+1CFFF
U+1D000–
U+1DFFF
U+1E000–
U+1EFFF
U+1F000–
U+1FFFF
0Ex U+E0000–
U+E0FFF

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.

  • 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}} → [Nil]
  • Named entities: for example, Error using {{unichar}}: Input "22C1" is not a hexadecimal value (expected: like "09AF") : {{#invoke:LoadData|Numcr2namecr|0x22C1}}स्क्रिप्ट त्रुटि: "LoadData" ऐसा कोई मॉड्यूल नहीं है।