m17nCharacter(3m17n)

πŸ“¦
version 1.8.4 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ m17nCharacter ✨

okay bestie, welcome to m17nCharacter(3m17n) β€” the m17n library's whole situation for character objects πŸ’… this is the page where we find out what a "character" even is around here. buckle up πŸŽ€


🌸 NAME 🌸

m17nCharacter_-_Chara β€” character objects, plus the API that goes with them πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

Macros

  • #define MCHAR_MAX β€” the maximum character code, periodt.

Functions

MSymbol mchar_define_property (const char *name, MSymbol type)

Define a character property. ✨

void * mchar_get_prop (int c, MSymbol key)

Get the value of a character property. 🫢

int mchar_put_prop (int c, MSymbol key, void *val)

Set the value of a character property. πŸ’œ

MCharTable * mchar_get_prop_table (MSymbol key, MSymbol *type)

Get the char-table for a character property. 🌈

Variables: Keys of character properties

these symbols are literally the keys you use to unlock character properties, no cap πŸ”‘

  • MSymbol Mscript β€” key for script.
  • MSymbol Mname β€” key for character name.
  • MSymbol Mcategory β€” key for general category.
  • MSymbol Mcombining_class β€” key for canonical combining class.
  • MSymbol Mbidi_category β€” key for bidi category.
  • MSymbol Msimple_case_folding β€” key for the corresponding single lowercase character.
  • MSymbol Mcomplicated_case_folding β€” key for the corresponding multiple lowercase characters.
  • MSymbol Mcased β€” key for values used in case operation.
  • MSymbol Msoft_dotted β€” key for values used in case operation.
  • MSymbol Mcase_mapping β€” key for values used in case operation.
  • MSymbol Mblock β€” key for script block name.

πŸ’« Detailed Description πŸ’«

so. character objects, and the API for them. here's the tea β˜•

the m17n library represents a character with a character code, which is just an integer. the minimum character code is 0. the maximum character code is defined by the macro MCHAR_MAX. and it is assured that MCHAR_MAX is not smaller than 0x3FFFFF (22 bits) β€” so you have room, bestie, don't stress 🫢

characters 0 to 0x10FFFF are equivalent to the Unicode characters with the same code values. iconic. 🌸

a character can have zero or more properties called character properties. a character property is a key plus a value: the key is a symbol, and the value is anything that can be cast to (void *). and when we say "the character property that belongs to character C and whose key is K", we're allowed to shorten it to "the K property of C" β€” because we're efficient like that πŸ’…


πŸŽ€ Macro Definition Documentation πŸŽ€

#define MCHAR_MAX

maximum character code. the macro MCHAR_MAX gives the maximum character code. that's it, that's the whole thing, she's simple and she serves πŸ‘‘


🌟 Variable Documentation 🌟

MSymbol Mscript

key for script. the symbol Mscript has the name 'script' and is used as the key of a character property. the value of such a property is a symbol representing the script that the character belongs to. πŸ¦‹

each symbol that represents a script has one of the names listed in the Unicode Technical Report #24.

MSymbol Mname

key for character name. the symbol Mname has the name 'name' and is used as the key of a character property. the value of such a property is a C-string representing the name of the character. πŸ’–

MSymbol Mcategory

key for general category. the symbol Mcategory has the name 'category' and is used as the key of a character property. the value of such a property is a symbol representing the general category of the character.

each symbol that represents a general category has one of the names listed as abbreviations for General Category in Unicode. πŸ“š

MSymbol Mcombining_class

key for canonical combining class. the symbol Mcombining_class has the name 'combining-class' and is used as the key of a character property. the value of such a property is an integer representing the canonical combining class of the character.

the meaning of each integer that represents a canonical combining class is identical to the one defined in Unicode. no cap. πŸ”₯

MSymbol Mbidi_category

key for bidi category. the symbol Mbidi_category has the name 'bidi-category' and is used as the key of a character property. the value of such a property is a symbol representing the bidirectional category of the character.

each symbol that represents a bidirectional category has one of the names listed as types of Bidirectional Category in Unicode. ✨

MSymbol Msimple_case_folding

key for corresponding single lowercase character. the symbol Msimple_case_folding has the name 'simple-case-folding' and is used as the key of a character property. the value of such a property is the corresponding single lowercase character that gets used when comparing M-texts while ignoring cases. πŸ’…

okay so if a character needs a complicated comparison β€” like, it literally can't be compared by just mapping it to another single character β€” then the value of that property is 0xFFFF. and in that case, the character has another property whose key is Mcomplicated_case_folding. she has a backup plan, we love a prepared queen 🫢

MSymbol Mcomplicated_case_folding

key for corresponding multiple lowercase characters. the symbol Mcomplicated_case_folding has the name 'complicated-case-folding' and is used as the key of a character property. the value of such a property is the corresponding M-text that contains a sequence of lowercase characters, used for comparing M-texts while ignoring case. πŸ¦‹

MSymbol Mcased

key for values used in case operation. the symbol Mcased has the name 'cased' and is used as the key of charater property. the value of such a property is an integer value 1, 2, or 3, representing 'cased', 'case-ignorable', and both of them respectively. see the Unicode Standard 5.0 (Section 3.13 Default Case Algorithm) for the detail. πŸ“–

MSymbol Msoft_dotted

key for values used in case operation. the symbol Msoft_dotted has the name 'soft-dotted' and is used as the key of charater property. the value of such a property is Mt if a character has the 'Soft_Dotted' property, and Mnil otherwise. see the Unicode Standard 5.0 (Section 3.13 Default Case Algorithm) for the detail. ✨

MSymbol Mcase_mapping

key for values used in case operation. the symbol Mcase_mapping has the name 'case-mapping' and is used as the key of charater property. the value of such a property is a plist of three M-Texts: lower, title, and upper of the corresponding character. see the Unicode Standard 5.0 (Section 5.18 Case Mappings) for the detail. πŸ’œ

MSymbol Mblock

key for script block name. the symbol Mblock has the name 'block' and is used as the key of charater property. the value of such a property is a symbol representing a script block of the corresponding character. 🌈


🧚 Author 🧚

generated automatically by Doxygen for The m17n Library from the source code. yes she was born in a doc generator and she's still slaying πŸ’…


Copyright (C) 2001 Information-technology Promotion Agency (IPA)

Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>.


okay that's the whole page bestie, go read your Unicode reports and hydrate πŸ’–

Version 1.8.4 β€” Mon Sep 25 2023 β€” m17nCharacter(3m17n) πŸŽ€ bye pookie, mwah 🫢

πŸ“¦ where this page comes from