set_uformat(3alleg4)

set_uformat3alleg4

Set the global current text encoding format. allegro game programming library.

Usage

#include <allegro.h>

void set_uformat(int type);

Overview

Sets the current text encoding format. This will affect all parts of Allegro, wherever you see a function that returns a char *, or takes a char * as a parameter. `type' should be one of these values:

   U_ASCII     - fixed size, 8-bit ASCII characters
   U_ASCII_CP  - alternative 8-bit codepage (see set_ucodepage())
   U_UNICODE   - fixed size, 16-bit Unicode characters
   U_UTF8      - variable size, UTF-8 format Unicode characters

Although you can change the text format on the fly, this is not a good idea. Many strings, for example the names of your hardware drivers and any language translations, are loaded when you call allegro_init(), so if you change the encoding format after this, they will be in the wrong format, and things will not work properly. Generally you should only call set_uformat() once, before allegro_init(), and then leave it on the same setting for the duration of your program.

Releases

7 releases since Debian 7 (Wheezy); the text changed 1 time.

  1. 7–10
  2. 11–13

From allegro4-doc 2:4.4.3.1-5 in Debian 13 (Trixie). Parsed by carta from the page's man source.