summaryrefslogtreecommitdiff
path: root/man/man1/dos2unix.1
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2016-10-20 13:28:30 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2016-10-20 13:28:33 +0900
commit6ad0574136d3b23b486db4fa359672b9f731e235 (patch)
treeae96a2384615b0132969083bc097c918acf4e9f7 /man/man1/dos2unix.1
parentde90208a6d3f0b5c5944c4aa4d4ea95fc2611470 (diff)
downloaddos2unix-6ad0574136d3b23b486db4fa359672b9f731e235.tar.gz
dos2unix-6ad0574136d3b23b486db4fa359672b9f731e235.tar.bz2
dos2unix-6ad0574136d3b23b486db4fa359672b9f731e235.zip
Imported Upstream version 7.0
Change-Id: Ib83b48cbb624fbb64cd653899c84ddffdcd21860 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'man/man1/dos2unix.1')
-rw-r--r--man/man1/dos2unix.149
1 files changed, 32 insertions, 17 deletions
diff --git a/man/man1/dos2unix.1 b/man/man1/dos2unix.1
index e0cc096..e0fcace 100644
--- a/man/man1/dos2unix.1
+++ b/man/man1/dos2unix.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.20)
+.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -71,7 +71,7 @@
.\" ========================================================================
.\"
.IX Title "dos2unix 1"
-.TH dos2unix 1 "2014-07-09" "dos2unix" "2014-08-03"
+.TH dos2unix 1 "2014-09-08" "dos2unix" "2014-09-09"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -191,8 +191,14 @@ line breaks.
In Mac mode Unix line breaks are changed to two Mac line breaks.
.IP "\fB\-m, \-\-add\-bom\fR" 4
.IX Item "-m, --add-bom"
-Write an \s-1UTF\-8\s0 Byte Order Mark in the output file. Never use this option when
-the output encoding is other than \s-1UTF\-8.\s0 See also section \s-1UNICODE.\s0
+Write a Byte Order Mark (\s-1BOM\s0) in the output file. By default an \s-1UTF\-8 BOM\s0
+is written.
+.Sp
+When the input file is \s-1UTF\-16,\s0 and the option \f(CW\*(C`\-u\*(C'\fR is used, an \s-1UTF\-16
+BOM\s0 will be written.
+.Sp
+Never use this option when the output encoding is other than \s-1UTF\-8\s0 or \s-1UTF\-16.\s0
+See also section \s-1UNICODE.\s0
.IP "\fB\-n, \-\-newfile \s-1INFILE OUTFILE ...\s0\fR" 4
.IX Item "-n, --newfile INFILE OUTFILE ..."
New file mode. Convert file \s-1INFILE\s0 and write output to file \s-1OUTFILE.\s0
@@ -228,6 +234,12 @@ See also option \f(CW\*(C`\-b\*(C'\fR.
.IP "\fB\-s, \-\-safe\fR" 4
.IX Item "-s, --safe"
Skip binary files (default).
+.IP "\fB\-u, \-\-keep\-utf16\fR" 4
+.IX Item "-u, --keep-utf16"
+Keep the original \s-1UTF\-16\s0 encoding of the input file. The output file will be
+written in the same \s-1UTF\-16\s0 encoding, little or big endian, as the input file.
+This prevents transformation to \s-1UTF\-8.\s0 An \s-1UTF\-16 BOM\s0 will be written
+accordingly. This option can be disabled with the \f(CW\*(C`\-ascii\*(C'\fR option.
.IP "\fB\-ul, \-\-assume\-utf16le\fR" 4
.IX Item "-ul, --assume-utf16le"
Assume that the input file format is \s-1UTF\-16LE.\s0
@@ -247,6 +259,10 @@ The assumption of \s-1UTF\-16LE\s0 works as a \fIconversion mode\fR. By switchin
Assume that the input file format is \s-1UTF\-16BE.\s0
.Sp
This option works the same as option \f(CW\*(C`\-ul\*(C'\fR.
+.IP "\fB\-v, \-\-verbose\fR" 4
+.IX Item "-v, --verbose"
+Display verbose messages. Extra information is displayed about Byte Order Marks
+and the amount of converted line breaks.
.IP "\fB\-F, \-\-follow\-symlink\fR" 4
.IX Item "-F, --follow-symlink"
Follow symbolic links and convert the targets.
@@ -374,18 +390,19 @@ Dos2unix and unix2dos with Unicode \s-1UTF\-16\s0 support, can read little and b
endian \s-1UTF\-16\s0 encoded text files. To see if dos2unix was built with \s-1UTF\-16\s0
support type \f(CW\*(C`dos2unix \-V\*(C'\fR.
.PP
-The Windows versions of dos2unix and unix2dos convert \s-1UTF\-16\s0 encoded files
-always to \s-1UTF\-8\s0 encoded files. Unix versions of dos2unix/unix2dos convert
-\&\s-1UTF\-16\s0 encoded files to the locale character encoding when it is set to \s-1UTF\-8.\s0
-Use the \fIlocale\fR\|(1) command to find out what the locale character encoding is.
+\&\s-1UTF\-16\s0 encoded files are by default converted to \s-1UTF\-8.\s0 On Unix/Linux it is
+required that the locale character encoding is set to \s-1UTF\-8.\s0 Use the \fIlocale\fR\|(1)
+command to find out what the locale character encoding is. \s-1UTF\-8\s0 formatted
+text files are well supported on both Windows and Unix/Linux.
+.PP
+\&\s-1UTF\-16\s0 and \s-1UTF\-8\s0 encoding are fully compatible, there will no text be lost in
+the conversion. When an \s-1UTF\-16\s0 to \s-1UTF\-8\s0 conversion error occurs, for instance
+when the \s-1UTF\-16\s0 input file contains an error, the file will be skipped.
.PP
-Because \s-1UTF\-8\s0 formatted text files are well supported on both Windows and Unix,
-dos2unix and unix2dos have no option to write \s-1UTF\-16\s0 files. All \s-1UTF\-16\s0
-characters can be encoded in \s-1UTF\-8.\s0 Conversion from \s-1UTF\-16\s0 to \s-1UTF\-8\s0 is without
-loss. \s-1UTF\-16\s0 files will be skipped on Unix when the locale character encoding
-is not \s-1UTF\-8,\s0 to prevent accidental loss of text. When an \s-1UTF\-16\s0 to \s-1UTF\-8\s0
-conversion error occurs, for instance when the \s-1UTF\-16\s0 input file contains
-an error, the file will be skipped.
+When option \f(CW\*(C`\-u\*(C'\fR is used, the output file will be written in the same \s-1UTF\-16\s0
+encoding as the input file. Option \f(CW\*(C`\-u\*(C'\fR prevents conversion to \s-1UTF\-8.\s0
+.PP
+Dos2unix and unix2dos have no option to convert \s-1UTF\-8\s0 files to \s-1UTF\-16.\s0
.PP
\&\s-1ISO\s0 and 7\-bit mode conversion do not work on \s-1UTF\-16\s0 files.
.SS "Byte Order Mark"
@@ -597,8 +614,6 @@ Erwin Waterlander \- <waterlan@xs4all.nl> (Maintainer)
Project page: <http://waterlan.home.xs4all.nl/dos2unix.html>
.PP
SourceForge page: <http://sourceforge.net/projects/dos2unix/>
-.PP
-Freecode: <http://freecode.com/projects/dos2unix>
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fIfile\fR\|(1)