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

Patrik Fältström <patrik@frobbit.se> Thu, 30 April 2020 05:02 UTC

Return-Path: <patrik@frobbit.se>
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 7CED73A120B for <i18ndir@ietfa.amsl.com>; Wed, 29 Apr 2020 22:02:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level:
X-Spam-Status: No, score=-2.099 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=frobbit.se
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 3-RIfeYRGlGV for <i18ndir@ietfa.amsl.com>; Wed, 29 Apr 2020 22:02:57 -0700 (PDT)
Received: from mail.frobbit.se (mail.frobbit.se [85.30.129.176]) (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 7DEAA3A1206 for <i18ndir@ietf.org>; Wed, 29 Apr 2020 22:02:57 -0700 (PDT)
Received: from [192.165.72.241] (unknown [IPv6:2a02:80:3ffc:0:307d:1cd3:20c6:b2b0]) by mail.frobbit.se (Postfix) with ESMTPSA id 1F1F828A51; Thu, 30 Apr 2020 07:02:55 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=frobbit.se; s=mail; t=1588222975; bh=IFjei0PteBzOVtgj3UvLCUk9Vfzmfsia2AJJA2gZgS8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RmxyswHF9hq1lsMgrlCiJqOHvljToxUxgY0ZzX35BQUguuv0ehkwelgj9oNzNGEsG nekiIKteiul17oFjVXcp13ThKzUIlGvGdrqs5lY31aXMn1c/v974lJHswYJhYlhNMq Vk7MjTKBTEWujE9s4Dl7y8WTY4Xn+FY8X9Pd4Zrc=
From: Patrik Fältström <patrik@frobbit.se>
To: John Levine <johnl@taugh.com>
Cc: i18ndir@ietf.org
Date: Thu, 30 Apr 2020 07:02:53 +0200
X-Mailer: MailMate (1.13.1r5676)
Message-ID: <60822417-D4DB-4C4E-8EFF-D5E0AB5FD3EA@frobbit.se>
In-Reply-To: <20200430014516.01551188B50A@ary.qy>
References: <20200430014516.01551188B50A@ary.qy>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=_MailMate_4C8EE205-F8BC-4673-B307-49A30D4587DC_="; micalg="pgp-sha1"; protocol="application/pgp-signature"
Archived-At: <https://mailarchive.ietf.org/arch/msg/i18ndir/TFwA366rZBYyYVv1DM_zPIZUdgI>
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 05:03:00 -0000

John, I agree with your findings regarding MIME-types as well, but did not think that should be included in an I18N review :-) He he he...

I like MIME-types and think those should, as charset, be how one differentiate between different kinds of blobs. Using a file name regex match is something I have always hated.

   Patrik

On 30 Apr 2020, at 3:45, John Levine wrote:

> 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
>
> -- 
> I18ndir mailing list
> I18ndir@ietf.org
> https://www.ietf.org/mailman/listinfo/i18ndir