Skip to content
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

PyUnicode_FromFormatV("%c") doesn't support non-BMP characters on narrow build #55039

Closed
vstinner opened this issue Jan 5, 2011 · 3 comments
Closed
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-unicode

Comments

@vstinner
Copy link
Member

vstinner commented Jan 5, 2011

BPO 10830
Nosy @amauryfa, @vstinner
Files
  • pyunicode_fromformatv_c.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2011-02-23.12:14:35.375>
    created_at = <Date 2011-01-05.01:43:11.459>
    labels = ['interpreter-core', 'expert-unicode']
    title = 'PyUnicode_FromFormatV("%c") doesn\'t support non-BMP characters on narrow build'
    updated_at = <Date 2011-02-23.12:14:35.374>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2011-02-23.12:14:35.374>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2011-02-23.12:14:35.375>
    closer = 'vstinner'
    components = ['Interpreter Core', 'Unicode']
    creation = <Date 2011-01-05.01:43:11.459>
    creator = 'vstinner'
    dependencies = []
    files = ['20265']
    hgrepos = []
    issue_num = 10830
    keywords = ['patch']
    message_count = 3.0
    messages = ['125393', '128997', '129181']
    nosy_count = 2.0
    nosy_names = ['amaury.forgeotdarc', 'vstinner']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue10830'
    versions = ['Python 3.2', 'Python 3.3']

    @vstinner
    Copy link
    Member Author

    vstinner commented Jan 5, 2011

    PyUnicode_FromFormatV("%c") supposes that an unicode character is always stored as a single Py_UNICODE word: but that's wrong on narrow build with characters in [U+10000; U+10FFFF].

    Attached patch fixes this bug.

    See also bpo-10829.

    @vstinner vstinner added interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-unicode labels Jan 5, 2011
    @vstinner
    Copy link
    Member Author

    Fixed in 3.3 (r88481).

    Keep it open to backport it maybe to 3.2 later.

    @vstinner
    Copy link
    Member Author

    Fixed in 3.2 too (r88532).

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-unicode
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant