---
name: "uwidth_max"
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/uwidth_max"
---

# uwidth\_max(3alleg)

Number of bytes a character can occupy. Allegro game programming library.

## NAME

uwidth\_max - Number of bytes a character can occupy. Allegro game programming library.

## SYNOPSIS

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

**int uwidth\_max(int type);**

## DESCRIPTION

Low level helper function for working with Unicode text data. Returns the  largest number of bytes that one character can occupy in the given  encoding format. Pass U\_CURRENT to represent the current format. Example:

```
   char *temp_buffer = malloc(256 * uwidth_max(U_UTF8));
```

## SEE ALSO

[**uwidth**(3alleg)](/uwidth/3alleg.md), [**ucwidth**(3alleg)](/ucwidth/3alleg.md)
