Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

UTF-8 support in dos2unix #276

@a-iv

Description

@a-iv

Git version 1.9.4-preview20140929 ships with old version of dos2unix without utf-8 support.

$ dos2unix --version
dos2unix 3.1 (Thu Nov 19 1998)

Old dos2unix returns 0x00 for non 7-bit ASCII symbols:

$ echo "42¢" | dos2unix
42

Here is non-printable symbols:

$ echo "42¢" | cat --show-all
42M-BM-"$
$ echo "42¢" | dos2unix | cat --show-all
42^@^@^M$

You can update dos2unix to avoid this issue. E.g:

$ /c/Program\ Files\ \(x86\)/dos2unix/bin/dos2unix.exe --version
dos2unix 7.1 (2014-10-06)
$ echo "42¢" | /c/Program\ Files\ \(x86\)/dos2unix/bin/dos2unix.exe | cat --show-all
42M-BM-"$

Also please note that old dos2unix is in \bin\ and will be used by default.

N.B: I am using Microsoft Windows [Version 6.3.9600].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions