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

# get\_uformat(3alleg)

Finds out what text encoding format is currently selected. Allegro game programming library.

## NAME

get\_uformat - Finds out what text encoding format is currently selected. Allegro game programming library.

## SYNOPSIS

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

**int get\_uformat(void);**

## DESCRIPTION

Finds out what text encoding format is currently selected. This function is probably useful only if you are writing an Allegro addon dealing with text strings and you use a different codepath for each possible format. Example:

```
   switch(get_uformat()) {
      case U_ASCII:
         do_something();
         break;
      case U_UTF8:
         do_something_else();
         break;
      ...
   }
```

## RETURN VALUE

Returns the currently selected text encoding format. See the documentation of set\_uformat() for a list of encoding formats.

## SEE ALSO

[**set\_uformat**(3alleg)](/set_uformat/3alleg.md)
