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 vstinner
Recipients doerwalter, eric.smith, ezio.melotti, vstinner
Date 2010-01-07.01:55:44
SpamBayes Score 5.369207e-05
Marked as misclassified No
Message-id <1262829346.69.0.731343511263.issue7649@psf.upfronthosting.co.za>
In-reply-to
Content
The problem is the cast char => Py_UNICODE in formatchar() function. char may be unsigned, but most of the time it's signed. signed => unsigned cast extend the sign. Example: (unsigned short)(signed char)0x80 gives 0xFF80.

Attached patch fixes the issue and includes an unit test.
History
Date User Action Args
2010-01-07 01:55:46vstinnersetrecipients: + vstinner, doerwalter, eric.smith, ezio.melotti
2010-01-07 01:55:46vstinnersetmessageid: <1262829346.69.0.731343511263.issue7649@psf.upfronthosting.co.za>
2010-01-07 01:55:45vstinnerlinkissue7649 messages
2010-01-07 01:55:45vstinnercreate