Stephen J. Turnbull wrote: > Robert Brewer writes: > > > Syntactically, there's no sense in providing: > > > > Message.set_header('Subject', 'Some text', encoding='utf-16') > > > > ...since you could more clearly write the same as: > > > > Message.set_header('Subject', 'Some text'.encode('utf-16')) > > Which you now must *parse* and guess the encoding to determine how to > RFC-2047-encode the binary mush. I think the encoding parameter is > necessary here. Indeed. > > But it would be far easier to do all the encoding at once in an > > output() or serialize() method. Do different headers need different > > encodings? > > You can have multiple encodings within a single header (and a naïve "can" and "should" are two very different things. When is it even a good idea to have more than one encoding in a single header? Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4