bug-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-mailutils] Which is best approach to implement RFC2047?


From: Sergey Poznyakoff
Subject: Re: [bug-mailutils] Which is best approach to implement RFC2047?
Date: Tue, 14 Jan 2003 11:42:31 +0200

> I'm writing RFC2047 decoding routine for mailutils.
> And I found there is several approach to do it.
> * string conversion function
>       rfc2047_decode (const char* toset, const char* fromstr, char**
>       toset);

you meant

 rfc2047_decode (const char* toset, const char* fromstr, char** tostr)

didn't you?

> * wrapper function
>       header_aget_value_rfc2047_decoded (...);
>       address_get_personal_rfc2047_decoded (...);
> * stream filter
>       filter_create (&ostream, istream, "rfc2047", MU_FILTER_DECODE,
>       ...);
> 
> It's not easy to decide it.
> What do you think which is best?

The first two complement each other, rfc2047_decode being the lower
level and .*_rfc2047_decoded being the upper level wrappers. I guess
the best thing to start from is rfc2047_decode. By the way it should
have its encoding counterpart rfc2047_encode, too.

Regards,
Sergey




reply via email to

[Prev in Thread] Current Thread [Next in Thread]