Skip to content

curses.textpad should support UTF-8 unicode characters #133031

Closed

Description

@sijanec

Feature or enhancement

Proposal:

curses.textpad does not support UTF-8/Unicode characters, they are silently ignored when editing.

It would be useful to add support for Unicode characters.

Minimal reproducible code: Type š into the editing textbox and observe nothing happens.

import curses.textpad
import atexit
atexit.register(curses.endwin)
w = curses.initscr()
curses.noecho()
curses.textpad.Textbox(w).edit()

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Activity

  1. donbarbos commented on Apr 27, 2025

    @donbarbos
    Contributor

    sounds like good idea. would you like to submit a PR yourself?
    (I'm not a core dev, I'm asking because I'm also interested in the task)

    cc @Yhg1s as curses expert

  2. added 2 commits that reference this issue on Jun 28, 2026
  3. serhiy-storchaka commented on Jun 29, 2026

    @serhiy-storchaka
    Member

    Implemented. curses.textpad.Textbox now accepts non-ASCII characters from 8-bit locales (#152451), backported to 3.13, 3.14 and 3.15. Full Unicode support, including combining characters (#152482), relies on functions added only in 3.16 and is therefore available in 3.16+ only.

    Thanks @sijanec for the report!

  4. added 5 commits that reference this issue on Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension-modulesC modules in the Modules dirtype-featureA feature request or enhancement

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions