ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-dev:52013]  [Ruby master Feature#19193] drop DOS TEXT mode support
@ 2022-12-09 16:38 YO4 (Yoshinao Muramatsu)
  2022-12-12  4:47 ` [ruby-dev:52018] " nobu (Nobuyoshi Nakada)
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: YO4 (Yoshinao Muramatsu) @ 2022-12-09 16:38 UTC (permalink / raw)
  To: ruby-dev

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

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

* Author: YO4 (Yoshinao Muramatsu)
* Status: Open
* Priority: Normal
----------------------------------------
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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-dev:52018]  [Ruby master Feature#19193] drop DOS TEXT mode support
  2022-12-09 16:38 [ruby-dev:52013] [Ruby master Feature#19193] drop DOS TEXT mode support YO4 (Yoshinao Muramatsu)
@ 2022-12-12  4:47 ` nobu (Nobuyoshi Nakada)
  2022-12-12  5:00 ` [ruby-dev:52019] " usa (Usaku NAKAMURA)
  2022-12-20 16:53 ` [ruby-dev:52030] " YO4 (Yoshinao Muramatsu) via ruby-dev
  2 siblings, 0 replies; 4+ messages in thread
From: nobu (Nobuyoshi Nakada) @ 2022-12-12  4:47 UTC (permalink / raw)
  To: ruby-dev

Issue #19193 has been updated by nobu (Nobuyoshi Nakada).

Status changed from Open to Assigned
Assignee set to usa (Usaku NAKAMURA)

YO4 (Yoshinao Muramatsu) wrote:
> * Microsoft's most apps works without CRLF newline.

I guess you mean those apps can read without CR, but is it the default to write with LF newlines?

> * Creating a crlf text file today should be explicit. (but that is default mode on windows now)

This is not related to reading, but writing.

> I think it's time to consider dropping DOS TEXT mode.
> What challenges are there and what preparation is needed?

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

How do you think, @usa?
Are many of text files using LF newlines nowadays on Windows?

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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-dev:52019]  [Ruby master Feature#19193] drop DOS TEXT mode support
  2022-12-09 16:38 [ruby-dev:52013] [Ruby master Feature#19193] drop DOS TEXT mode support YO4 (Yoshinao Muramatsu)
  2022-12-12  4:47 ` [ruby-dev:52018] " nobu (Nobuyoshi Nakada)
@ 2022-12-12  5:00 ` usa (Usaku NAKAMURA)
  2022-12-20 16:53 ` [ruby-dev:52030] " YO4 (Yoshinao Muramatsu) via ruby-dev
  2 siblings, 0 replies; 4+ messages in thread
From: usa (Usaku NAKAMURA) @ 2022-12-12  5:00 UTC (permalink / raw)
  To: ruby-dev

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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-dev:52030]  [Ruby master Feature#19193] drop DOS TEXT mode support
  2022-12-09 16:38 [ruby-dev:52013] [Ruby master Feature#19193] drop DOS TEXT mode support 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
  2 siblings, 0 replies; 4+ messages in thread
From: YO4 (Yoshinao Muramatsu) via ruby-dev @ 2022-12-20 16:53 UTC (permalink / raw)
  To: ruby-dev; +Cc: YO4 (Yoshinao Muramatsu)

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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-12-20 16:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-09 16:38 [ruby-dev:52013] [Ruby master Feature#19193] drop DOS TEXT mode support 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 ` [ruby-dev:52030] " YO4 (Yoshinao Muramatsu) via ruby-dev

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).