From: "André Goddard Rosa" <andre.goddard@gmail.com>
To: "Santi Béjar" <santi@agolina.net>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Problem with "From:" line on "git format-patch" generated patches
Date: Tue, 3 Nov 2009 16:06:39 -0200 [thread overview]
Message-ID: <b8bf37780911031006q4bc4c487xd9db86eb0fa531e7@mail.gmail.com> (raw)
In-Reply-To: <adf1fd3d0911030902x15faffcen86644733ffda43d5@mail.gmail.com>
On 11/3/09, Santi Béjar <santi@agolina.net> wrote:
> On Tue, Nov 3, 2009 at 5:30 PM, André Goddard Rosa
> <andre.goddard@gmail.com> wrote:
>> Hi, everybody!
>>
>> When I generate patches using "git format-patch" it always makes
>> my name garbled in the "From:" line
>> as shown below. I'm using openSUSE 11.2 RC 1 (x86_64) with the
>> following settings:
>>
>> # locale charmap
>> UTF-8
>> # echo $LANG
>> en_US.UTF-8
>>
>> I've tried changing my environment to use another encoding like
>> ISO-8859-1, but it didn't work as well.
>>
>> Does someone can explain why does this happens? Any suggestions?
>>
>> P.s.: the problem never occurs on the commit message (Signed-off-by)
>>
>>>> >From 584d9bfc7c1d41b76a05655b4562b98fcbef6ee4 Mon Sep 17 00:00:00 2001
>>>> From: =?UTF-8?q?Andr=C3=A9=20Goddard=20Rosa?= <andre.goddard@gmail.com>
>>>> Date: Sun, 1 Nov 2009 14:09:06 -0200
>>>> Subject: [PATCH v2 7/7] vsprintf: factor out skip_space code in a
>>>> separate function
>>>> MIME-Version: 1.0
>>>> Content-Type: text/plain; charset=UTF-8
>>>> Content-Transfer-Encoding: 8bit
>
> This is the normal encoding for email headers where you cannot use
> 8bit characters. You have to use a 7bit characters with this
> =?UTF-8... encoding.
>
> You can check the From: line in your mail, the mail I'm replying:
>
> From: =?ISO-8859-1?Q?Andr=E9_Goddard_Rosa?= <andre.goddard@gmail.com>
>
> At the other hand the tools using the output of git-format-patch must
> deal with this all, as they do. git-am handles it well, if not it's a
> bug that should be reported.
>
Great, Santi!
I really appreciate your reply!!!
I was just in the process of debugging this issue when I landed
into function pp_user_info(), which calls add_rfc2047(). So I started
looking into http://www.faqs.org/rfcs/rfc2047.html , which specifies:
"Generally, an "encoded-word" is a sequence of printable ASCII
characters that begins with "=?", ends with "?=", and has two "?"s in
between."
Ok... I got it; it's necessary for proper signaling of the email
header when it detects the presence of certain characters outside the
ASCII range 0..127 (7 bits). It's the case for latin "é" letter in my
name.
So, let me explain what happened to me:
I'm not using any specific tool for inputting the git-format-patch,
but instead I'm sending the files generated by it through gmail as an
inlined patch in the email body.
I like the convenience of format-patch for generating the patch files,
but in this case, formatting the header as rfc2047 is not necessary
and makes a funny/garbled output in my patch submission.
Do you have a suggestion for my workflow?
Thanks a lot,
André
next prev parent reply other threads:[~2009-11-03 18:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-03 16:30 Problem with "From:" line on "git format-patch" generated patches André Goddard Rosa
2009-11-03 17:02 ` Santi Béjar
2009-11-03 18:06 ` André Goddard Rosa [this message]
2009-11-03 18:11 ` André Goddard Rosa
2009-11-03 22:55 ` Jonathan Nieder
2009-11-04 10:55 ` André Goddard Rosa
2009-11-04 8:49 ` Jeff King
2009-11-04 10:59 ` André Goddard Rosa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b8bf37780911031006q4bc4c487xd9db86eb0fa531e7@mail.gmail.com \
--to=andre.goddard@gmail.com \
--cc=git@vger.kernel.org \
--cc=santi@agolina.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).