---
name: "al_utf8_width"
section: "3"
platform: "linux"
package: "allegro"
version: "5.2.11.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/al_utf8_width"
---

# al\_utf8\_width(3)

Allegro 5 API

## NAME

al\_utf8\_width - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  size_t al_utf8_width(int32_t c)
  ```

## DESCRIPTION

Returns the number of bytes that would be occupied by the specified code point when encoded in UTF-8. This is between 1 and 4 bytes for legal code point values. Otherwise returns 0.

## SEE ALSO

[al\_utf8\_encode(3)](/al_utf8_encode/3.md), [al\_utf16\_width(3)](/al_utf16_width/3.md)
