You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PyUnicode_FromFormatV() doesn't support utf-8 text #60547
Beside my proposal, I think utf-8 should be supported for consistency with the other unicode functions, like PyUnicode_FromString() or even unicode_fromformat_arg()
Attached is a patch that:
enhanced the iterator to detect multibyte sequences, with sanity checks about start & continuation bytes
replaced unicode_write_cstr with PyUnicode_DecodeUTF8Stateful
tests
Hope it helps, this is my first patch for cpython and my C skills are a bit rusty, so excuse me if there is any newbie glitch
Shouldn't this patch be attached to the referenced bpo-9769 instead of creating a new issue? Even the issue title is nearly the same:
9769: PyUnicode_FromFormatV() doesn't handle non-ascii text correctly
16343: PyUnicode_FromFormatV() doesn't support utf-8 text
reingart commented on Oct 28, 2012
reingartmannequin
MannequinAuthor
More actions
I thought bpo-9769 was closed (in fact, that patch was already applied).
Now, PyUnicode_FromFormatV() doesn't handle non-ascii text at all.
Maybe I misread the part telling to open a new issue in the comments, sorry for that.
bpo-9769 is still open. It looks like there was some disagreement in the comments between Alexander and Victor as to whether a new issue should be created (since Victor had a different idea when first opening the issue), but it looks like Victor deferred to Alexander in his final comment.
I will close this issue as a duplicate, and if you could repost your patch on the other issue, that would be great. The discussion there is relevant to your patch.
Activity
reingart commentedon Oct 28, 2012
Working in an internationalization proposal <http://python.org.ar/pyar/TracebackInternationalizationProposal\>
I've stopped at bpo-9769 where multi byte encodings (like utf-8) is not supported by PyUnicode_FromFormatV()
Beside my proposal, I think utf-8 should be supported for consistency with the other unicode functions, like PyUnicode_FromString() or even unicode_fromformat_arg()
Attached is a patch that:
Hope it helps, this is my first patch for cpython and my C skills are a bit rusty, so excuse me if there is any newbie glitch
cjerdonek commentedon Oct 28, 2012
Shouldn't this patch be attached to the referenced bpo-9769 instead of creating a new issue? Even the issue title is nearly the same:
9769: PyUnicode_FromFormatV() doesn't handle non-ascii text correctly
16343: PyUnicode_FromFormatV() doesn't support utf-8 text
reingart commentedon Oct 28, 2012
I thought bpo-9769 was closed (in fact, that patch was already applied).
Now, PyUnicode_FromFormatV() doesn't handle non-ascii text at all.
Maybe I misread the part telling to open a new issue in the comments, sorry for that.
cjerdonek commentedon Oct 28, 2012
bpo-9769 is still open. It looks like there was some disagreement in the comments between Alexander and Victor as to whether a new issue should be created (since Victor had a different idea when first opening the issue), but it looks like Victor deferred to Alexander in his final comment.
I will close this issue as a duplicate, and if you could repost your patch on the other issue, that would be great. The discussion there is relevant to your patch.