On approximately 10/8/2009 3:39 PM, came the following characters from the keyboard of Barry Warsaw:
On Oct 8, 2009, at 5:59 PM, Glenn Linderman wrote:

So to prepend into a text header, you shouldn't need to decode the undecodable...

Except that you also have to collapse Re:'s and move them to the front of the string.

Well, that is a feature of some mailing list programs. Those that want to do that, will have to decode and re-encode.

However, there are definitely mailing lists that don't do that. Google Groups is one example that doesn't collapse, and always prepends the headers in front of Re:. Seems like all the Python lists do the collapsing (I wonder why! :) ) Other lists don't do prepending (I think the RFCs recommend not prepending in Subject, actually), of the others I'm subscribed to, that prepend, some collapse and some don't.

I'm saying that there are use cases where prepending could be done without decoding; while you are positing use cases where that is insufficient, but you shouldn't have said "Except"... you should have said "There are also other use cases".

And when you collapse Re:, do you also collapse various language-specific spellings of Re: ??? that is a hard problem.

And don't forget removing the prior prepended text before adding the new prepended text.

Actually, as long as the prepended text is ASCII, all that work can be done on the encoded value. When it is not ASCII, it may still be separated and recognizable. Still that logic is more complex than decoding, handling as Unicode, and encoding.... when it works. Just pointing out that there is more than one way to do things...

--
Glenn -- http://nevcal.com/
===========================
A protocol is complete when there is nothing left to remove.
-- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking

_______________________________________________
Email-SIG mailing list
Email-SIG@python.org
Your options: 
http://mail.python.org/mailman/options/email-sig/archive%40mail-archive.com

Reply via email to