Update regarding encoding issues in the media type registration

Here is the reply from the IETF folks. Short summary is that the
language in RFC 6839 should be followed instead of 7159. That means
the encoding should read as follows:

Encoding considerations:

As per section 3.1 of RFC 6839, when JSON is written in UTF-8,
encoding is 8-bit; when JSON is written in UTF-16 or UTF-32, encoding
is binary.

Thanks


---------- Forwarded message ----------
From: Tony Hansen <tony@att.com>
Date: Fri, May 15, 2015 at 12:36 PM
Subject: Re: [Technical Errata Reported] RFC6839 (4367)
To: Yakov Shafranovich <yakov-ietf@shaftek.org>, Barry Leiba
<barryleiba@computer.org>
Cc: RFC Errata System <rfc-editor@rfc-editor.org>,
"tony+sss@maillennium.att.com" <tony+sss@maillennium.att.com>,
"Alexey.Melnikov@isode.com" <Alexey.Melnikov@isode.com>,
"superuser@gmail.com" <superuser@gmail.com>, "apps-discuss@ietf.org"
<apps-discuss@ietf.org>


On 5/15/15 9:31 AM, Yakov Shafranovich wrote:
> [For context, this is originating from the work at the W3C regarding CSV files]
>
> There appears to be an issue about how to specify encoding
> considerations for media types that can be encoded in UTF-8, UTF-16
> and UTF-32. For media types, the valid choices are 7-bit, 8-bit and
> binary, which would mean that UTF-16 and UTF-32 are binary. For JSON
> specifically, since both RFCs define JSON, there is a conflict.
>
> There are two ways to write this then:
>
> 1. As in RFC 6839:
>
> "When JSON is written in UTF-8, JSON is 8bit compatible ([RFC2045]).
> When JSON is written in UTF-16 or UTF-32, JSON is binary ([RFC2045])."
>
> 2. As per RFC 7159:
>
> "binary"
>
> What I am arguing is that the second approach would make more sense.
> Just like RFC 7159 choose to use "binary" in case of multiple UTF
> encodings, we should follow the same approach in RFC 6839. If not,
> then RFC 7159 should have errata pointing back to RFC 6839.

Hmmm, it's too bad we didn't catch this before 7159 was published. 7159
is wrong, or at least incomplete.

When JSON is written in UTF-8, you MAY use an encoding of 8-bit, or you
MAY use an encoding of binary. When JSON is written in UTF-16 or -32,
you MUST use an encoding of binary.

This is because of the definition of the encoding system definitions of
7-bit, 8-bit and binary, which is totally orthogonal to ANY media type.
The definition of UTF-8 is, in and of itself, compatible with the
definition of 8-bit encoding.

    Tony

>
> Thanks,
> Yakov
>
> On Fri, May 15, 2015 at 9:18 AM, Barry Leiba <barryleiba@computer.org> wrote:
>> And yet this RFC predates 7159, so how can 7159 be taken to support errata
>> for this RFC?
>>
>> Barry
>>
>>
>> On Friday, May 15, 2015, RFC Errata System <rfc-editor@rfc-editor.org>
>> wrote:
>>> The following errata report has been submitted for RFC6839,
>>> "Additional Media Type Structured Syntax Suffixes".
>>>
>>> --------------------------------------
>>> You may review the report below and at:
>>> http://www.rfc-editor.org/errata_search.php?rfc=6839&eid=4367
>>>
>>> --------------------------------------
>>> Type: Technical
>>> Reported by: Yakov Shafranovich <yakov-ietf@shaftek.org>
>>>
>>> Section: 3.1
>>>
>>> Original Text
>>> -------------
>>> Encoding considerations:
>>>
>>>       Per [RFC4627], JSON is allowed to be represented using UTF-8,
>>>       UTF-16, or UTF-32.  When JSON is written in UTF-8, JSON is 8bit
>>>       compatible ([RFC2045]).  When JSON is written in UTF-16 or UTF-32,
>>>       JSON is binary ([RFC2045]).
>>>
>>> Corrected Text
>>> --------------
>>> Encoding considerations:  binary as per section 11 of RFC 7159
>>>
>>> Notes
>>> -----
>>> RFC 7159, section 11 specifies that encoding for JSON is binary.
>>>
>>> Instructions:
>>> -------------
>>> This erratum is currently posted as "Reported". If necessary, please
>>> use "Reply All" to discuss whether it should be verified or
>>> rejected. When a decision is reached, the verifying party (IESG)
>>> can log in to change the status and edit the report, if necessary.
>>>
>>> --------------------------------------
>>> RFC6839 (draft-ietf-appsawg-media-type-suffix-regs-08)
>>> --------------------------------------
>>> Title               : Additional Media Type Structured Syntax Suffixes
>>> Publication Date    : January 2013
>>> Author(s)           : T. Hansen, A. Melnikov
>>> Category            : INFORMATIONAL
>>> Source              : Applications Area Working Group
>>> Area                : Applications
>>> Stream              : IETF
>>> Verifying Party     : IESG
>>>

Received on Friday, 15 May 2015 16:47:29 UTC