This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author reingart
Recipients amaury.forgeotdarc, belopolsky, ezio.melotti, reingart
Date 2012-10-28.21:22:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1351459364.0.0.828109783108.issue9769@psf.upfronthosting.co.za>
In-reply-to
Content
(moved from issue #16343)

Working in an internationalization proposal <http://python.org.ar/pyar/TracebackInternationalizationProposal> (issue #16344)
I've stopped at this problem (#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:
- 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
History
Date User Action Args
2012-10-28 21:22:44reingartsetrecipients: + reingart, amaury.forgeotdarc, belopolsky, ezio.melotti
2012-10-28 21:22:44reingartsetmessageid: <1351459364.0.0.828109783108.issue9769@psf.upfronthosting.co.za>
2012-10-28 21:22:43reingartlinkissue9769 messages
2012-10-28 21:22:43reingartcreate