1legacy_coding(3X) legacy_coding(3X)
2
3
4
6 use_legacy_coding - override locale-encoding checks
7
9 #include <curses.h>
10
11 int use_legacy_coding(int level);
12
14 The use_legacy_coding function is an extension to the curses library.
15 It allows the caller to change the result of unctrl, and suppress
16 related checks within the library that would normally cause nonprinting
17 characters to be rendered in visible form. This affects only 8-bit
18 characters.
19
20 The level parameter controls the result:
21
22 0 the library functions normally, rendering nonprinting char‐
23 acters as described in unctrl.
24
25 1 the library ignores isprintf for codes in the range
26 160-255.
27
28 2 the library ignores isprintf for codes in the range
29 128-255. It also modifies the output of unctrl, showing
30 codes in the range 128-159 as is.
31
33 If the screen has not been initialized, or the level parameter is out
34 of range, the function returns ERR. Otherwise, it returns the previous
35 level: 0, 1 or 2.
36
38 This routine is specific to ncurses. It was not supported on Version
39 7, BSD or System V implementations. It is recommended that any code
40 depending on ncurses extensions be conditioned using NCURSES_VERSION.
41
43 unctrl.
44
46 Thomas Dickey (to support lynx's font-switching feature).
47
48
49
50 legacy_coding(3X)