Re: [I18ndir] Review volunteer needed (Fwd: [dispatch] WGLC of draft-ietf-dispatch-javascript-mjs-07)

John Levine <johnl@taugh.com> Thu, 30 April 2020 01:45 UTC

Return-Path: <johnl@iecc.com>
X-Original-To: i18ndir@ietfa.amsl.com
Delivered-To: i18ndir@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 07E2E3A0C92 for <i18ndir@ietfa.amsl.com>; Wed, 29 Apr 2020 18:45:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.85
X-Spam-Level:
X-Spam-Status: No, score=-1.85 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1536-bit key) header.d=iecc.com header.b=sgjR34EH; dkim=pass (1536-bit key) header.d=taugh.com header.b=OvVHD9jQ
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 99MJ56K1MOQ0 for <i18ndir@ietfa.amsl.com>; Wed, 29 Apr 2020 18:45:18 -0700 (PDT)
Received: from gal.iecc.com (gal.iecc.com [IPv6:2001:470:1f07:1126:0:43:6f73:7461]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9619C3A0C91 for <i18ndir@ietf.org>; Wed, 29 Apr 2020 18:45:18 -0700 (PDT)
Received: (qmail 69201 invoked from network); 30 Apr 2020 01:45:16 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=iecc.com; h=date:message-id:from:to:cc:subject:in-reply-to:mime-version:content-type:content-transfer-encoding; s=10e4f.5eaa2dac.k2004; bh=ybzIZdEoF43kxww+uCJUaE/ZbnB0u2ijAYN4KzHbbZM=; b=sgjR34EHeWnOa4qNYcHCFePAOnShN6NA+1o4s766Hb2sppjZYbgzhLB/Nec2p3gWFh1lQc5Slpfn0vd1vmJp5l77w4eMlaWbk0CybDI9cPQAA7g9Xz50fjWlGAGPyMnaYMeUXXsf5yayYJPra6MknqIk9N0xtJSpwvoNfFtoHxiV4MEABFgYCQNvRjL9B9TC2mzE2WB2v21/aAx29P3jo/rlUoCxaqi4U3ZSt1Ga/1r4Dc3kzkjavo1Tduc/XQFQ
DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=taugh.com; h=date:message-id:from:to:cc:subject:in-reply-to:mime-version:content-type:content-transfer-encoding; s=10e4f.5eaa2dac.k2004; bh=ybzIZdEoF43kxww+uCJUaE/ZbnB0u2ijAYN4KzHbbZM=; b=OvVHD9jQ0947PgXYztXRM717wK+U9PNxqsqwHZhpHRQWyCqVNuo18SUBTLfMYDAJJ+HEHXoH+pIi96IZyDQarx+gUFiXDg99pK3Z/6fUtWsjtQtn069Tk2sBkRs6nir6FGPpuWENMWyLCESu4gIqkoWsFJlBS3VgAreI3LH9FGtXblzmmPAi5f2PrPXsUYHPTgvb+lfvfSTv4/EzhDW6SZaw1jNYZ4CoXSVMbZHNQ7sxiQL0MpL8pBuvCfWArV74
Received: from ary.qy ([IPv6:2001:470:1f07:1126::78:696d:6170]) by imap.iecc.com ([IPv6:2001:470:1f07:1126::78:696d:6170]) with ESMTP via TCP6; 30 Apr 2020 01:45:16 -0000
Received: by ary.qy (Postfix, from userid 501) id 01551188B50A; Wed, 29 Apr 2020 21:45:15 -0400 (EDT)
Date: Wed, 29 Apr 2020 21:45:15 -0400
Message-Id: <20200430014516.01551188B50A@ary.qy>
From: John Levine <johnl@taugh.com>
To: i18ndir@ietf.org
Cc: patrik@frobbit.se
In-Reply-To: <A9854982-3696-46FF-AD5C-8088CFCDD8FC@frobbit.se>
Organization: Taughannock Networks
X-Headerized: yes
Mime-Version: 1.0
Content-type: text/plain; charset="utf-8"
Content-transfer-encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/i18ndir/Hl3bQPI7sNKKjxZ4OZQPV_CbtFo>
Subject: Re: [I18ndir] Review volunteer needed (Fwd: [dispatch] WGLC of draft-ietf-dispatch-javascript-mjs-07)
X-BeenThere: i18ndir@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Internationalization Directorate <i18ndir.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/i18ndir>, <mailto:i18ndir-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/i18ndir/>
List-Post: <mailto:i18ndir@ietf.org>
List-Help: <mailto:i18ndir-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/i18ndir>, <mailto:i18ndir-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 30 Apr 2020 01:45:22 -0000

I looked at it and have different concerns.

A chunk of Ecmascript can either be a script or a module, which differ
syntactically, but that you can't tell apart by looking at them, so
you need external hints.  Sec 3 says that if the file extension is
.mjs, that is the hint that it is a module.  Sec 4.1 says that modules
are always in UTF-8.

Sec 4.2 has three steps which I believe are supposed to be done in order.

Step 1 says that if you know it's a module you know it's UTF-8, so stop.

Otherwise you sniff the data to see if it starts with a BOM, and if
so, that tells you the encoding and you otherwise ignore the BOM.

Step 2 says look at the charset, and believe if if you understand it.

Step 3 says if all else fails, assume it's UTF-8.

It looks like step 1 is saying that if the text starts with a BOM, you
ignore the declared charset and sniff the BOM instead, which sounds to
me like an ancient workaround that is perhaps no longer needed.

Given that they are deprecating all of the existing javascript media
types and reviving text/javascript which 4329 declared obsolete, this
might be a good time to say if you're going to use our lovely new
(old) media type, declare the correct character set so consumers can
believe it and stop doing byte sniffing kludges.

R's,
John