Re: [ietf-types] Status of application/patch or text/patch?

"Martin J. Dürst" <duerst@it.aoyama.ac.jp> Sat, 21 July 2012 06:51 UTC

Return-Path: <duerst@it.aoyama.ac.jp>
X-Original-To: ietf-types@ietfa.amsl.com
Delivered-To: ietf-types@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 31D4811E808D for <ietf-types@ietfa.amsl.com>; Fri, 20 Jul 2012 23:51:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -100.295
X-Spam-Level:
X-Spam-Status: No, score=-100.295 tagged_above=-999 required=5 tests=[AWL=-0.505, BAYES_00=-2.599, HELO_EQ_JP=1.244, HOST_EQ_JP=1.265, MIME_8BIT_HEADER=0.3, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rAoSKPLuABB2 for <ietf-types@ietfa.amsl.com>; Fri, 20 Jul 2012 23:51:30 -0700 (PDT)
Received: from scintmta01.scbb.aoyama.ac.jp (scintmta01.scbb.aoyama.ac.jp [133.2.253.33]) by ietfa.amsl.com (Postfix) with ESMTP id 7C78C11E8073 for <ietf-types@ietf.org>; Fri, 20 Jul 2012 23:51:30 -0700 (PDT)
Received: from scmse01.scbb.aoyama.ac.jp ([133.2.253.231]) by scintmta01.scbb.aoyama.ac.jp (secret/secret) with SMTP id q6L6qL7G011622 for <ietf-types@ietf.org>; Sat, 21 Jul 2012 15:52:22 +0900
Received: from (unknown [133.2.206.133]) by scmse01.scbb.aoyama.ac.jp with smtp id 7597_7d48_9e92b5b2_d300_11e1_af80_001d096c566a; Sat, 21 Jul 2012 15:52:20 +0900
Received: from [IPv6:::1] ([133.2.210.1]:51107) by itmail.it.aoyama.ac.jp with [XMail 1.22 ESMTP Server] id <S15E5581> for <ietf-types@ietf.org> from <duerst@it.aoyama.ac.jp>; Sat, 21 Jul 2012 15:52:23 +0900
Message-ID: <500A5199.7030705@it.aoyama.ac.jp>
Date: Sat, 21 Jul 2012 15:52:09 +0900
From: "\"Martin J. Dürst\"" <duerst@it.aoyama.ac.jp>
Organization: Aoyama Gakuin University
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.9) Gecko/20100722 Eudora/3.0.4
MIME-Version: 1.0
To: Jon Moore <jonm@jjmoore.net>
References: <CAMHjJ=Sr+pVyqSCZeJw5ECjWHjSpeu1+womAxeAO6VQCv8aT6g@mail.gmail.com> <87k3y03q69.fsf@latte.josefsson.org> <50086D95.7080004@gmx.de> <87txx2yay1.fsf@latte.josefsson.org> <50093E36.1000107@gmx.de> <vmfi08t6tr0n8aisarmurigm7f8h4j484i@hive.bjoern.hoehrmann.de> <50094599.3090804@gmx.de> <nlii08hr4iatmckce26oh8fq9u9o1fv31k@hive.bjoern.hoehrmann.de> <CANfjZH3_6TjRWtuU5R6pdg3mUZf222R-+L17OVyeLLUnS4mngA@mail.gmail.com> <CAMHjJ=R3v4QGUBAKk035juyrYoBKgN36y5A=LfF0jDimEVHeTg@mail.gmail.com> <1F8E110D-6F65-442D-922A-C88090FC33F2@hoplahup.net> <CAMHjJ=QNGKyjPToz-Z_HDcymWWvwRWCh0zTbu69tkzrn1V_Bww@mail.gmail.com>
In-Reply-To: <CAMHjJ=QNGKyjPToz-Z_HDcymWWvwRWCh0zTbu69tkzrn1V_Bww@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Cc: Julian Reschke <julian.reschke@gmx.de>, Simon Josefsson <simon@josefsson.org>, Bjoern Hoehrmann <derhoermi@gmx.net>, ietf-types@ietf.org
Subject: Re: [ietf-types] Status of application/patch or text/patch?
X-BeenThere: ietf-types@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "Media \(MIME\) type review" <ietf-types.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf-types>, <mailto:ietf-types-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ietf-types>
List-Post: <mailto:ietf-types@ietf.org>
List-Help: <mailto:ietf-types-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf-types>, <mailto:ietf-types-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 21 Jul 2012 06:51:31 -0000

On 2012/07/21 5:49, Jon Moore wrote:
> On Fri, Jul 20, 2012 at 2:46 PM, Paul Libbrecht<paul@hoplahup.net>  wrote:
>> Erm... source charset makes sense to me (this is "the charset of the patch").
>> But target charset makes no sense into a media-type... this is "after applying a patch" which is beyond the scope of a single file.
>
> No, the issue is that the patch file could have mixed charsets. If the
> change is 'convert README from iso-8859-1 to utf-8', then the patch
> file itself will have two character sets:
>
> 1. The lines that begin with '-' or ' ' will be iso-8859-1.
> 2. The lines that begin with '+' will be utf-8.
>
> Since these are incompatible charsets (neither is a superset of the
> other), we need two charset parameters to describe them, and this
> patch is not capable of being a text/* document. I'm open to other
> names besides 'source' and 'target', but I'm not sure how we get
> around having two of them for this case.

Just use application/patch. I don't think current diff programs are able 
to deal with character encoding parameters. I don't think people 
necessarily need to know the source/target encoding in the above 
example, unless something weird happens and they need to debug (in which 
case, they'll find out by themselves through trial and error anyway).

I also don't think there is much of a use case for:
- Originator: Has files in Latin-1, makes a diff in that encoding,
   sends to receiver.
- Receiver: Has files in UTF-8, wants to apply patch and wants a
   conversion from Latin-1 to UTF-8 to happen automatically.

So I very much agree with Björn here.

Regards,   Martin.