Project

General

Profile

Actions

Feature #19193

open

drop DOS TEXT mode support

Added by YO4 (Yoshinao Muramatsu) almost 2 years ago. Updated almost 2 years ago.

Status:
Assigned
Target version:
-
[ruby-dev:52013]

Description

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?


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #18882: File.read cuts off a text file with special characters when reading it on MS WindowsRejectedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0