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

isspace(0xa0) is true on Mac OS X #51321

Closed
methane opened this issue Oct 6, 2009 · 3 comments
Closed

isspace(0xa0) is true on Mac OS X #51321

methane opened this issue Oct 6, 2009 · 3 comments
Assignees
Labels
OS-mac type-bug An unexpected behavior, bug, or error

Comments

@methane
Copy link
Member

methane commented Oct 6, 2009

BPO 7072
Nosy @ronaldoussoren, @methane
Files
  • issue7072.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 = 'https://github.com/ronaldoussoren'
    closed_at = <Date 2010-04-18.15:12:12.463>
    created_at = <Date 2009-10-06.14:07:43.982>
    labels = ['OS-mac', 'type-bug']
    title = 'isspace(0xa0) is true on Mac OS X'
    updated_at = <Date 2010-04-18.15:12:12.461>
    user = 'https://github.com/methane'

    bugs.python.org fields:

    activity = <Date 2010-04-18.15:12:12.461>
    actor = 'ronaldoussoren'
    assignee = 'ronaldoussoren'
    closed = True
    closed_date = <Date 2010-04-18.15:12:12.463>
    closer = 'ronaldoussoren'
    components = ['macOS']
    creation = <Date 2009-10-06.14:07:43.982>
    creator = 'methane'
    dependencies = []
    files = ['16481']
    hgrepos = []
    issue_num = 7072
    keywords = ['patch', 'needs review']
    message_count = 3.0
    messages = ['93650', '100575', '103494']
    nosy_count = 2.0
    nosy_names = ['ronaldoussoren', 'methane']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue7072'
    versions = ['Python 2.6', 'Python 3.1', 'Python 2.7', 'Python 3.2']

    @methane
    Copy link
    Member Author

    methane commented Oct 6, 2009

    Old FreeBSD's libc has a bug relate to utf-8 locale and Python have
    patch for it: http://svn.python.org/view/python/trunk/Include/pyport.h?
    view=diff&pathrev=43219&r1=36792&r2=36793

    This bug appears in Mac OS X again. This test fails:
    >>> s = '\xa0'
    >>> assert s.strip() == s
    >>> import locale
    >>> locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
    'en_US.UTF-8'
    >>> assert s.strip() == s

    So above patch should be enabled for Mac OS X.

    @methane methane added the type-bug An unexpected behavior, bug, or error label Oct 6, 2009
    @ronaldoussoren
    Copy link
    Contributor

    I've attached a patch that fixes the issue and enables all test_locale tests on OSX 10.6.

    (I will test if the tests can also be enabled on 10.5 when applying the patch).

    @ronaldoussoren
    Copy link
    Contributor

    Fixed in r80178 (trunk), r80180 (2.6), r80182 (3.2), r80183 (3.1)

    @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
    OS-mac type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants