Re: [PATCH 2/2] send-email: rfc2047-quote subject lines with non-ascii characters
- From
Jeff King <peff@peff.net>
- Date
- Mar 29, 2008, 08:53 UTC
- Message-ID
- <20080329085304.GC19200@coredump.intra.peff.net>
- In-Reply-To
- <200803290944.55273.robin.rosenberg.lists@dewire.com>
On Sat, Mar 29, 2008 at 09:44:55AM +0100, Robin Rosenberg wrote:
Show 7 quoted lines
> > OK. Do you have an example function that guesses with high probability > > whether a string is utf-8? If there are non-ascii characters but we > > _don't_ guess utf-8, what should we do? > > I guess the best bet is to assume the locale. Btw, is the encoding header > from the commit (when present) completely lost? (not that it can be trusted > anyway).
What do you mean by "assume the locale"? Is there a portable way to say "this is the encoding of the locale the user has chosen?" On my system I set LANG=en_US, and behind-the-scenes magic chooses utf-8 versus iso8859-1.
And there is no encoding header for the commit; the point of this patch is to handle the "cover letter" message created by "send-email --compose" (we should already be doing the right thing for the patch emails, since the commit encoding is output by format-patch in a content-type header before we even get to send-email).
-Peff