Message71753
> 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. |
|
Date |
User |
Action |
Args |
2008-08-22 15:35:19 | pitrou | set | recipients:
+ pitrou, electronixtar |
2008-08-22 15:35:19 | pitrou | set | messageid: <1219419319.38.0.751572287321.issue3648@psf.upfronthosting.co.za> |
2008-08-22 15:35:18 | pitrou | link | issue3648 messages |
2008-08-22 15:35:17 | pitrou | create | |
|