Skip to content

bpo-41091: Remove recommendation in curses module documentation to initialize LC_ALL and encode strings #21159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions Doc/library/curses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,6 @@ Linux and the BSD variants of Unix.
Whenever the documentation mentions a *character string* it can be specified
as a Unicode string or a byte string.

.. note::

Since version 5.4, the ncurses library decides how to interpret non-ASCII data
using the ``nl_langinfo`` function. That means that you have to call
:func:`locale.setlocale` in the application and encode Unicode strings
using one of the system's available encodings. This example uses the
system's default encoding::

import locale
locale.setlocale(locale.LC_ALL, '')
code = locale.getpreferredencoding()

Then use *code* as the encoding for :meth:`str.encode` calls.

.. seealso::

Module :mod:`curses.ascii`
Expand Down