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 ldeller, lemburg, loewis
Date 2010-02-09.11:14:51
SpamBayes Score 1.1232245e-09
Marked as misclassified No
Message-id <4B7143A9.7080207@egenix.com>
In-reply-to <1265711894.31.0.637310808217.issue7890@psf.upfronthosting.co.za>
Content
lplatypus wrote:
> 
> lplatypus <luke@deller.id.au> added the comment:
> 
> Okay thanks, but in that case might I suggest that this limitation be mentioned in the documentation for sys.setdefaultencoding?  It currently reads as if any available encoding is acceptable. Perhaps even a warning or exception should be produced when calling it wrongly?
> 
> Other places that may need review include:
> - the programming FAQ on python.org which presents the option of calling setdefaultencoding('mbcs') on windows ( http://www.python.org/doc/faq/programming/#what-does-unicodeerror-ascii-decoding-encoding-error-ordinal-not-in-range-128-mean )
> - the comments in site.py which provoke changing the default encoding
> - PEP100 which suggests enabling this code in site.py
> 
> BTW would patches ever be considered to fix issues such as this with using other encodings as default encodings, or is there some objection to the concept?

No, Python 2.x's Unicode implementation only supports ASCII as default
encoding. In Python 3.x, UTF-8 is used as default encoding.

Note that this limitation only affects cases where you mix string
and Unicode objects used as keys in a dictionary. If you avoid
this situation, there are no dictionary problems with using
different default encoding. However, you may run into other problems.
History
Date User Action Args
2010-02-09 11:14:55lemburgsetrecipients: + lemburg, loewis, ldeller
2010-02-09 11:14:52lemburglinkissue7890 messages
2010-02-09 11:14:51lemburgcreate