---
name: "register_uformat"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/register_uformat"
---

# register\_uformat(3alleg)

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**(3alleg)](/set_uformat/3alleg.md), [**uconvert**(3alleg)](/uconvert/3alleg.md), [**ugetc**(3alleg)](/ugetc/3alleg.md), [**ugetx**(3alleg)](/ugetx/3alleg.md), [**usetc**(3alleg)](/usetc/3alleg.md), [**uwidth**(3alleg)](/uwidth/3alleg.md), [**ucwidth**(3alleg)](/ucwidth/3alleg.md), [**uisok**(3alleg)](/uisok/3alleg.md)
