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 [94.130.110.93]) (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 B36E01F44D for ; Mon, 19 Feb 2024 12:38:57 +0000 (UTC) Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 3586082AB4; Mon, 19 Feb 2024 12:38:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1708346330; bh=fF/DVbm/8ucdfXh5q54ieUV4JoHBBvrs1un2yMajk9I=; 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=CaBZPGTCVWWOURtpppuX5qxy6bNF++hP+BwPgFtrqiXcS4Eo83wZP6GLorL0zCeiQ 0msb1oMiXsQcxMnumbwE9qR1yQOBz85uBk0s2hE29AfQYFsgkUw87i4J170nLc8tGu ajzPuaMAlU7rXYzlT/zIy5yn+TPNSUSeLPg4RYbI= Received: from wrqvtvtt.outbound-mail.sendgrid.net (wrqvtvtt.outbound-mail.sendgrid.net [149.72.120.119]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 7E9D082A80 for ; Mon, 19 Feb 2024 12:38:46 +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=Y+IOk1p2; 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=16C8lpmFt4YyB4rDnc8LVG5mXJMLwDtXz1HX9HYHbGg=; b=Y+IOk1p2YqPESWs3uM09pszA50L2fFx3/SRvdcmOylvgYSnC1l/GEdsCXNz+OKXEFKQE cLgmrMASk6ppt1C9waNX5ii/SJEBiEf6LO3DnSv+SSdEfzXmHMIVBY1IwGfNmjgRUkFR0j c0cHlGwgPzgZZvhpTTl9DKJ92NA9E1DRtFez29efDCDcN5f3wRM1y4imddDBLm0MDConaq N8Dcuhj71FKMANlQhXsO8d05iaroPKAMXqNreGX43WBrOKF494yZ36REuTr0ITDyW6oQqA 4LklrqyPN0QatOCzn6yi44FfgRyAidt/fFz3UbBZ24vDTDfN8h8zdWmfX90LDgVw== Received: by filterdrecv-5bbdbb56cd-52lf9 with SMTP id filterdrecv-5bbdbb56cd-52lf9-1-65D34BD5-4 2024-02-19 12:38:45.142500443 +0000 UTC m=+922932.981447217 Received: from herokuapp.com (unknown) by geopod-ismtpd-35 (SG) with ESMTP id mpDKXaBLR2GKxUI8AYi4bA for ; Mon, 19 Feb 2024 12:38:45.094 +0000 (UTC) Date: Mon, 19 Feb 2024 12:38:45 +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: byroot 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: 93401 X-SG-EID: =?us-ascii?Q?Dq8GNIcVqP8cs5uR+EIAabfg3LE9XdC6dZ5KYNrMpf6VzBWG6HqArcu5raQjXL?= =?us-ascii?Q?IGTFdxKHUt7++67+KD54pNYXheirMcsUIf3sdgF?= =?us-ascii?Q?Riq06izw7ioToYQbfTQ6ZHzk5xPfPod327loHzr?= =?us-ascii?Q?bgbMRrn12b=2F6c=2FAOVFV2tqvuOZvqtgjavMZyUq=2F?= =?us-ascii?Q?gw4x5JKQ+CpCFeeFmqL2U9hTZLAqYUvdWRWUzQV?= =?us-ascii?Q?PlUGqpVYcg3LuzfzDrBXfwC2wKWp+H8Ptzf9BUu?= =?us-ascii?Q?ulLDRp6oejuDunqLC=2Fy7w=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== Message-ID-Hash: RTSD4GMIG7ZW7TIPWBNL3W3S5U4WGHOG X-Message-ID-Hash: RTSD4GMIG7ZW7TIPWBNL3W3S5U4WGHOG 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:116845] [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: "byroot (Jean Boussier) via ruby-core" Cc: "byroot (Jean Boussier)" Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Issue #18576 has been updated by byroot (Jean Boussier). Proposed patch: https://github.com/ruby/ruby/pull/10018 I used my initial suggestion: `ASCII-8BIT (BINARY)`, but if the parentheses= are deemed to much, I'm happy to adjust.=20 ---------------------------------------- Feature #18576: Rename `ASCII-8BIT` encoding to `BINARY` https://bugs.ruby-lang.org/issues/18576#change-106871 * 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/