Media type for output of POSIX "diff" utility

Julian Reschke julian.reschke at gmx.de
Thu May 31 18:25:17 CEST 2007


Simon Josefsson wrote:
> Bjoern Hoehrmann <derhoermi at gmx.net> writes:
> 
>>> What exactly does that mean? That different parts of it have a different 
>>> character encoding?
>> Yes, that's not uncommon with this kind of format. Think "I converted
>> the README from ISO-8859-1 to UTF-8, see the attached patch".
> 
> Even though I haven't seen that example in practice, POSIX says the
> 'input files may be of any type' and thus I can't see any reason why the
> above shouldn't work.
> 
> This argues for application/patch, which would be unfortunate since most
> patches are readable as text.
> 
> Would it be possible to register text/patch AND application/patch, and
> specify that if a particular patch contains text whose charset is
> non-ASCII or not known, application/patch MUST be used, but otherwise
> text/plain SHOULD be used?  That would not destroy data and also lead to
> a readable output.

We certainly could register both; I'm just not entirely sure what we 
would want to specify.

I guess the underlying question is whether a patch is applied to a 
sequence of characters, or to a sequence of bytes?

In the former case, I could apply a patch encoded in ISO-8859-1 to a 
text file that uses UTF-8, and the result would still be in UTF-8. But 
that's not what "patch" does in practice, right?

Best regards, Julian


More information about the Ietf-types mailing list