Re: mime headers quoted-printable

2017-06-01 Thread Walter Alejandro Iglesias
Inspired in the new utf8 man page (thanks tedu@) I think I found a solution to the charset issue. New version: /* * MIME encode mail header quoted-printable. * */ #include #define ASCII 0x7f #define IN 1 #define OUT 0 #define MAX 1024 int main() { int c, i, n, nl,

Re: mime headers quoted-printable

2017-05-24 Thread Walter Alejandro Iglesias
An overlook I can't figure out why didn't core dumped. --- encode-qprint-header.c Wed May 24 22:04:24 2017 +++ encode-qprint-header.c Wed May 24 22:03:49 2017 @@ -66,13 +66,12 @@ main() } else { if (c > ASCII) eightb

Re: mime headers quoted-printable

2017-05-23 Thread Walter Alejandro Iglesias
I was pointed out words (no spaces) longer than 256 characters produce a buffer overflow with my previous version. I scanned my saved (since ~ 2005) mbox for header lines without spaces longer than 256 and found several. Most of them are non wrapped base64 encoded text, a few are "References:" s

mime headers quoted-printable

2017-05-22 Thread Walter Alejandro Iglesias
Hello everyone, With mailx(1) in mind and resurrecting the few I know about C I wrote the code pasted below. It encodes mail headers in MIME quoted-printable format. Unless I'm missing something it complies with all stated here: https://www.ietf.org/rfc/rfc2047.txt You can pipe to it a line or