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

%c format does not accept large numbers on ucs-2 builds #47530

Closed
amauryfa opened this issue Jul 4, 2008 · 2 comments
Closed

%c format does not accept large numbers on ucs-2 builds #47530

amauryfa opened this issue Jul 4, 2008 · 2 comments
Labels
topic-unicode type-bug An unexpected behavior, bug, or error

Comments

@amauryfa
Copy link
Member

amauryfa commented Jul 4, 2008

BPO 3280
Nosy @amauryfa

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 2008-07-04.21:31:38.123>
created_at = <Date 2008-07-04.09:02:02.202>
labels = ['type-bug', 'expert-unicode']
title = '%c format does not accept large numbers on ucs-2 builds'
updated_at = <Date 2008-07-04.21:31:38.099>
user = 'https://github.com/amauryfa'

bugs.python.org fields:

activity = <Date 2008-07-04.21:31:38.099>
actor = 'amaury.forgeotdarc'
assignee = 'none'
closed = True
closed_date = <Date 2008-07-04.21:31:38.123>
closer = 'amaury.forgeotdarc'
components = ['Unicode']
creation = <Date 2008-07-04.09:02:02.202>
creator = 'amaury.forgeotdarc'
dependencies = []
files = []
hgrepos = []
issue_num = 3280
keywords = []
message_count = 2.0
messages = ['69247', '69268']
nosy_count = 1.0
nosy_names = ['amaury.forgeotdarc']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue3280'
versions = ['Python 3.0']

@amauryfa
Copy link
Member Author

amauryfa commented Jul 4, 2008

Since python3.0, chr(0x2f81a) works even on narrow Unicode builds, but 
>>> "%c" % 0x2f81a
OverflowError: %c arg not in range(0x10000) (narrow Python build)

Likewise, Py_BuildValue("C") should accept codes outside the BMP.

@amauryfa
Copy link
Member Author

amauryfa commented Jul 4, 2008

Committed as r64717.

@amauryfa amauryfa closed this as completed Jul 4, 2008
@amauryfa amauryfa added the type-bug An unexpected behavior, bug, or error label Jul 4, 2008
@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
topic-unicode type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant