From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.0 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_DNSWL_HI, SPF_HELO_PASS,SPF_PASS,UNPARSEABLE_RELAY shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 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) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id F20AF1F61A for ; Mon, 12 Dec 2022 05:00:28 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.b="H6dxFogd"; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 88C117E627; Mon, 12 Dec 2022 05:00:16 +0000 (UTC) Authentication-Results: nue.mailmanlists.eu; 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=H6dxFogd; dkim-atps=neutral Received: from xtrwkhkc.outbound-mail.sendgrid.net (xtrwkhkc.outbound-mail.sendgrid.net [167.89.16.28]) by nue.mailmanlists.eu (Postfix) with ESMTPS id F02237E5D5 for ; Mon, 12 Dec 2022 05:00:10 +0000 (UTC) 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=ShOTH7sV+Wws5erhVxgke4F6t6Drx678sgYFOLOXBTo=; b=H6dxFogdDuXZGMov+9JiNtcbyqCOzlBzwT56qxAcL76BqSoaE958CkvzOdn5G/xU67qi kUdzHo8Z3eL9ZwUuPC1aVS8q3iTCeAYrnP1Os+dMYiUPtMHAcZ2iHI9xaWcOHEnp2boCHt T/WIc9hufwcPFA2M42cw3Xm7qMsEn9rLqXH+kMN6oEqK8aq+1s8vMnl7yRItTyGeNcboI6 8oHc2GyoIhvViwth99T2p/HOwEOQPluNanr7YP88eHIdlTCrJdLCPFFV0lReiuFt6PDdd5 O9pZoAEpM45lxKPS7VGCofNa1e/Es4wHAUjK8/tzfrrif6WqnCyFWJFJ3ocUgIAg== Received: by filterdrecv-6c4ccfbdd8-mgmbx with SMTP id filterdrecv-6c4ccfbdd8-mgmbx-1-6396B559-10 2022-12-12 05:00:09.166320642 +0000 UTC m=+2094877.437174663 Received: from herokuapp.com (unknown) by geopod-ismtpd-3-3 (SG) with ESMTP id qBfwo-iiRpO-AYaRbSOLwg for ; Mon, 12 Dec 2022 05:00:08.973 +0000 (UTC) Date: Mon, 12 Dec 2022 05:00:09 +0000 (UTC) From: "usa (Usaku NAKAMURA)" Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Feature X-Redmine-Issue-Id: 19193 X-Redmine-Issue-Author: YO4 X-Redmine-Issue-Assignee: usa X-Redmine-Sender: usa 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: 87620 X-SG-EID: =?us-ascii?Q?BxDbfNQnwsX=2F0cs5htW3E5gCu78ggpQEdH=2FDrkrDjQAkyUE49pKpjAfYJLF3P8?= =?us-ascii?Q?17DzM4XaHLomB931NWJ7CDjGXcO6Yf5oDkju3Cw?= =?us-ascii?Q?u14fbrl1P4KtiPkwSXIEYuH6V3ZHQmsfHt=2FmZYg?= =?us-ascii?Q?iAEF50dgaak4oI8j8=2FU3y7SJljPH1xfAAmT9tZU?= =?us-ascii?Q?SCQQA2hYn3=2FFRFhfVkBmI=2FyFaAL9jPsncSZiuwp?= =?us-ascii?Q?MSKVc+5klgaWK5oAq=2FmZ2YKkcxW3c+I7PNcKA1y?= =?us-ascii?Q?p1hK30J20Vv+bbWFrrDnw=3D=3D?= To: ruby-dev@ml.ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== Message-ID-Hash: LJHYJJ2RK6ZLU254GO6YQHRZQI6AKY5R X-Message-ID-Hash: LJHYJJ2RK6ZLU254GO6YQHRZQI6AKY5R X-MailFrom: bounces+313651-12dc-ruby-dev=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 (Japanese)" Subject: =?utf-8?q?=5Bruby-dev=3A52019=5D_?= [Ruby master Feature#19193] drop DOS TEXT mode support List-Id: "Ruby developers (Japanese)" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Issue #19193 has been updated by usa (Usaku NAKAMURA). > The most important reason we are keeping "text mode" at reading is backward interoperability for old files. agree. > Are many of text files using LF newlines nowadays on Windows? I don't think so. For example, Excel 2021 outputs CRLF newlines when creating a CSV file. Reading as text mode and writing as binary mode by default seems to be a reasonable chioice. But are the complexity acceptable bv users? ---------------------------------------- Feature #19193: drop DOS TEXT mode support https://bugs.ruby-lang.org/issues/19193#change-100568 * Author: YO4 (Yoshinao Muramatsu) * Status: Assigned * Priority: Normal * Assignee: usa (Usaku NAKAMURA) ---------------------------------------- On Windows platform, ```File.open(path, "r")``` returns an object different from "rt" and "rb". I call that DOS TEXT mode here. DOS TEXT mode does * crlf conversion * 0x1a treated EOF charactor on read and others (see Bug #19192). But DOS TEXT mode is almost unnecessary today and it seems to introduce lot of code complexities. Now there is less need for dos text mode * Microsoft's most apps works without CRLF newline. * Creating a crlf text file today should be explicit. (but that is default mode on windows now) * Interpreting EOF charactor can cause trouble. I think it's time to consider dropping DOS TEXT mode. What challenges are there and what preparation is needed? -- https://bugs.ruby-lang.org/