ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
From: "YO4 (Yoshinao Muramatsu) via ruby-dev" <ruby-dev@ml.ruby-lang.org>
To: ruby-dev@ml.ruby-lang.org
Cc: "YO4 (Yoshinao Muramatsu)" <noreply@ruby-lang.org>
Subject: [ruby-dev:52030]  [Ruby master Feature#19193] drop DOS TEXT mode support
Date: Tue, 20 Dec 2022 16:53:16 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-100728.20221220165316.50278@ruby-lang.org> (raw)
In-Reply-To: <redmine.issue-19193.20221209163820.50278@ruby-lang.org>

Issue #19193 has been updated by YO4 (Yoshinao Muramatsu).


> The most important reason we are keeping "text mode" at reading is backward interoperability for old files.

agree too.

Interoperability with the unix environment is becoming increasingly important.
So, when writing CRLF newline it is better to specify it explicitly.

----------------------------------------
Feature #19193: drop DOS TEXT mode support
https://bugs.ruby-lang.org/issues/19193#change-100728

* 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/

      parent reply	other threads:[~2022-12-20 16:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-09 16:38 [ruby-dev:52013] " YO4 (Yoshinao Muramatsu)
2022-12-12  4:47 ` [ruby-dev:52018] " nobu (Nobuyoshi Nakada)
2022-12-12  5:00 ` [ruby-dev:52019] " usa (Usaku NAKAMURA)
2022-12-20 16:53 ` YO4 (Yoshinao Muramatsu) via ruby-dev [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-100728.20221220165316.50278@ruby-lang.org \
    --to=ruby-dev@ml.ruby-lang.org \
    --cc=noreply@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).