Skip to content

bz2: support surrogates in filename, and bytes/bytearray filename #52714

Closed

Description

@vstinner
BPO 8468
Nosy @vstinner
Files
  • bz2_surrogates.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 2010-04-23.11:19:57.868>
    created_at = <Date 2010-04-20.12:12:47.849>
    labels = ['library', 'expert-unicode']
    title = 'bz2: support surrogates in filename, and bytes/bytearray filename'
    updated_at = <Date 2010-04-23.11:19:57.866>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2010-04-23.11:19:57.866>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2010-04-23.11:19:57.868>
    closer = 'vstinner'
    components = ['Library (Lib)', 'Unicode']
    creation = <Date 2010-04-20.12:12:47.849>
    creator = 'vstinner'
    dependencies = []
    files = ['17006']
    hgrepos = []
    issue_num = 8468
    keywords = ['patch']
    message_count = 2.0
    messages = ['103696', '104004']
    nosy_count = 1.0
    nosy_names = ['vstinner']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue8468'
    versions = ['Python 3.1', 'Python 3.2']

    Activity

    1. vstinner commented on Apr 20, 2010

      @vstinner
      MemberAuthor

      bz2 uses "s" format to parse the filename argument: it uses the default (unicode) encoding to encode the unicode filename to a byte string. It should use the default file system encoding instead.

      It should also support surrogates in unicode filename and bytes/bytearray filenames.

      Attached patch uses PyUnicode_FSConverter() to implement that.

    2. vstinner commented on Apr 23, 2010

      @vstinner
      MemberAuthor

      Commited: r80402 (py3k), r80403 (3.1).

    3. transferred this issue fromon Apr 10, 2022
    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

      stdlibStandard Library Python modules in the Lib/ directorytopic-unicode

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions