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 jelie
Recipients jelie, r.david.murray
Date 2010-11-01.20:50:09
SpamBayes Score 0.0
Marked as misclassified No
Message-id <1288644612.25.0.575505223196.issue10284@psf.upfronthosting.co.za>
In-reply-to
Content
Traceback (most recent call last):
  File "nntplib-test.py", line 10, in <module>
    print(s.descriptions('*'))
  File "C:\Program Files\Python32\lib\encodings\cp850.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_map)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 3285-3287: character maps to <undefined>


The code was previously working fine with Python 3.1.



Looking more in details:

(resp, descs) = s.descriptions('*')

clefs = list(descs.keys())
clefs.sort()
for clef in clefs:
    print(clef), print(b[clef])



Traceback (most recent call last):
  File "nntplib-test.py", line 14, in <module>
    print(clef), print(b[clef])
  File "C:\Program Files\Python32\lib\encodings\cp850.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_map)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u0152' in position 0: character maps to <undefined>


That is another error.  It corresponds to a description containing « Œ », yet in UTF-8.

So you mean the issue comes from the MS-DOS console I am using.
Well, that seems right.
No problem in the Python IDLE!

Maybe this issue should be closed then?

(Yet, something changed because print() worked fine with the previous version...)
History
Date User Action Args
2010-11-01 20:50:12jeliesetrecipients: + jelie, r.david.murray
2010-11-01 20:50:12jeliesetmessageid: <1288644612.25.0.575505223196.issue10284@psf.upfronthosting.co.za>
2010-11-01 20:50:10jelielinkissue10284 messages
2010-11-01 20:50:09jeliecreate