legacy_coding(3x) — Linux manual page

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | EXTENSIONS | PORTABILITY | HISTORY | AUTHORS | SEE ALSO | COLOPHON

legacy_coding(3X)             Library calls             legacy_coding(3X)

NAME         top

       use_legacy_coding - override curses locale encoding checks

SYNOPSIS         top

       #include <curses.h>

       int use_legacy_coding(int level);

DESCRIPTION         top

       use_legacy_coding, an ncurses extension to the curses library,
       permits customiztion of unctrl(3X) behavior, suppressing
       isprint(3)-based checks within the library that would normally
       cause nonprinting characters to be rendered in visible form.  The
       alteration affects only byte-wide characters with the most
       significant bit set.

       The level parameter controls the result.

              0    The library functions normally, rendering nonprinting
                   characters as described in unctrl(3X),

              1    the library ignores isprint for codes in the range
                   160-255.

              2    the library ignores isprint for codes in the range
                   128-255.  It also modifies the output of unctrl(3X),
                   showing codes in the range 128-159 as is.

RETURN VALUE         top

       If the curses screen has not been initialized, or the level
       parameter is out of range, use_legacy_coding returns ERR.
       Otherwise, it returns the previous level.

EXTENSIONS         top

       use_legacy_coding is an ncurses extension.

PORTABILITY         top

       Applications employing ncurses extensions should condition their
       use on the visibility of the NCURSES_VERSION preprocessor macro.

HISTORY         top

       ncurses 5.6 (2006) introduced use_legacy_coding to support
       lynx(1)'s font-switching feature.

AUTHORS         top

       Thomas Dickey

SEE ALSO         top

       unctrl(3X)

COLOPHON         top

       This page is part of the ncurses (new curses) project.
       Information about the project can be found at 
       ⟨https://invisible-island.net/ncurses/ncurses.html⟩.  If you have a
       bug report for this manual page, send it to bug-ncurses@gnu.org.
       This page was obtained from the tarball ncurses-6.6.tar.gz fetched
       from ⟨https://ftp.gnu.org/gnu/ncurses/⟩ on 2026-01-16.  If you
       discover any rendering problems in this HTML version of the page,
       or you believe there is a better or more up-to-date source for the
       page, or you have corrections or improvements to the information
       in this COLOPHON (which is not part of the original manual page),
       send a mail to man-pages@man7.org

ncurses @NCURSES_MAJOR@.@NCU... 2024-09-14              legacy_coding(3X)