1need_uconvert(3) Allegro manual need_uconvert(3)
2
3
4
6 need_uconvert - Tells if a string requires encoding conversion. Allegro
7 game programming library.
8
10 #include <allegro.h>
11
12
13 int need_uconvert(const char *s, int type, int newtype);
14
16 Given a pointer to a string (`s'), a description of the type of the
17 string (`type'), and the type that you would like this string to be
18 converted into (`newtype'), this function tells you whether any conver‐
19 sion is required. No conversion will be needed if `type' and `newtype'
20 are the same, or if one type is ASCII, the other is UTF-8, and the
21 string contains only character values less than 128. As a convenience
22 shortcut, you can pass the value U_CURRENT as either of the type param‐
23 eters, to represent whatever text encoding format is currently
24 selected. Example:
25
26 if (need_uconvert(text, U_UTF8, U_CURRENT)) {
27 /* conversion is required */
28 }
29
31 Returns non-zero if any conversion is required or zero otherwise.
32
33
35 set_uformat(3), get_uformat(3), do_uconvert(3), uconvert(3)
36
37
38
39Allegro version 4.4.2 need_uconvert(3)