[tin-dev] [PATCH] skip over language specification in encoded words (RFC2231)
Dennis Preiser
dennis at d--p.de
Thu Dec 17 20:09:47 CET 2015
Hello,
RFC2231 defines optional language specifications in encoded words. tin
is not aware of those tags and thus decoding fails.
Here is an article which shows this issue (subject with language
specifications):
| Newsgroups: de.alt.test
| Message-ID: <AABWbrcl65kxd35h.A1.flnews at WStation3.stz-e.de>
The attached patch simply skips over those definitions.
Dennis
-------------- next part --------------
--- tin-2.3.2_r5/src/rfc2047.c 2015-11-22 01:14:31.000000000 +0100
+++ tin-2.3.2_r6/src/rfc2047.c 2015-12-17 19:56:11.000000000 +0100
@@ -279,8 +279,15 @@ rfc1522_decode(
e = charset;
c++;
- while (*c && *c != '?')
+ while (*c && *c != '?') {
+ /* skip over optional language tags (RFC2231, RFC5646) */
+ if (*c == '*') {
+ while (*++c && *c != '?')
+ ;
+ continue;
+ }
*e++ = *c++;
+ }
*e = 0;
if (*c == '?') {
c++;
More information about the tin-dev
mailing list