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

narrow build incorrectly translates cases for non-BMP code points #51912

Closed
exarkun mannequin opened this issue Jan 10, 2010 · 4 comments
Closed

narrow build incorrectly translates cases for non-BMP code points #51912

exarkun mannequin opened this issue Jan 10, 2010 · 4 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-unicode type-bug An unexpected behavior, bug, or error

Comments

@exarkun
Copy link
Mannequin

exarkun mannequin commented Jan 10, 2010

BPO 7663
Nosy @malemburg, @loewis, @amauryfa, @ezio-melotti

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-01-10.18:00:12.148>
created_at = <Date 2010-01-10.05:27:27.444>
labels = ['interpreter-core', 'type-bug', 'expert-unicode']
title = 'narrow build incorrectly translates cases for non-BMP code points'
updated_at = <Date 2010-11-27.23:31:48.173>
user = 'https://bugs.python.org/exarkun'

bugs.python.org fields:

activity = <Date 2010-11-27.23:31:48.173>
actor = 'ezio.melotti'
assignee = 'none'
closed = True
closed_date = <Date 2010-01-10.18:00:12.148>
closer = 'lemburg'
components = ['Interpreter Core', 'Unicode']
creation = <Date 2010-01-10.05:27:27.444>
creator = 'exarkun'
dependencies = []
files = []
hgrepos = []
issue_num = 7663
keywords = []
message_count = 4.0
messages = ['97500', '97501', '97529', '122569']
nosy_count = 6.0
nosy_names = ['lemburg', 'loewis', 'exarkun', 'amaury.forgeotdarc', 'Rhamphoryncus', 'ezio.melotti']
pr_nums = []
priority = 'normal'
resolution = 'duplicate'
stage = 'test needed'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue7663'
versions = ['Python 2.7']

@exarkun
Copy link
Mannequin Author

exarkun mannequin commented Jan 10, 2010

This issue may extend beyond just unicode.upper() and unicode.lower(), but it's very clear with these two methods, at least.

For example, consider DESERET SMALL LETTER EW. On a UTF-16 build, calling upper on a string containing this doesn't change it to the capital variation (DESERET CAPITAL LETTER EW):

>>> u'\N{DESERET SMALL LETTER EW}'.upper() == u'\N{DESERET SMALL LETTER EW}'
True

It can also be seen that this isn't even recognized as lower case:

>>> u'\N{DESERET SMALL LETTER EW}'.islower()
False

With a UTF-32 build, however, the expected behavior (ie, the behavior one would get for a code point in the BMP with small and capital variations) is provided.

@exarkun exarkun mannequin added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Jan 10, 2010
@Rhamphoryncus
Copy link
Mannequin

Rhamphoryncus mannequin commented Jan 10, 2010

See also bpo-5127.

@ezio-melotti ezio-melotti added topic-unicode type-bug An unexpected behavior, bug, or error labels Jan 10, 2010
@malemburg
Copy link
Member

This is a duplicate of http://bugs.python.org/issue5127

@malemburg malemburg changed the title UTF-16 build incorrectly translates cases for non-BMP code points UCS4 build incorrectly translates cases for non-BMP code points Jan 10, 2010
@ezio-melotti
Copy link
Member

This is not yet fixed but will be addressed in bpo-10521 and bpo-10542.

@ezio-melotti ezio-melotti changed the title UCS4 build incorrectly translates cases for non-BMP code points narrow build incorrectly translates cases for non-BMP code points Nov 27, 2010
@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 type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants