[usmt dev]Encoding binary data in headers?
Mon, 12 Feb 2001 11:30:13 -0500 (EST)
I'd like to hear some comments on the best way to encode binary data in
our RFC822-lookalike format.
Here are two options i'm considering:
Option 1: Encode any taboo character with its backslash-octal equivalent
(i.e. Ctrl-A would be \001). Backslash itself would be a taboo character,
Option 2: If a field contains any taboo characters or begins with a colon,
base64 the field and prepend a colon.
I think i prefer Option 2, since it's easier to fold and you know right
away whether a field contains anything weird. But Option 1 may be more
readable for a field that just contains one or two taboo characters.