unicode
What Unicode knows about a character: category, script, writing direction, case, decomposition and composition.
import unicode
Unicode gives every character of every script in the world a number, called a code point: "ش" is 1588 and "A" is 65. For any code point, the unicode package says what kind of character it is: letter or digit, which script it belongs to, whether it is written right to left or left to right, and what its upper and lower case forms are.
Most of the time the str package is enough, and it uses this one underneath. This package is for when you are inspecting text character by character yourself, in a parser, an editor or a text cleaning tool. The data is generated from the official Unicode database, version 16.
To get the code points of a string, use str.CodePoints.
Two things to keep in mind:
- A code point is not always what a reader sees as one letter. An accented letter can be two code points and an emoji family seven;
str.Graphemesworks at that level. ToUpper,ToLowerandToTitleare the simple one to one mappings, so a character whose upper case is two letters keeps its form:ßstaysß. To compare text without case, use the full fold behindstr.EqualFoldrather than comparing upper cased copies.
Counting kinds of characters
A loop over str.CodePoints with the Is... functions sorts every character into a class. The classes come from the Unicode database, so they work for every script at once: the Persian digits count as digits, the Persian comma ، as punctuation and the kasra on سلامِ as a mark.
import unicode
import str
func main:
text := "Salam 2026! سلامِ ۱۴۰۵، café (ok)"
cps := str.CodePoints(text)
defer cps.Free()
mut letters := 0
mut digits := 0
mut spaces := 0
mut punct := 0
mut marks := 0
each cp in cps:
if unicode.IsLetter(cp):
letters++
else unicode.IsDigit(cp):
digits++
else unicode.IsSpace(cp):
spaces++
else unicode.IsPunct(cp):
punct++
else unicode.IsMark(cp):
marks++
end
end
println "code points:", cps.Len()
println "letters:", letters, "digits:", digits, "spaces:", spaces
println "punctuation:", punct, "marks:", marks
endThe order of the tests matters only for characters that belong to two groups; letters, digits, spaces, punctuation and marks do not overlap. For finer detail, Category returns one of the 30 general categories, compared against the constants such as CatLo, and CategoryName its two letter code.
Guessing the direction of a line
When a page shows text written by users, each paragraph needs dir="rtl" or dir="ltr". The usual rule, the one browsers apply for dir="auto", is to take the direction of the first strong character. BidiClass gives that class: BcL for left to right, BcR for Hebrew and BcAL for Arabic script.
import unicode
import str
func direction(text: str): str:
cps := str.CodePoints(text)
defer cps.Free()
each cp in cps:
bc := unicode.BidiClass(cp)
if bc == unicode.BcL:
ret "ltr"
end
if bc == unicode.BcR or bc == unicode.BcAL:
ret "rtl"
end
end
ret "neutral"
end
func main:
each line in ["Hello", "سلام دنیا", "2026: سال نو", "(42) Answer", "!!! 123", "שלום"]:
println direction(line), "|", line
end
endDigits, spaces and punctuation are weak or neutral, so 2026: سال نو is right to left because the first letter is Persian. A line with no letters at all has no direction of its own; give it the direction of the surrounding page. For laying out a whole mixed paragraph, see bidi, which runs the complete algorithm.
Spotting mixed scripts in a user name
Some letters in different scripts look the same: the Cyrillic а is not the Latin a, yet pаypal with a Cyrillic letter looks exactly like the real name. A sign up form can refuse names that mix scripts. Script gives the script of each code point; skip ScriptCommon (digits, punctuation, _) and ScriptInherited (combining marks), which belong to every script.
import unicode
import str
func scripts_in(name: str): Vector<str>:
mut found := Vector {} as Vector<str>
cps := str.CodePoints(name)
defer cps.Free()
each cp in cps:
sc := unicode.Script(cp)
if sc == unicode.ScriptCommon or sc == unicode.ScriptInherited:
continue
end
script := unicode.ScriptName(cp)
mut seen := false
each s in found:
if s == script:
seen = true
end
end
if not seen:
found.Push(script)
end
end
ret found
end
func main:
each name in ["paypal", "pаypal", "علی_2000", "Reza۱۳۷۰"]:
s := scripts_in(name)
verdict := s.Len() > 1 ? "mixed, check it" : "ok"
println name, s, verdict
s.Free()
end
endThe last name shows a trap: the Persian digits ۱۳۷۰ belong to the Arabic script, while the ASCII digits are Common. Whether a Latin name with Persian digits should pass is your decision; the function only reports the facts. The а escape writes the Cyrillic letter into the source so you can see it is there.
Removing accents and vowel marks
For a loose search, café should match cafe. Canonical decomposition splits é into e and a combining accent; drop every mark and keep the rest. DecompLen says how many parts a code point decomposes into, zero when it does not, and DecompAt returns each part.
import unicode
import str
func strip_marks(text: str): str:
mut b := str.NewBuilder()
defer str.BufFree(b)
cps := str.CodePoints(text)
defer cps.Free()
each cp in cps:
n := unicode.DecompLen(cp)
if n == 0:
if not unicode.IsMark(cp):
str.BufAppendCp(b, cp)
end
continue
end
repeat n in k:
part := unicode.DecompAt(cp, k)
if not unicode.IsMark(part):
str.BufAppendCp(b, part)
end
end
end
ret str.BufStr(b)
end
func main:
println strip_marks("café crème brûlée")
println strip_marks("Ångström, naïve, São Paulo")
println strip_marks("کِتابُ الْعَرَبِیَّة")
println strip_marks("آموزشِ زبانِ برنامهنویسیِ سلام")
endThe Arabic vowel marks go away, which is what a search usually wants. But look at the last line: آ decomposes into ا plus a madda, so the madda is removed too and آموزش becomes اموزش. That is wrong for Persian. For Persian and Arabic text use arabic, whose StripHarakat flag removes the vowel marks and leaves letters such as آ alone, and for whole strings use str.NFD and NFC rather than decomposing one level by hand.
Upper case in every script
str.Upper and str.Lower only change the ASCII letters, which is fast and enough for keywords and codes, but it leaves ü, Cyrillic and Greek alone. To change the case of any script, map each code point with ToUpper or ToLower and build the result again.
import unicode
import str
func upper_all(text: str): str:
mut b := str.NewBuilder()
defer str.BufFree(b)
cps := str.CodePoints(text)
defer cps.Free()
each cp in cps:
str.BufAppendCp(b, unicode.ToUpper(cp))
end
ret str.BufStr(b)
end
func main:
each city in ["Zürich", "São Paulo", "Москва", "Αθήνα", "Straße"]:
println str.Upper(city), "|", upper_all(city)
end
endThe left column is str.Upper, the right one the per code point mapping. The last line shows the limit of a simple mapping: ß has no single upper case letter, so it stays as it is. Persian and Arabic have no letter case, and these functions return their letters unchanged.
Constants and variables
ZWNJ
const ZWNJ: i32 = 8204import unicode
func main:
println unicode.ZWNJ, unicode.ZWJ, unicode.MaxCodePoint
println "unicode", unicode.Version
endZWJ
const ZWJ: i32 = 8205The example for this item is shown with the ones above: unicode-ZWNJ.salam
MaxCodePoint
const MaxCodePoint: i32 = 1114111The example for this item is shown with the ones above: unicode-ZWNJ.salam
Hangul syllable constants Hangul…
| Name | Value |
|---|---|
HangulSBase | 44032 |
HangulLBase | 4352 |
HangulVBase | 4449 |
HangulTBase | 4519 |
HangulLCount | 19 |
HangulVCount | 21 |
HangulTCount | 28 |
HangulNCount | 588 |
HangulSCount | 11172 |
import unicode
func main:
lead := 18
vowel := 0
tail := 4
syllable := unicode.HangulSBase + (lead * unicode.HangulVCount + vowel) * unicode.HangulTCount + tail
println syllable
println unicode.HangulNCount, unicode.HangulSCount
println unicode.HangulLBase, unicode.HangulVBase, unicode.HangulTBase
println unicode.HangulLCount
endVersion
const Version: str = "16.0.0"The example for this item is shown with the ones above: unicode-ZWNJ.salam
MaxFoldLen
const MaxFoldLen: i32 = 3import unicode
func main:
println unicode.ToUpper(945), unicode.ToLower(913), unicode.ToTitle(454), unicode.ToFold(913)
println unicode.ToUpper(1588)
c := 223
println unicode.HasFullFold(c), unicode.FullFoldLen(c)
repeat unicode.FullFoldLen(c) in i:
print unicode.FullFoldAt(c, i), ""
end
println ""
println unicode.MaxFoldLen
endGeneral categories Cat…
Category returns one of these numbers and CategoryName returns its two-letter short name, such as Lo. Categories whose first letter is the same are numbered consecutively.| Name | Value |
|---|---|
CatLu | 0 |
CatLl | 1 |
CatLt | 2 |
CatLm | 3 |
CatLo | 4 |
CatMn | 5 |
CatMc | 6 |
CatMe | 7 |
CatNd | 8 |
CatNl | 9 |
CatNo | 10 |
CatPc | 11 |
CatPd | 12 |
CatPs | 13 |
CatPe | 14 |
CatPi | 15 |
CatPf | 16 |
CatPo | 17 |
CatSm | 18 |
CatSc | 19 |
CatSk | 20 |
CatSo | 21 |
CatZs | 22 |
CatZl | 23 |
CatZp | 24 |
CatCc | 25 |
CatCf | 26 |
CatCs | 27 |
CatCo | 28 |
CatCn | 29 |
import unicode
func main:
each c in [65, 1588, 1776, 1614, 8204, 12288, 888]:
println c, unicode.CategoryName(c), unicode.Category(c), unicode.IsAssigned(c)
end
println unicode.Category(1588) == unicode.CatLo
endGrapheme break classes Gcb…
GraphemeBreak returns. The str package uses them to find where one "visible letter" ends and the next begins; a letter with its marks, or a composed emoji, is one cluster.| Name | Value |
|---|---|
GcbOther | 0 |
GcbCR | 1 |
GcbLF | 2 |
GcbControl | 3 |
GcbExtend | 4 |
GcbZWJ | 5 |
GcbRegionalIndicator | 6 |
GcbPrepend | 7 |
GcbSpacingMark | 8 |
GcbL | 9 |
GcbV | 10 |
GcbT | 11 |
GcbLV | 12 |
GcbLVT | 13 |
GcbExtendedPictographic | 14 |
import unicode
func main:
println unicode.GraphemeBreak(1614) == unicode.GcbExtend
println unicode.GraphemeBreak(8205) == unicode.GcbZWJ
println unicode.GraphemeBreak(128512) == unicode.GcbExtendedPictographic
println unicode.GraphemeBreak(10), unicode.GraphemeBreak(65)
println unicode.ConjunctBreak(2325) == unicode.IncbConsonant, unicode.ConjunctBreak(2381) == unicode.IncbLinker
endConjunct break classes Incb…
ConjunctBreak returns. This rule keeps consonants joined by a virama in Indic scripts inside a single cluster.| Name | Value |
|---|---|
IncbNone | 0 |
IncbConsonant | 1 |
IncbExtend | 2 |
IncbLinker | 3 |
The example for this item is shown with the ones above: unicode-GraphemeBreak.salam
Bidirectional classes Bc…
BidiClass returns, which the bidirectional algorithm uses to decide where each character of mixed text appears. Arabic script letters are "Arabic", Latin letters are "left to right", and digits have classes of their own.| Name | Value |
|---|---|
BcL | 0 |
BcR | 1 |
BcAL | 2 |
BcEN | 3 |
BcES | 4 |
BcET | 5 |
BcAN | 6 |
BcCS | 7 |
BcNSM | 8 |
BcBN | 9 |
BcB | 10 |
BcS | 11 |
BcWS | 12 |
BcON | 13 |
BcLRE | 14 |
BcRLE | 15 |
BcLRO | 16 |
BcRLO | 17 |
BcPDF | 18 |
BcLRI | 19 |
BcRLI | 20 |
BcFSI | 21 |
BcPDI | 22 |
import unicode
func main:
println unicode.BidiClass(65) == unicode.BcL
println unicode.BidiClass(1588) == unicode.BcAL
println unicode.BidiClass(1488) == unicode.BcR
println unicode.BidiClass(1776) == unicode.BcEN, unicode.BidiClass(1632) == unicode.BcAN
println unicode.PairedBracketType(40) == unicode.PbtOpen, unicode.PairedBracketType(41) == unicode.PbtClose
println unicode.PairedBracket(40), unicode.PairedBracket(65)
endPaired bracket types Pbt…
PairedBracketType: whether the character is an opening bracket, a closing one, or not a bracket at all.| Name | Value |
|---|---|
PbtNone | 0 |
PbtOpen | 1 |
PbtClose | 2 |
The example for this item is shown with the ones above: unicode-BidiClass.salam
Script identifiers Script…
Script returns one of them. Persian and Arabic letters are both "Arabic script". "Common" characters such as digits and punctuation are used by several scripts, and "inherited" means the character takes the script of the character before it, as marks do.| Name | Value |
|---|---|
ScriptUnknown | 0 |
ScriptCommon | 1 |
ScriptLatin | 2 |
ScriptGreek | 3 |
ScriptCyrillic | 4 |
ScriptArmenian | 5 |
ScriptHebrew | 6 |
ScriptArabic | 7 |
ScriptSyriac | 8 |
ScriptThaana | 9 |
ScriptDevanagari | 10 |
ScriptBengali | 11 |
ScriptGurmukhi | 12 |
ScriptGujarati | 13 |
ScriptOriya | 14 |
ScriptTamil | 15 |
ScriptTelugu | 16 |
ScriptKannada | 17 |
ScriptMalayalam | 18 |
ScriptSinhala | 19 |
ScriptThai | 20 |
ScriptLao | 21 |
ScriptTibetan | 22 |
ScriptMyanmar | 23 |
ScriptGeorgian | 24 |
ScriptHangul | 25 |
ScriptEthiopic | 26 |
ScriptCherokee | 27 |
ScriptCanadianAboriginal | 28 |
ScriptOgham | 29 |
ScriptRunic | 30 |
ScriptKhmer | 31 |
ScriptMongolian | 32 |
ScriptHiragana | 33 |
ScriptKatakana | 34 |
ScriptBopomofo | 35 |
ScriptHan | 36 |
ScriptYi | 37 |
ScriptOldItalic | 38 |
ScriptGothic | 39 |
ScriptDeseret | 40 |
ScriptInherited | 41 |
ScriptTagalog | 42 |
ScriptHanunoo | 43 |
ScriptBuhid | 44 |
ScriptTagbanwa | 45 |
ScriptLimbu | 46 |
ScriptTaiLe | 47 |
ScriptLinearB | 48 |
ScriptUgaritic | 49 |
ScriptShavian | 50 |
ScriptOsmanya | 51 |
ScriptCypriot | 52 |
ScriptBraille | 53 |
ScriptBuginese | 54 |
ScriptCoptic | 55 |
ScriptNewTaiLue | 56 |
ScriptGlagolitic | 57 |
ScriptTifinagh | 58 |
ScriptSylotiNagri | 59 |
ScriptOldPersian | 60 |
ScriptKharoshthi | 61 |
ScriptBalinese | 62 |
ScriptCuneiform | 63 |
ScriptPhoenician | 64 |
ScriptPhagsPa | 65 |
ScriptNko | 66 |
ScriptSundanese | 67 |
ScriptLepcha | 68 |
ScriptOlChiki | 69 |
ScriptVai | 70 |
ScriptSaurashtra | 71 |
ScriptKayahLi | 72 |
ScriptRejang | 73 |
ScriptLycian | 74 |
ScriptCarian | 75 |
ScriptLydian | 76 |
ScriptCham | 77 |
ScriptTaiTham | 78 |
ScriptTaiViet | 79 |
ScriptAvestan | 80 |
ScriptEgyptianHieroglyphs | 81 |
ScriptSamaritan | 82 |
ScriptLisu | 83 |
ScriptBamum | 84 |
ScriptJavanese | 85 |
ScriptMeeteiMayek | 86 |
ScriptImperialAramaic | 87 |
ScriptOldSouthArabian | 88 |
ScriptInscriptionalParthian | 89 |
ScriptInscriptionalPahlavi | 90 |
ScriptOldTurkic | 91 |
ScriptKaithi | 92 |
ScriptBatak | 93 |
ScriptBrahmi | 94 |
ScriptMandaic | 95 |
ScriptChakma | 96 |
ScriptMeroiticCursive | 97 |
ScriptMeroiticHieroglyphs | 98 |
ScriptMiao | 99 |
ScriptSharada | 100 |
ScriptSoraSompeng | 101 |
ScriptTakri | 102 |
ScriptCaucasianAlbanian | 103 |
ScriptBassaVah | 104 |
ScriptDuployan | 105 |
ScriptElbasan | 106 |
ScriptGrantha | 107 |
ScriptPahawhHmong | 108 |
ScriptKhojki | 109 |
ScriptLinearA | 110 |
ScriptMahajani | 111 |
ScriptManichaean | 112 |
ScriptMendeKikakui | 113 |
ScriptModi | 114 |
ScriptMro | 115 |
ScriptOldNorthArabian | 116 |
ScriptNabataean | 117 |
ScriptPalmyrene | 118 |
ScriptPauCinHau | 119 |
ScriptOldPermic | 120 |
ScriptPsalterPahlavi | 121 |
ScriptSiddham | 122 |
ScriptKhudawadi | 123 |
ScriptTirhuta | 124 |
ScriptWarangCiti | 125 |
ScriptAhom | 126 |
ScriptAnatolianHieroglyphs | 127 |
ScriptHatran | 128 |
ScriptMultani | 129 |
ScriptOldHungarian | 130 |
ScriptSignWriting | 131 |
ScriptAdlam | 132 |
ScriptBhaiksuki | 133 |
ScriptMarchen | 134 |
ScriptNewa | 135 |
ScriptOsage | 136 |
ScriptTangut | 137 |
ScriptMasaramGondi | 138 |
ScriptNushu | 139 |
ScriptSoyombo | 140 |
ScriptZanabazarSquare | 141 |
ScriptDogra | 142 |
ScriptGunjalaGondi | 143 |
ScriptMakasar | 144 |
ScriptMedefaidrin | 145 |
ScriptHanifiRohingya | 146 |
ScriptSogdian | 147 |
ScriptOldSogdian | 148 |
ScriptElymaic | 149 |
ScriptNandinagari | 150 |
ScriptNyiakengPuachueHmong | 151 |
ScriptWancho | 152 |
ScriptChorasmian | 153 |
ScriptDivesAkuru | 154 |
ScriptKhitanSmallScript | 155 |
ScriptYezidi | 156 |
ScriptCyproMinoan | 157 |
ScriptOldUyghur | 158 |
ScriptTangsa | 159 |
ScriptToto | 160 |
ScriptVithkuqi | 161 |
ScriptKawi | 162 |
ScriptNagMundari | 163 |
ScriptGaray | 164 |
ScriptGurungKhema | 165 |
ScriptKiratRai | 166 |
ScriptOlOnal | 167 |
ScriptSunuwar | 168 |
ScriptTodhri | 169 |
ScriptTuluTigalari | 170 |
import unicode
func main:
each c in [65, 1588, 945, 20013, 12354, 1776, 1614]:
println c, unicode.ScriptName(c)
end
println unicode.Script(1588) == unicode.ScriptArabic, unicode.Script(65) == unicode.ScriptLatin
println unicode.Script(66464) == unicode.ScriptOldPersian, unicode.ScriptName(66464)
endFunctions
Category
func Category(cp: int): intThe example for this item is shown with the ones above: unicode-Category.salam
CategoryName
func CategoryName(cp: int): strLo for a Persian letter and Nd for a digit.The example for this item is shown with the ones above: unicode-Category.salam
IsAssigned
func IsAssigned(cp: int): boolThe example for this item is shown with the ones above: unicode-Category.salam
IsLetter
func IsLetter(cp: int): boolimport unicode
func main:
println unicode.IsLetter(1588), unicode.IsAlphabetic(1614), unicode.IsLetter(1614)
println unicode.IsUpper(915), unicode.IsLower(947), unicode.IsTitle(453)
println unicode.IsMark(1614), unicode.IsDigit(1776), unicode.IsNumber(8544), unicode.IsDigit(8544)
println unicode.IsAlnum(1776), unicode.IsPunct(1548), unicode.IsSymbol(65020)
println unicode.IsSpace(12288), unicode.IsControl(10), unicode.IsFormat(8204), unicode.IsJoinControl(8204)
endIsAlphabetic
func IsAlphabetic(cp: int): boolIsLetter, but wider: it also counts the marks that are part of reading a letter. Most of the time this is what "is it a letter?" means.The example for this item is shown with the ones above: unicode-IsLetter.salam
IsUpper
func IsUpper(cp: int): boolThe example for this item is shown with the ones above: unicode-IsLetter.salam
IsLower
func IsLower(cp: int): boolThe example for this item is shown with the ones above: unicode-IsLetter.salam
IsTitle
func IsTitle(cp: int): boolThe example for this item is shown with the ones above: unicode-IsLetter.salam
IsMark
func IsMark(cp: int): boolThe example for this item is shown with the ones above: unicode-IsLetter.salam
IsDigit
func IsDigit(cp: int): boolThe example for this item is shown with the ones above: unicode-IsLetter.salam
IsNumber
func IsNumber(cp: int): boolIsDigit.The example for this item is shown with the ones above: unicode-IsLetter.salam
IsAlnum
func IsAlnum(cp: int): boolThe example for this item is shown with the ones above: unicode-IsLetter.salam
IsPunct
func IsPunct(cp: int): boolThe example for this item is shown with the ones above: unicode-IsLetter.salam
IsSymbol
func IsSymbol(cp: int): boolThe example for this item is shown with the ones above: unicode-IsLetter.salam
IsSpace
func IsSpace(cp: int): boolThe example for this item is shown with the ones above: unicode-IsLetter.salam
IsControl
func IsControl(cp: int): boolThe example for this item is shown with the ones above: unicode-IsLetter.salam
IsFormat
func IsFormat(cp: int): boolThe example for this item is shown with the ones above: unicode-IsLetter.salam
IsJoinControl
func IsJoinControl(cp: int): boolThe example for this item is shown with the ones above: unicode-IsLetter.salam
ToUpper
func ToUpper(cp: int): intThe example for this item is shown with the ones above: unicode-ToUpper.salam
ToLower
func ToLower(cp: int): intThe example for this item is shown with the ones above: unicode-ToUpper.salam
ToTitle
func ToTitle(cp: int): intThe example for this item is shown with the ones above: unicode-ToUpper.salam
ToFold
func ToFold(cp: int): intThe example for this item is shown with the ones above: unicode-ToUpper.salam
HasFullFold
func HasFullFold(cp: int): boolThe example for this item is shown with the ones above: unicode-ToUpper.salam
FullFoldLen
func FullFoldLen(cp: int): intThe example for this item is shown with the ones above: unicode-ToUpper.salam
FullFoldAt
func FullFoldAt(cp: int, k: int): intk of the character's full case fold.The example for this item is shown with the ones above: unicode-ToUpper.salam
CombiningClass
func CombiningClass(cp: int): intimport unicode
func main:
alef_madda := 1570
println unicode.DecompLen(alef_madda), unicode.DecompAt(alef_madda, 0), unicode.DecompAt(alef_madda, 1)
println unicode.Compose(1575, 1619), unicode.Compose(1575, 65)
println unicode.CombiningClass(1614), unicode.CombiningClass(1616), unicode.CombiningClass(1575)
lam_alef := 65271
println unicode.DecompLen(lam_alef), unicode.CompatDecompLen(lam_alef)
println unicode.CompatDecompAt(lam_alef, 0), unicode.CompatDecompAt(lam_alef, 1)
endDecompLen
func DecompLen(cp: int): intThe example for this item is shown with the ones above: unicode-Decomp.salam
DecompAt
func DecompAt(cp: int, k: int): intk of the character's canonical decomposition.The example for this item is shown with the ones above: unicode-Decomp.salam
CompatDecompLen
func CompatDecompLen(cp: int): intThe example for this item is shown with the ones above: unicode-Decomp.salam
CompatDecompAt
func CompatDecompAt(cp: int, k: int): intk of the compatibility decomposition.The example for this item is shown with the ones above: unicode-Decomp.salam
Compose
func Compose(a: int, b: int): intThe example for this item is shown with the ones above: unicode-Decomp.salam
GraphemeBreak
func GraphemeBreak(cp: int): intThe example for this item is shown with the ones above: unicode-GraphemeBreak.salam
ConjunctBreak
func ConjunctBreak(cp: int): intThe example for this item is shown with the ones above: unicode-GraphemeBreak.salam
BidiClass
func BidiClass(cp: int): intThe example for this item is shown with the ones above: unicode-BidiClass.salam
PairedBracketType
func PairedBracketType(cp: int): intThe example for this item is shown with the ones above: unicode-BidiClass.salam
PairedBracket
func PairedBracket(cp: int): intThe example for this item is shown with the ones above: unicode-BidiClass.salam
Script
func Script(cp: int): intThe example for this item is shown with the ones above: unicode-Script.salam
ScriptName
func ScriptName(cp: int): strArabic.The example for this item is shown with the ones above: unicode-Script.salam