Re: Getting RFC 2047 encoding right
2003-12-08 11:30:29
Keith Moore writes:
Do you consider sorting a "display purpose"? How about searching
given some user input?
seems fine to me.
Well, I do search, and it's extremely expensive to decode all the
messages in order to do a search. To search, I must decode when the
message goes into the data store.
Storing two instances of the same header is also not a good answer.
First of all, it's bad practice. Never keep two separate variables that
are supposed to stay in sync.
Second, it only solves the common case - if I go down that path I have
problems again soon enough. Suppose I want to answer a message which
had an overlong encoded-word. Should I blithely emit overlong
encoded-words? Suppose I want to answer with "subject: re: <original>
<ticket id>", then I risk having two encoded-words separated only by
whitespace, and must do magic in order to preserve that space.
I don't like adding hacks like the "store twice" if I have the same
problem again five minutes later.
--Arnt
|
|