From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff King Subject: Re: [PATCH] git-send-email: add rfc2047 quoting for "=?" Date: Thu, 25 Oct 2012 05:05:21 -0400 Message-ID: <20121025090521.GD8390@sigill.intra.peff.net> References: <20121024210826.GA23562@shrek.podlesie.net> <1351114109-16310-1-git-send-email-krzysiek@podlesie.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: gitster@pobox.com, git@vger.kernel.org To: Krzysztof Mazur X-From: git-owner@vger.kernel.org Thu Oct 25 11:05:45 2012 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TRJNk-0005gU-5G for gcvg-git-2@plane.gmane.org; Thu, 25 Oct 2012 11:05:40 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935145Ab2JYJF0 (ORCPT ); Thu, 25 Oct 2012 05:05:26 -0400 Received: from 75-15-5-89.uvs.iplsin.sbcglobal.net ([75.15.5.89]:55973 "EHLO peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934647Ab2JYJFY (ORCPT ); Thu, 25 Oct 2012 05:05:24 -0400 Received: (qmail 6570 invoked by uid 107); 25 Oct 2012 09:06:04 -0000 Received: from sigill.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.7) (smtp-auth username relayok, mechanism cram-md5) by peff.net (qpsmtpd/0.84) with ESMTPA; Thu, 25 Oct 2012 05:06:04 -0400 Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Thu, 25 Oct 2012 05:05:21 -0400 Content-Disposition: inline In-Reply-To: <1351114109-16310-1-git-send-email-krzysiek@podlesie.net> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: 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