Another 2 to 3 mail encoding problem
Barry Scott
barry at barrys-emacs.org
Thu Aug 27 12:29:54 EDT 2020
> On 26 Aug 2020, at 16:10, Chris Green <cl at isbd.net> wrote:
>
> UnicodeEncodeError: 'ascii' codec can't encode character '\ufeff' in position 4: ordinal not in range(128)
>
> So what do I need to do to the message I'm adding with mbx.add(msg) to
> fix this? (I assume that's what I need to do).
>>> import unicodedata
>>> unicodedata.name('\ufeff')
'ZERO WIDTH NO-BREAK SPACE'
I guess the editor you use to compose the text is adding that to your message.
Barry
More information about the Python-list
mailing list