From mboxrd@z Thu Jan 1 00:00:00 1970 From: Junio C Hamano Subject: Re: [PATCH 1/2] [RFC] add --recode-patch option to git-mailinfo Date: Sun, 06 Jun 2010 13:03:04 -0700 Message-ID: <7vr5kkvshz.fsf@alter.siamese.dyndns.org> References: <1275825583-23913-1-git-send-email-r0bertz@gentoo.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: git@vger.kernel.org To: Zhang Le X-From: git-owner@vger.kernel.org Sun Jun 06 22:03:20 2010 connect(): No such file or directory Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OLM3y-0002WE-0V for gcvg-git-2@lo.gmane.org; Sun, 06 Jun 2010 22:03:18 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753979Ab0FFUDN (ORCPT ); Sun, 6 Jun 2010 16:03:13 -0400 Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:52686 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753334Ab0FFUDL (ORCPT ); Sun, 6 Jun 2010 16:03:11 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 1B8ABB9D05; Sun, 6 Jun 2010 16:03:11 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=to:cc:subject :references:from:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=5+a7Z83E/TResY1b0giN02zLD0k=; b=ZOBPVa GVSzsjGXW9trg7fNcfzeoC3GxMopKhxI0w3htKfPG/CFjULqUhTD7WfynnsW9cFo eNNGlbDGUg/DOpO0oNmg6pghNN4I0rlnjbHtQhIj2O7c6sMm90Qaz8Qmvx7RxrDe gUI2OX0llnjHIBi0UIA6U72r9FDcwRTA7phj4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=to:cc:subject :references:from:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=qS+ip7z8WRPHF49jgbP/Rnn6GqukojIe 5wNSRbc6CykOHmsN4qPPY7gEoC+AIiKz/EFjJaskEon9kk9Godyt2JBH19TXgoUK hT89/HhxcO9p/qgl1eVFiFajp32KKrK/4F4xzDri1dumG3xJerY/UBcgpsCxtQ7g 0rp8qVMVEDM= Received: from a-pb-sasl-quonix. (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id D08BFB9D04; Sun, 6 Jun 2010 16:03:08 -0400 (EDT) Received: from pobox.com (unknown [69.181.135.33]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 22D0AB9D02; Sun, 6 Jun 2010 16:03:05 -0400 (EDT) In-Reply-To: <1275825583-23913-1-git-send-email-r0bertz@gentoo.org> (Zhang Le's message of "Sun\, 6 Jun 2010 19\:59\:42 +0800") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) X-Pobox-Relay-ID: 8705F5F2-71A6-11DF-8632-6730EE7EF46B-77302942!a-pb-sasl-quonix.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Zhang Le writes: > I have a translation project which uses UTF-8 as charset. > So the patch must be encoded in UTF-8, not just the commit msg etc. > And we use google group as our mailing list. > > Recently, due to unknown reason, mails saved from gmail are encoded using GB2312. > This never happened before. I guess google has did something. > But I haven't found how to change this behavior. > > So I took another way, i.e. add this option to git-mailinfo. > I hope this could benefit others as well. > > Signed-off-by: Zhang Le > --- > builtin/mailinfo.c | 8 +++++++- > man1/git-mailinfo.1 | 7 ++++++- Don't patch anything in man?/ as they are autogenerated files and not source; patch the source file in Documentation/ directory instead. I take it that you recode from whatever encoding the mail message is in (probably stated in "Content-type: ...; charset=xxx" header) to the encoding specified with --encoding option (defaulting to UTF-8), but it wasn't very clear from the documentation. We might want to improve the descriptions of both this new option and --encoding option. Also it might be useful to find out what that "due to unknown reason" is, at least to see if that is what Google did or what the user did. Thanks.