Project

General

Profile

Actions

Bug #18882

closed

File.read cuts off a text file with special characters when reading it on MS Windows

Added by magynhard (Matthäus Johannes Beyrle) almost 2 years ago. Updated almost 2 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x64-mingw-ucrt]
[ruby-core:109063]

Description

When using File.read to read a text file (in this case a javascript file) with special characters, the content is cut off at special characters.

It occurs only when running ruby on Windows, tried several versions, including the latest.

Does not occur on Linux or WSL (Windows Subsystem for Linux).

I created a github repo including a test script and the source file as the result inside a file as well:
https://github.com/grob-net4industry/ruby_win_file_bug


Files

copy_pdfmake.min.js (582 KB) copy_pdfmake.min.js magynhard (Matthäus Johannes Beyrle), 06/27/2022 11:12 AM
pdfmake.min.js (1.29 MB) pdfmake.min.js magynhard (Matthäus Johannes Beyrle), 06/27/2022 11:12 AM
diff.png (55.9 KB) diff.png magynhard (Matthäus Johannes Beyrle), 06/27/2022 11:12 AM

Related issues 1 (1 open0 closed)

Related to Ruby master - Feature #19193: drop DOS TEXT mode supportAssignedusa (Usaku NAKAMURA)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0