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 pitrou
Recipients electronixtar, pitrou
Date 2008-08-22.15:35:16
SpamBayes Score 0.013391162
Marked as misclassified No
Message-id <1219419319.38.0.751572287321.issue3648@psf.upfronthosting.co.za>
In-reply-to
Content
> Sometimes 
> encoding problems in Python are driving me mad.

The thing is, they are not "encoding problems in Python", they are
encoding problems in the outside world. Python cannot know magically
which encoding is used in third-party data, so you have to tell it
yourself what the encoding is.

The default is "ascii" because only ASCII chars (from 32 to 127) can be
interpreted properly in most situations without having any knowledge of
the encoding (barring obsolete stuff such as EBCDIC, that is).

The only solution is to know what encoding you are expecting and
decode/encode it yourself. Python can't decide it for you.
History
Date User Action Args
2008-08-22 15:35:19pitrousetrecipients: + pitrou, electronixtar
2008-08-22 15:35:19pitrousetmessageid: <1219419319.38.0.751572287321.issue3648@psf.upfronthosting.co.za>
2008-08-22 15:35:18pitroulinkissue3648 messages
2008-08-22 15:35:17pitroucreate