Re: [Json] Encoding detection (Was: Re: JSON: remove gap between Ecma-404 and IETF draft)

Bjoern Hoehrmann <derhoermi@gmx.net> Tue, 26 November 2013 20:15 UTC

Return-Path: <derhoermi@gmx.net>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 548251AE1A2 for <json@ietfa.amsl.com>; Tue, 26 Nov 2013 12:15:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SJeSf4BRZ_B2 for <json@ietfa.amsl.com>; Tue, 26 Nov 2013 12:15:39 -0800 (PST)
Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by ietfa.amsl.com (Postfix) with ESMTP id 0FE061AE000 for <json@ietf.org>; Tue, 26 Nov 2013 12:15:39 -0800 (PST)
Received: from netb.Speedport_W_700V ([91.35.22.249]) by mail.gmx.com (mrgmx101) with ESMTPA (Nemesis) id 0MBaDy-1Vth2F2Uuk-00AU76 for <json@ietf.org>; Tue, 26 Nov 2013 21:15:38 +0100
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Nico Williams <nico@cryptonector.com>
Date: Tue, 26 Nov 2013 21:15:38 +0100
Message-ID: <mev999tgjoao5cj84fuk4t8pvi4t9pj6hs@hive.bjoern.hoehrmann.de>
References: <20131120223305.GB5476@mercury.ccil.org> <CANXqsRJmNmSRXssBnw3tGUt0veViENLoS=dp+gEr2RqvNAf4JQ@mail.gmail.com> <20131121165615.GA12138@mercury.ccil.org> <CANXqsRKrcR54TzSFng0ysyTV60-uZZ7QQ-G4xJOB0gO29C7-Ag@mail.gmail.com> <54E53D571E5E4589B2E9FA17DC816002@codalogic> <CANXqsRJi8dv0Giw7CZWP=10qEJEXGyRTb0HFnE9MpeAxc2_0rA@mail.gmail.com> <20131126160127.GE20755@mercury.ccil.org> <CAO1wJ5Qz2-vue_OGp79JZ+DW0ELofwdh8vy=9UZk53SMYs1bOg@mail.gmail.com> <20131126172410.GC21240@localhost>
In-Reply-To: <20131126172410.GC21240@localhost>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Provags-ID: V03:K0:+ZQWlfcAmhFrKU1EDzH8FXGHb4yN+c7FzEHbvyC67yRyqBGdZLy n99anLFPqqJEMCAOKw3sXRUqCQZVxRJppo4RCbD+JvnrfNqBYQu81HJ5a4F459g1EbIMO9m HvOBYf9cZIg2lhjQvZ6zFX9GnZUPm8mt7CSL5+Q195Q4Bcs7/mL1Nkpf5iHtfy9wy/y761p BJb8kMZiXB1irbJrAzmJw==
Cc: es-discuss <es-discuss@mozilla.org>, www-tag <www-tag@w3.org>, JSON WG <json@ietf.org>
Subject: Re: [Json] Encoding detection (Was: Re: JSON: remove gap between Ecma-404 and IETF draft)
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/json/>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 26 Nov 2013 20:15:41 -0000

* Nico Williams wrote:
>We must not require encoding detection functionality in parsers.  We
>must not forbid it either.  We might need to say that encodings other
>than UTF-8/16/32 may not be reliably detected, therefore they are highly
>discouraged, even forbidden except where protocols specifically call for
>them.

When I pass a fully conforming UTF-8 encoded application/json entity to
a fully conforming JSON parser I do not want the parser to do something
funny like interpreting the document as if it were Windows-1252 encoded.
I am amazed how many people here think a parser that does that should
not be considered broken.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/