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 lemburg
Recipients amaury.forgeotdarc, doerwalter, eric.smith, ezio.melotti, flox, lemburg, vstinner
Date 2010-02-24.10:50:15
SpamBayes Score 3.747033e-09
Marked as misclassified No
Message-id <4B850466.6070002@egenix.com>
In-reply-to <1267007974.74.0.393146059765.issue7649@psf.upfronthosting.co.za>
Content
Amaury Forgeot d'Arc wrote:
> 
> Amaury Forgeot d'Arc <amauryfa@gmail.com> added the comment:
> 
>>> But why is it necessary to check for chars above 0x7f?
>> The Python default encoding has to be ASCII compatible,
> Yes, but it is not necessarily as strict.
> for example, after I manage to set the default encoding to latin-1,
> u"%s" % chr(0x80) works; I suppose %c should do the same.

Right and it will.

I only meant the check as fast-path for characters <0x80. All
other characters would need to go through PyUnicode_Decode().

We can use such a fast-path, since the default encoding has to
be ASCII compatible.
History
Date User Action Args
2010-02-24 10:50:17lemburgsetrecipients: + lemburg, doerwalter, amaury.forgeotdarc, vstinner, eric.smith, ezio.melotti, flox
2010-02-24 10:50:15lemburglinkissue7649 messages
2010-02-24 10:50:15lemburgcreate