From: Jeff King Date: Thu, 25 Oct 2012 09:05:21 GMT Subject: Re: [PATCH] git-send-email: add rfc2047 quoting for "=?" Message-ID: <20121025090521.GD8390@sigill.intra.peff.net> In-Reply-To: <1351114109-16310-1-git-send-email-krzysiek@podlesie.net> On Wed, Oct 24, 2012 at 11:28:29PM +0200, Krzysztof Mazur wrote: > For raw subjects rfc2047 quoting is needed not only for non-ASCII characters, > but also for any possible rfc2047 in it. > [...] > - return ($s =~ /[^[:ascii:]]/); > + return ($s =~ /[^[:ascii:]]/) || ($s =~ /=\?/); Very nice and obvious bug-fix made easy by the previous refactoring. :) > --- > Oops, this ugly Subject was generated by git format-patch (both 1.8.0 > and km/send-email-compose-encoding). Yeah, format-patch has the same behavior (to encode when we see "=?"). So we know it is working. It is perhaps overkill in this case, since there is not technically a valid encoded-word, and a smart parser would be able to see that it should leave it alone. But it is probably better to be slightly conservative in what we generate (and the "=?" token is unlikely to come up in day-to-day usage). -Peff