]> git.donarmstrong.com Git - perltidy.git/commit
Fix MSWin32 EOL translation without UTF-8 in backup-mode
authorMarkus Demml <104694616+mardem1@users.noreply.github.com>
Fri, 17 May 2024 12:35:35 +0000 (14:35 +0200)
committerMarkus Demml <104694616+mardem1@users.noreply.github.com>
Fri, 17 May 2024 12:35:35 +0000 (14:35 +0200)
commit7a14f5a6f21d58498d599e565318fe5fbf5d3c18
tree7cdefed2c1c91fa7435727abe25bbf37631a6463
parentadd92dd3917dc89f1ad219d497e0014d1a245a33
Fix MSWin32 EOL translation without UTF-8 in backup-mode

On Windows machines, the CRLF translation layer was left in-place, when using
the backup (-b) without the utf8-ecoding (-enc=utf8) option, which causes
the output file to be converted to "DOS" CRLF line endings, even with
the -ole=unix setting enabled.

Added `binmode` call in `backup_method_move` and `backup_method_copy` to
disable the CRLF translation layer, in the case of none-encoded-data, as
it is already used in `PATH 3b: output to a named file`.
lib/Perl/Tidy.pm