Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b5b9009a
Commit
b5b9009a
authored
Jan 19, 2008
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Amend curses docs by info how to write non-ascii characters.
Thanks to Jeroen Ruigrok van der Werven.
parent
1f95081d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
Doc/library/curses.rst
Doc/library/curses.rst
+13
-0
No files found.
Doc/library/curses.rst
View file @
b5b9009a
...
@@ -19,6 +19,19 @@ for DOS, OS/2, and possibly other systems as well. This extension module is
...
@@ -19,6 +19,19 @@ for DOS, OS/2, and possibly other systems as well. This extension module is
designed to match the API of ncurses, an open-source curses library hosted on
designed to match the API of ncurses, an open-source curses library hosted on
Linux and the BSD variants of Unix.
Linux and the BSD variants of Unix.
.. 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 use one of the system's
available encodings to encode Unicode strings with it. 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::
.. seealso::
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment