[art] Re: draft-bray-unichars-09 review

Rob Sayre <sayrer@gmail.com> Tue, 08 October 2024 17:29 UTC

Return-Path: <sayrer@gmail.com>
X-Original-To: art@ietfa.amsl.com
Delivered-To: art@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7D1E2C14CF1E; Tue, 8 Oct 2024 10:29:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.104
X-Spam-Level:
X-Spam-Status: No, score=-2.104 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SfznEI3oXuHK; Tue, 8 Oct 2024 10:29:16 -0700 (PDT)
Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 98D34C1CAE77; Tue, 8 Oct 2024 10:29:16 -0700 (PDT)
Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-5c9150f9ed4so686149a12.0; Tue, 08 Oct 2024 10:29:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728408555; x=1729013355; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=iqngZpmBfaGEjXOMLTQDJshCZN9GWyot8b553SVuqVs=; b=NHhODuOnfjxAVQyp9qbcKk9hxnn36/FyNMBBojhvW6BpU6bgRWrpujWhr2dWO97CRE eV9KCKl7RN0AMbw0a0ls6XrO26NUND2qqaqDUiJqiDYgMvv0ndq4IexOFyDNPS9Sgo3t YTQaUvsEFe6wp3Ljn2ykeDmXv+aFbYy6ZQ0jCmFWWXurkvXq8fgVRWfTDlfGdr7hGRnD ojdMqHtfCWPDlQ4swroAZiDSqkOIagQRofTQxaLzjXljUA6dmMFBLRtAqdhSy17GHXzG T2Bz1KowqJ+vCLEK+trPZw0u9oWArgJ2EQzj/rfuGMXGgLJkejxF6cJlcfJICcWzIVse R9Tw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728408555; x=1729013355; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=iqngZpmBfaGEjXOMLTQDJshCZN9GWyot8b553SVuqVs=; b=ea/RLb0UhE2sg7zdYpw/6GVVcB7FTsgp3ZGSn49UqYhAU5oGV7Zr6ezoZWhh6JMWOr 7d7LCedejwa+LsFP9DTg9jdeK7qZdnckNrZBoYOLUFAKbPFRGg1kODqtGHmXL/ZQYcvU /Z7RVx+TK5lR4UYYezi5X84Ul5tdzKIHRf51IoxxmZJ2MxlblAqxxr43DwfrsDNe4PeU D+gmGgV/LMYQfDTV61cXZaZXBc7cvOvTOQO8e/0MCayTiAHiI8qWzgJ43KyhmaqveOxL obgIk9is+quOpyvPalDPz4lq6n7qWBJc6JuEMamncNUhnHbozLW3NiE9a+r86BU0ZEcs lOMQ==
X-Forwarded-Encrypted: i=1; AJvYcCUcu4k/6KYeDcHviOdQBcb99vF+bBjjwOziUEbWRC6CENCeFw0LO1/W6dmNfDpBtmdYs8lWUHXoccERChrmEhys1+8keQ==@ietf.org, AJvYcCVt2bggUNrqovDKI2tOhpRGpxUUfvMheYbvpu4izjSBqCPbXxdEN6KZOhpiFYMjmfE5OtkNc+3BgOkeuv7WWIetkb4QeDDfHqK2wui4WA==@ietf.org, AJvYcCW5bLWdl5uDrmhnUfDXVmmRwsMOfa1ebVTl1KMrPPvmMbYtJvHbGb8HA0vivyCtesLqa7U=@ietf.org
X-Gm-Message-State: AOJu0YwhuLbgasumGQAmOl59exs+uoCiwQa2sKFJq+9akpRjUNPRuwYg efKvHZV69k4fH93fKq7C44aqBs86wbkBLJl5IN2eYuRdoBlcp+IwjMwy5c5KhqoFmPac0m5DK64 24F1vCgiVeP84wLZd+AReWKc3npazvWCJ
X-Google-Smtp-Source: AGHT+IF0lj/V3LbnNJ91UZJDDEV1PGz+7IJyk5fduqITeoCRbdT2xzbWB/5zTCZZ31PTwjROqJdkscQDNCFw4NBuRmQ=
X-Received: by 2002:a05:6402:35d1:b0:5c9:3f2:e69c with SMTP id 4fb4d7f45d1cf-5c903f2ea42mr3261275a12.9.1728408554567; Tue, 08 Oct 2024 10:29:14 -0700 (PDT)
MIME-Version: 1.0
References: <CAN8C-_JkHcer1MbvwSrtFxFu_38JRy-_JstYOmAMdOVCdCe-0g@mail.gmail.com> <CAHBU6itokOYJb6ZWUfvct7O7AqDsULvYUrtBqm25Wy-7TxOM4Q@mail.gmail.com>
In-Reply-To: <CAHBU6itokOYJb6ZWUfvct7O7AqDsULvYUrtBqm25Wy-7TxOM4Q@mail.gmail.com>
From: Rob Sayre <sayrer@gmail.com>
Date: Tue, 08 Oct 2024 10:29:02 -0700
Message-ID: <CAChr6SzB_dPneh+mdXEqeG=9HDu3Arn8UO-_0yj=kzMFPUbXAA@mail.gmail.com>
To: Tim Bray <tbray@textuality.com>
Content-Type: multipart/alternative; boundary="000000000000ebff550623fa7939"
Message-ID-Hash: GOVZIC3X4F4R3TX4T7NK54DDO5GHLXPT
X-Message-ID-Hash: GOVZIC3X4F4R3TX4T7NK54DDO5GHLXPT
X-MailFrom: sayrer@gmail.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-art.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: Orie Steele <orie@transmute.industries>, draft-bray-unichars@ietf.org, draft-bray-unichars.shepherd@ietf.org, art@ietf.org
X-Mailman-Version: 3.3.9rc5
Precedence: list
Subject: [art] Re: draft-bray-unichars-09 review
List-Id: Applications and Real-Time Area Discussion <art.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/art/5-MCjaWcf7bqmfdRRP3yFrAEy-I>
List-Archive: <https://mailarchive.ietf.org/arch/browse/art>
List-Help: <mailto:art-request@ietf.org?subject=help>
List-Owner: <mailto:art-owner@ietf.org>
List-Post: <mailto:art@ietf.org>
List-Subscribe: <mailto:art-join@ietf.org>
List-Unsubscribe: <mailto:art-leave@ietf.org>

On Tue, Oct 8, 2024 at 9:52 AM Tim Bray <tbray@textuality.com> wrote:

>
> ### Where is UTF-16 used?
>>
>> ```
>> 178   A surrogate which occurs in text encoded in any transformation
>> format
>> 179   other than UTF-16 has no meaning and may cause malfunction in
>> 180   software that encounters it.  In particular, it is impossible to
>> 181   represent a surrogate in well-formed UTF-8.
>> ```
>>
>> Some guidance here on where to expect UTF-16 could help explain where to
>> expect surrogates.
>>
>
> UTF-16 is essentially never used on the wire. I for one have never seen it
> in my decades of work in this space.  Does anyone have a counter-example?
> Or even better, does anyone know of an RFC that says “you MUST NOT put
> UTF-16 on the wire.”? Because thankfully, nobody does.
>

Its main use today is to send around XML files that are in UTF-16.

https://datatracker.ietf.org/doc/rfc2781/referencedby/

If you run "grep -r" on /Applications on macOS, you'll find a lot of those.
It's because the OS strings were always UTF-16 or UCS-2 until recently, but
it's a gradual unwind. I think the industry realized that O(1) access to
strings, as if they were an array of numbers, was not really necessary. So,
then UTF-8 is better.

It will never go away, though. See this header that is probably shipped
with your operating system of choice:

https://opensource.apple.com/source/WTF/WTF-7606.3.4.0.2/icu/unicode/platform.h.auto.html

"C++11 and C11 require support for UTF-16 literals" ...so now it's baked in.

thanks,
Rob