From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Received: from nue.mailmanlists.eu (nue.mailmanlists.eu [IPv6:2a01:4f8:1c0c:6b10::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id A3DED1F406 for ; Wed, 20 Dec 2023 08:44:52 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=ml.ruby-lang.org header.i=@ml.ruby-lang.org header.a=rsa-sha256 header.s=mail header.b=LxlMIoTW; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=LgqsLg7U; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 6439F81929; Wed, 20 Dec 2023 08:44:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1703061886; bh=xsPPXia+1RlJR+Gz6J3upQYa093ByCEw0DUOO/qZYWs=; h=Date:References:To:Reply-To:Subject:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From:Cc:From; b=LxlMIoTW5mV6q/pn2LRNdBIb7P6K4NU3HkkpCmevwmwBU6vrfkx99/gYSslEUinea 8tzWfci36FBcr8lBaTwoak4wyrhNgvLY0yHaW1C8j9EJj+yGh9SmXy6/Szi2O4PK6Y 9u3XSNT2e92/cEmfgmt9e3K0R1QYHn8/3weRkEW0= Received: from wrqvtvtt.outbound-mail.sendgrid.net (wrqvtvtt.outbound-mail.sendgrid.net [149.72.120.119]) by nue.mailmanlists.eu (Postfix) with ESMTPS id EB3F48191B for ; Wed, 20 Dec 2023 08:44:42 +0000 (UTC) Authentication-Results: nue.mailmanlists.eu; dkim=pass (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=LgqsLg7U; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ruby-lang.org; h=from:references:subject:mime-version:content-type: content-transfer-encoding:list-id:to:cc:content-type:from:subject:to; s=s1; bh=MnfL3cAOyu+GSPiR+vsDewsmhMQ8TBMkkYmZ2Hj2ENQ=; b=LgqsLg7UfptrNuoPqwQvUUQhy0OlqJQPN0uNP/Uhj68QNA1IzG0HPD2he2kv4h7ZhS8L JyKLl/uYE0HAyGDLcHNbLdHYm2lfX6lSl4Fm8LzaFu1UIZ8+52rt+FZOztkO8LmVMt3qHx LjUtMRBPX8sn4KYVc9F7oVHsjhZlX/zhuED4vRbKhGhWjU5e1j+0agjaBzwP3EQ2qflU/I PyQcHOcaaViaQ1zjRUz5bJeJtnGSBpaMexCV3KqIGLrQ+awWjPR9zez6SmybFjwehPKpvs vVdO1aqjqTVrEROFjqLksXereuIOxUhl9FdvTcwJgVrqkR53E0UEehJTqDqwU3TQ== Received: by filterdrecv-5bbdbb56cd-svthp with SMTP id filterdrecv-5bbdbb56cd-svthp-1-6582A979-20 2023-12-20 08:44:41.616644816 +0000 UTC m=+751294.734631769 Received: from herokuapp.com (unknown) by geopod-ismtpd-1 (SG) with ESMTP id w7LHDZ7LRhSdIfvgJBMkAw for ; Wed, 20 Dec 2023 08:44:41.606 +0000 (UTC) Date: Wed, 20 Dec 2023 08:44:41 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Feature X-Redmine-Issue-Id: 18576 X-Redmine-Issue-Author: byroot X-Redmine-Sender: naruse X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-Redmine-MailingListIntegration-Message-Ids: 92348 X-SG-EID: =?us-ascii?Q?0oAA3NPtKrfodLYVvfdBwzZ6z1kAf1KA3l5gJf+iOYqA7G=2FRSBGS1ttyILG0xo?= =?us-ascii?Q?Ig++j=2Ftvl5ZAAcrN2SUEjeiJ9jHv3onDKZUlBWt?= =?us-ascii?Q?coWGYlWfelPykSFVf4UI3ClMPrjp2tYXo+n442c?= =?us-ascii?Q?yDuMO9+i5L8OT8G06uLTn=2FtXjnHgEOLINkMK4MV?= =?us-ascii?Q?gIGeG7XPhj1MrZ9siqdgsopQ3ugTBwaS0Nv4OPd?= =?us-ascii?Q?E4V=2FrkS+EprRyETWwXXw8TcpZGfNXV6E8BLnuCP?= =?us-ascii?Q?8ugKO1FJZNSJ0OHuwtQ1g=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== Message-ID-Hash: HWOSOZVGWKBRXDVSTMY7DYDROLYT2GTF X-Message-ID-Hash: HWOSOZVGWKBRXDVSTMY7DYDROLYT2GTF X-MailFrom: bounces+313651-b711-ruby-core=ml.ruby-lang.org@em5188.ruby-lang.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:115813] [Ruby master Feature#18576] Rename `ASCII-8BIT` encoding to `BINARY` List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "naruse (Yui NARUSE) via ruby-core" Cc: "naruse (Yui NARUSE)" Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Issue #18576 has been updated by naruse (Yui NARUSE). I strongly object that we change Encoding#name of ASCII-8BIT encoding into = "BINARY" because of compatibility. I don't want people to fix the code which are correctly running now. However supporting people who newly writing a code is reasonable. I agree to add more information in Encoding#inspect and error message. ---------------------------------------- Feature #18576: Rename `ASCII-8BIT` encoding to `BINARY` https://bugs.ruby-lang.org/issues/18576#change-105762 * Author: byroot (Jean Boussier) * Status: Open * Priority: Normal * Target version: 3.4 ---------------------------------------- ### Context I'm now used to it, but something that confused me for years was errors suc= h as: ```ruby >> "f=E9e" + "\xFF".b (irb):3:in `+': incompatible character encodings: UTF-8 and ASCII-8BIT (Enc= oding::CompatibilityError) ``` When you aren't that familiar with Ruby, it's really not evident that `ASCI= I-8BIT` basically means "no encoding" or "binary". And even when you know it, if you don't read carefully it's very easily con= fused with `US-ASCII`. The `Encoding::BINARY` alias is much more telling IMHO. ### Proposal Since `Encoding::ASCII_8BIT` has been aliased as `Encoding::BINARY` for yea= rs, I think renaming it to `BINARY` and then making asking `ASCII_8BIT` the= alias would significantly improve usability without backward compatibility= concerns. The only concern I could see would be the consistency with a handful of C A= PI functions: - `rb_encoding *rb_ascii8bit_encoding(void)` - `int rb_ascii8bit_encindex(void)` - `VALUE rb_io_ascii8bit_binmode(VALUE io)` But that's for much more advanced users, so I don't think it's much of a co= ncern. --=20 https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-c= ore.ml.ruby-lang.org/