git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Siddharth Chandrasekaran <siddharth@embedjournal.com>
To: "gitster" <gitster@pobox.com>
Cc: "git" <git@vger.kernel.org>
Subject: git-am fails for emails with UTF8 characters in email header
Date: Sat, 14 Sep 2019 01:37:24 +0530	[thread overview]
Message-ID: <16d2c3ccc40.b3c71baf1200589.723645117669598677@embedjournal.com> (raw)
In-Reply-To: 

Hi Junio,

My email server (zoho) puts leading UTF-8 non-breaking spaces ("\xC2\xA0")
when folding long mail headers. Due to this, git-am is failing as it expects
only '\t' or ' ' characters.

RFC2822 [1] on page 7 states:

> The general rule is that wherever this standard allows for folding white
> space (not simply WSP characters), a CRLF may be inserted before any WSP.

It appears the RFC isn't too strict about ASCII only headers (correct me if I'm
wrong here); ergo, if the mail file is in UTF-8, isn't logical to expect UTF-8
whitespace characters also to be allowed in the fold/unfold of headers?

I was able to get git-am to work with modifications to read_one_header_line()
in mailinfo.c need your view on whether a patch is necessary for this. If so, I can
send a patch for this.

Thanks
Sid.

Footnotes:
[1]: https://www.ietf.org/rfc/rfc2822.txt






             reply	other threads:[~2019-09-13 20:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-13 20:07 Siddharth Chandrasekaran [this message]
2019-09-13 22:20 ` git-am fails for emails with UTF8 characters in email header brian m. carlson

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16d2c3ccc40.b3c71baf1200589.723645117669598677@embedjournal.com \
    --to=siddharth@embedjournal.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).