---
name: "unicode_category_lookup"
section: "3"
platform: "linux"
package: "libcourier-unicode-dev"
version: "2.3.2-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/unicode_category_lookup"
---

# unicode\_category\_lookup(3)

unicode character categorization

## NAME

unicode\_category\_lookup, unicode\_isalnum, unicode\_isalpha, unicode\_isblank, unicode\_isdigit, unicode\_isgraph, unicode\_islower, unicode\_ispunct, unicode\_isspace, unicode\_isupper - unicode character categorization

## SYNOPSIS

```
#include <courier-unicode.h>
```

**uint32\_t unicode\_category\_lookup(char32\_t** *c***);**

**int unicode\_isalnum(char32\_t** *c***);**

**int unicode\_isalpha(char32\_t** *c***);**

**int unicode\_isblank(char32\_t** *c***);**

**int unicode\_isdigit(char32\_t** *c***);**

**int unicode\_isgraph(char32\_t** *c***);**

**int unicode\_islower(char32\_t** *c***);**

**int unicode\_ispunct(char32\_t** *c***);**

**int unicode\_isspace(char32\_t** *c***);**

**int unicode\_isupper(char32\_t** *c***);**

## DESCRIPTION

**unicode\_category\_lookup**() looks up the **unicode character's categorization**\[1\]. **unicode\_category\_lookup**() returns a 32 bit value. The value's UNICODE\_CATEGORY\_1 bits specify the first level of the unicode character's category, with UNICODE\_CATEGORY\_2, UNICODE\_CATEGORY\_3, and UNICODE\_CATEGORY\_4 bits specifying the 2nd, 3rd, and 4th level, if given. A value of 0 for each corresponding bit set indicates that no category is specified for this level, for this character; otherwise the possible values are defined in \<courier-unicode.h\>.

The remaining functions implement comparable equivalents of their non-unicode versions in the standard C library, as follows:

**unicode\_isalnum**()

Returns non-0 for all **unicode\_isalpha**() or **unicode\_isdigit**().

**unicode\_isalpha**()

Returns non-0 for all UNICODE\_CATEGORY\_1\_LETTER.

**unicode\_isblank**()

Return non-0 for TAB, and all UNICODE\_CATEGORY\_2\_SPACE.

**unicode\_isdigit**()

Returns non-0 for all UNICODE\_CATEGORY\_1\_NUMBER \| UNICODE\_CATEGORY\_2\_DIGIT, only (no third categories).

**unicode\_isgraph**()

Returns non-0 for all codepoints above SPACE which are not **unicode\_isspace**().

**unicode\_islower**()

Returns non-0 for all **unicode\_isalpha**() for which the character is equal to [**unicode\_lc**(3)](/unicode_lc/3.md) of itself.

**unicode\_ispunct**()

Returns non-0 for all UNICODE\_CATEGORY\_1\_PUNCTUATION.

**unicode\_isspace**()

Returns non-0 for unicode\_isblank() or for unicode characters with linebreaking properties of BK, CR, LF, NL, and SP.

**unicode\_isupper**()

Returns non-0 for all **unicode\_isalpha**() for which the character is equal to [**unicode\_uc**(3)](/unicode_uc/3.md) of itself.

## SEE ALSO

[**courier-unicode**(7)](/courier-unicode/7.md), [**unicode\_convert\_tocase**(3)](/unicode_convert_tocase/3.md).

## AUTHOR

**Sam Varshavchik**

Author

## NOTES

- 1\.

  unicode character's categorization

  https://unicode.org/notes/tn36/
