1 .\"***************************************************************************
2 .\" Copyright 2020-2023,2024 Thomas E. Dickey *
3 .\" Copyright 2005-2016,2017 Free Software Foundation, Inc. *
5 .\" Permission is hereby granted, free of charge, to any person obtaining a *
6 .\" copy of this software and associated documentation files (the *
7 .\" "Software"), to deal in the Software without restriction, including *
8 .\" without limitation the rights to use, copy, modify, merge, publish, *
9 .\" distribute, distribute with modifications, sublicense, and/or sell *
10 .\" copies of the Software, and to permit persons to whom the Software is *
11 .\" furnished to do so, subject to the following conditions: *
13 .\" The above copyright notice and this permission notice shall be included *
14 .\" in all copies or substantial portions of the Software. *
16 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
17 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
18 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
19 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
20 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
21 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
22 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
24 .\" Except as contained in this notice, the name(s) of the above copyright *
25 .\" holders shall not be used in advertising or otherwise to promote the *
26 .\" sale, use or other dealings in this Software without prior written *
28 .\"***************************************************************************
30 .\" Author: Thomas E. Dickey
32 .\" $Id: legacy_coding.3x,v 1.28 2024/04/20 19:13:50 tom Exp $
33 .TH legacy_coding 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls"
35 \fB\%use_legacy_coding\fP \-
36 override \fIcurses\fR locale encoding checks
39 \fB#include <curses.h>
41 \fBint use_legacy_coding(int \fIlevel\fP);
44 .B \%use_legacy_coding
45 is an extension to the
48 It allows the caller to change the result of \fB\%unctrl\fP(3X),
49 suppressing \fI\%isprint\fP(3)-based checks within the library that
50 would normally cause nonprinting characters to be rendered in visible
52 The alteration affects only eight-bit characters.
56 parameter controls the result.
60 The library functions normally,
61 rendering nonprinting characters as described in \fB\%unctrl\fP(3X),
66 for codes in the range 160-255.
71 for codes in the range 128-255.
72 It also modifies the output of \fB\%unctrl\fP(3X),
73 showing codes in the range 128-159 as is.
76 If the screen has not been initialized,
79 parameter is out of range,
80 .B \%use_legacy_coding
84 it returns the previous level:
90 .B \%use_legacy_coding
93 It was not supported on Version 7, BSD or System V implementations.
94 Applications employing
96 extensions should condition their use on the visibility of the
101 (to support \fI\%lynx\fP(1)'s font-switching feature).