---
name: "register_uformat"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/register_uformat/3alleg4"
---

# register\_uformat(3alleg4)

Installs handler functions for a new text encoding format. Allegro game programming library.

## NAME

register\_uformat - Installs handler functions for a new text encoding format. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**void register\_uformat(int type,** **int (\*u\_getc)(const char \*s),** **int (\*u\_getx)(char \*\*s),** **int (\*u\_setc)(char \*s, int c),** **int (\*u\_width)(const char \*s),** **int (\*u\_cwidth)(int c),** **int (\*u\_isok)(int c));**

## DESCRIPTION

Installs a set of custom handler functions for a new text encoding  format. The \`type' is the ID code for your new format, which should be a 4-character string as produced by the AL\_ID() macro, and which can later  be passed to functions like set\_uformat() and uconvert(). The function  parameters are handlers that implement the character access for your new  type: see below for details of these.

## SEE ALSO

**set\_uformat**(3alleg4), **uconvert**(3alleg4), **ugetc**(3alleg4), **ugetx**(3alleg4), **usetc**(3alleg4), **uwidth**(3alleg4), **ucwidth**(3alleg4), **uisok**(3alleg4)
