All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David Kågedal" <davidk@lysator.liu.se>
To: git@vger.kernel.org
Subject: Re: [PATCH] Reencode committer info to utf-8 before formatting mail header
Date: Mon, 15 Jan 2007 17:57:12 +0100	[thread overview]
Message-ID: <87bql0449j.fsf@morpheus.local> (raw)
In-Reply-To: 7vr6tzogp4.fsf@assigned-by-dhcp.cox.net

Junio C Hamano <junkio@cox.net> writes:

> -static int add_rfc2047(char *buf, const char *line, int len)
> +static int add_rfc2047(char *buf, const char *line, int len,
> +		       const char *encoding)
>  {
>  	char *bp = buf;
>  	int i, needquote;
> -	static const char q_utf8[] = "=?utf-8?q?";
> +	char q_encoding[128];
> +	const char *q_encoding_fmt = "=?%s?q?";

This goes against the old principle of being forgiving in what you
accept, and strict in what you send.  The names of the encoding in the
headers should probably be normalized before putting them in an
e-mail.  I.e. we might accept "utf-8", "utf8", "UTF-8", and "UTF8"
(this depends on iconv, I suppose), but the RFC2047 encoding should be
the one blessed by RFC4027.  But I admit that I haven't read the RFC,
and I'm writing this offline so I can't check right now.

-- 
David Kågedal

  parent reply	other threads:[~2007-01-15 22:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-12 13:06 [PATCH] Reencode committer info to utf-8 before formatting mail header David Kågedal
2007-01-12 22:11 ` Junio C Hamano
2007-01-13  1:31   ` Junio C Hamano
2007-01-13  1:43     ` Junio C Hamano
2007-01-13 11:19       ` Johannes Schindelin
2007-01-13 17:57         ` Junio C Hamano
2007-01-15 16:58         ` David Kågedal
2007-01-16 11:41           ` Johannes Schindelin
2007-01-16 12:43             ` David Kågedal
2007-01-13 12:23       ` Robin Rosenberg
2007-01-13 17:54         ` Junio C Hamano
2007-01-15 16:54       ` David Kågedal
2007-01-13 11:02     ` Alex Riesen
2007-01-14  0:42       ` Horst H. von Brand
2007-01-14 19:25         ` Alex Riesen
2007-01-13 22:18     ` Junio C Hamano
2007-01-15 16:57     ` David Kågedal [this message]
2007-01-15 16:53   ` David Kågedal

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=87bql0449j.fsf@morpheus.local \
    --to=davidk@lysator.liu.se \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.