Unicode scripts (UAX #24).
A script is an atom made from the long name of its Script property value, such as :latin,
:greek, :han, :common (characters shared by many scripts), :inherited (combining
marks that take the script of their base), or :unknown (unassigned codepoints). Three
ISO 15924 combinations used by the identifier and confusable checks come last: :han_with_bopomofo,
:japanese, and :korean.
Mojibake.Char.script/1 and Mojibake.Char.script_extensions/1 return scripts.
Summary
Functions
Every script, in the order of the Script property values, then the three ISO 15924
combinations.
The ISO 15924 code of script, or nil if script is not a script.
The script with the ISO 15924 code code, ignoring case, or nil if there is none.
Types
@type t() :: atom()
A script, such as :latin.
Functions
@spec all() :: [t()]
Every script, in the order of the Script property values, then the three ISO 15924
combinations.
Examples
iex> :latin in Mojibake.Script.all()
true
The ISO 15924 code of script, or nil if script is not a script.
Examples
iex> Mojibake.Script.code(:latin)
"Latn"
iex> Mojibake.Script.code(:japanese)
"Jpan"
The script with the ISO 15924 code code, ignoring case, or nil if there is none.
Examples
iex> Mojibake.Script.from_code("Grek")
:greek
iex> Mojibake.Script.from_code("zyyy")
:common
iex> Mojibake.Script.from_code("Xxxx")
nil