1dos2unix(1)                       2022-06-05                       dos2unix(1)
2
3
4

NAME

6       dos2unix - DOS/Mac to Unix and vice versa text file format converter
7

SYNOPSIS

9           dos2unix [options] [FILE ...] [-n INFILE OUTFILE ...]
10           unix2dos [options] [FILE ...] [-n INFILE OUTFILE ...]
11

DESCRIPTION

13       The Dos2unix package includes utilities "dos2unix" and "unix2dos" to
14       convert plain text files in DOS or Mac format to Unix format and vice
15       versa.
16
17       In DOS/Windows text files a line break, also known as newline, is a
18       combination of two characters: a Carriage Return (CR) followed by a
19       Line Feed (LF). In Unix text files a line break is a single character:
20       the Line Feed (LF). In Mac text files, prior to Mac OS X, a line break
21       was single Carriage Return (CR) character. Nowadays Mac OS uses Unix
22       style (LF) line breaks.
23
24       Besides line breaks Dos2unix can also convert the encoding of files. A
25       few DOS code pages can be converted to Unix Latin-1. And Windows
26       Unicode (UTF-16) files can be converted to Unix Unicode (UTF-8) files.
27
28       Binary files are automatically skipped, unless conversion is forced.
29
30       Non-regular files, such as directories and FIFOs, are automatically
31       skipped.
32
33       Symbolic links and their targets are by default kept untouched.
34       Symbolic links can optionally be replaced, or the output can be written
35       to the symbolic link target.  Writing to a symbolic link target is not
36       supported on Windows.
37
38       Dos2unix was modelled after dos2unix under SunOS/Solaris.  There is one
39       important difference with the original SunOS/Solaris version. This
40       version does by default in-place conversion (old file mode), while the
41       original SunOS/Solaris version only supports paired conversion (new
42       file mode). See also options "-o" and "-n". Another difference is that
43       the SunOS/Solaris version uses by default iso mode conversion while
44       this version uses by default ascii mode conversion.
45

OPTIONS

47       --  Treat all following options as file names. Use this option if you
48           want to convert files whose names start with a dash. For instance
49           to convert a file named "-foo", you can use this command:
50
51               dos2unix -- -foo
52
53           Or in new file mode:
54
55               dos2unix -n -- -foo out.txt
56
57       --allow-chown
58           Allow file ownership change in old file mode.
59
60           When this option is used, the conversion will not be aborted when
61           the user and/or group ownership of the original file can't be
62           preserved in old file mode. Conversion will continue and the
63           converted file will get the same new ownership as if it was
64           converted in new file mode. See also options "-o" and "-n". This
65           option is only available if dos2unix has support for preserving the
66           user and group ownership of files.
67
68       -ascii
69           Convert only line breaks. This is the default conversion mode.
70
71       -iso
72           Conversion between DOS and ISO-8859-1 character set. See also
73           section CONVERSION MODES.
74
75       -1252
76           Use Windows code page 1252 (Western European).
77
78       -437
79           Use DOS code page 437 (US). This is the default code page used for
80           ISO conversion.
81
82       -850
83           Use DOS code page 850 (Western European).
84
85       -860
86           Use DOS code page 860 (Portuguese).
87
88       -863
89           Use DOS code page 863 (French Canadian).
90
91       -865
92           Use DOS code page 865 (Nordic).
93
94       -7  Convert 8 bit characters to 7 bit space.
95
96       -b, --keep-bom
97           Keep Byte Order Mark (BOM). When the input file has a BOM, write a
98           BOM in the output file. This is the default behavior when
99           converting to DOS line breaks. See also option "-r".
100
101       -c, --convmode CONVMODE
102           Set conversion mode. Where CONVMODE is one of: ascii, 7bit, iso,
103           mac with ascii being the default.
104
105       -D, --display-enc ENCODING
106           Set encoding of displayed text. Where ENCODING is one of: ansi,
107           unicode, unicodebom, utf8, utf8bom with ansi being the default.
108
109           This option is only available in dos2unix for Windows with Unicode
110           file name support. This option has no effect on the actual file
111           names read and written, only on how they are displayed.
112
113           There are several methods for displaying text in a Windows console
114           based on the encoding of the text. They all have their own
115           advantages and disadvantages.
116
117           ansi
118               Dos2unix's default method is to use ANSI encoded text. The
119               advantage is that it is backwards compatible. It works with
120               raster and TrueType fonts. In some regions you may need to
121               change the active DOS OEM code page to the Windows system ANSI
122               code page using the "chcp" command, because dos2unix uses the
123               Windows system code page.
124
125               The disadvantage of ansi is that international file names with
126               characters not inside the system default code page are not
127               displayed properly. You will see a question mark, or a wrong
128               symbol instead. When you don't work with foreign file names
129               this method is OK.
130
131           unicode, unicodebom
132               The advantage of unicode (the Windows name for UTF-16) encoding
133               is that text is usually properly displayed. There is no need to
134               change the active code page.  You may need to set the console's
135               font to a TrueType font to have international characters
136               displayed properly. When a character is not included in the
137               TrueType font you usually see a small square, sometimes with a
138               question mark in it.
139
140               When you use the ConEmu console all text is displayed properly,
141               because ConEmu automatically selects a good font.
142
143               The disadvantage of unicode is that it is not compatible with
144               ASCII. The output is not easy to handle when you redirect it to
145               another program.
146
147               When method "unicodebom" is used the Unicode text will be
148               preceded with a BOM (Byte Order Mark). A BOM is required for
149               correct redirection or piping in PowerShell.
150
151           utf8, utf8bom
152               The advantage of utf8 is that it is compatible with ASCII. You
153               need to set the console's font to a TrueType font. With a
154               TrueType font the text is displayed similar as with the
155               "unicode" encoding.
156
157               The disadvantage is that when you use the default raster font
158               all non-ASCII characters are displayed wrong. Not only unicode
159               file names, but also translated messages become unreadable. On
160               Windows configured for an East-Asian region you may see a lot
161               of flickering of the console when the messages are displayed.
162
163               In a ConEmu console the utf8 encoding method works well.
164
165               When method "utf8bom" is used the UTF-8 text will be preceded
166               with a BOM (Byte Order Mark). A BOM is required for correct
167               redirection or piping in PowerShell.
168
169           The default encoding can be changed with environment variable
170           DOS2UNIX_DISPLAY_ENC by setting it to "unicode", "unicodebom",
171           "utf8", or "utf8bom".
172
173       -f, --force
174           Force conversion of binary files.
175
176       -gb, --gb18030
177           On Windows UTF-16 files are by default converted to UTF-8,
178           regardless of the locale setting. Use this option to convert UTF-16
179           files to GB18030. This option is only available on Windows. See
180           also section GB18030.
181
182       -h, --help
183           Display help and exit.
184
185       -i[FLAGS], --info[=FLAGS] FILE ...
186           Display file information. No conversion is done.
187
188           The following information is printed, in this order: number of DOS
189           line breaks, number of Unix line breaks, number of Mac line breaks,
190           byte order mark, text or binary, file name.
191
192           Example output:
193
194                6       0       0  no_bom    text    dos.txt
195                0       6       0  no_bom    text    unix.txt
196                0       0       6  no_bom    text    mac.txt
197                6       6       6  no_bom    text    mixed.txt
198               50       0       0  UTF-16LE  text    utf16le.txt
199                0      50       0  no_bom    text    utf8unix.txt
200               50       0       0  UTF-8     text    utf8dos.txt
201                2     418     219  no_bom    binary  dos2unix.exe
202
203           Note that sometimes a binary file can be mistaken for a text file.
204           See also option "-s".
205
206           Optionally extra flags can be set to change the output. One or more
207           flags can be added.
208
209           0   Print the file information lines followed by a null character
210               instead of a newline character. This enables correct
211               interpretation of file names with spaces or quotes when flag c
212               is used. Use this flag in combination with xargs(1) option "-0"
213               or "--null".
214
215           d   Print number of DOS line breaks.
216
217           u   Print number of Unix line breaks.
218
219           m   Print number of Mac line breaks.
220
221           b   Print the byte order mark.
222
223           t   Print if file is text or binary.
224
225           c   Print only the files that would be converted.
226
227               With the "c" flag dos2unix will print only the files that
228               contain DOS line breaks, unix2dos will print only file names
229               that have Unix line breaks.
230
231           h   Print a header.
232
233           p   Show file names without path.
234
235           Examples:
236
237           Show information for all *.txt files:
238
239               dos2unix -i *.txt
240
241           Show only the number of DOS line breaks and Unix line breaks:
242
243               dos2unix -idu *.txt
244
245           Show only the byte order mark:
246
247               dos2unix --info=b *.txt
248
249           List the files that have DOS line breaks:
250
251               dos2unix -ic *.txt
252
253           List the files that have Unix line breaks:
254
255               unix2dos -ic *.txt
256
257           Convert only files that have DOS line breaks and leave the other
258           files untouched:
259
260               dos2unix -ic0 *.txt | xargs -0 dos2unix
261
262           Find text files that have DOS line breaks:
263
264               find -name '*.txt' -print0 | xargs -0 dos2unix -ic
265
266       -k, --keepdate
267           Keep the date stamp of output file same as input file.
268
269       -L, --license
270           Display program's license.
271
272       -l, --newline
273           Add additional newline.
274
275           dos2unix: Only DOS line breaks are changed to two Unix line breaks.
276           In Mac mode only Mac line breaks are changed to two Unix line
277           breaks.
278
279           unix2dos: Only Unix line breaks are changed to two DOS line breaks.
280           In Mac mode Unix line breaks are changed to two Mac line breaks.
281
282       -m, --add-bom
283           Write a Byte Order Mark (BOM) in the output file. By default an
284           UTF-8 BOM is written.
285
286           When the input file is UTF-16, and the option "-u" is used, an
287           UTF-16 BOM will be written.
288
289           Never use this option when the output encoding is other than UTF-8,
290           UTF-16, or GB18030. See also section UNICODE.
291
292       -n, --newfile INFILE OUTFILE ...
293           New file mode. Convert file INFILE and write output to file
294           OUTFILE.  File names must be given in pairs and wildcard names
295           should not be used or you will lose your files.
296
297           The person who starts the conversion in new file (paired) mode will
298           be the owner of the converted file. The read/write permissions of
299           the new file will be the permissions of the original file minus the
300           umask(1) of the person who runs the conversion.
301
302       --no-allow-chown
303           Don't allow file ownership change in old file mode (default).
304
305           Abort conversion when the user and/or group ownership of the
306           original file can't be preserved in old file mode. See also options
307           "-o" and "-n". This option is only available if dos2unix has
308           support for preserving the user and group ownership of files.
309
310       -o, --oldfile FILE ...
311           Old file mode. Convert file FILE and overwrite output to it. The
312           program defaults to run in this mode. Wildcard names may be used.
313
314           In old file (in-place) mode the converted file gets the same owner,
315           group, and read/write permissions as the original file. Also when
316           the file is converted by another user who has write permissions on
317           the file (e.g. user root).  The conversion will be aborted when it
318           is not possible to preserve the original values.  Change of owner
319           could mean that the original owner is not able to read the file any
320           more. Change of group could be a security risk, the file could be
321           made readable for persons for whom it is not intended.
322           Preservation of owner, group, and read/write permissions is only
323           supported on Unix.
324
325           To check if dos2unix has support for preserving the user and group
326           ownership of files type "dos2unix -V".
327
328           Conversion is always done via a temporary file. When an error
329           occurs halfway the conversion, the temporary file is deleted and
330           the original file stays intact. When the conversion is successful,
331           the original file is replaced with the temporary file. You may have
332           write permission on the original file, but no permission to put the
333           same user and/or group ownership properties on the temporary file
334           as the original file has. This means you are not able to preserve
335           the user and/or group ownership of the original file. In this case
336           you can use option "--allow-chown" to continue with the conversion:
337
338               dos2unix --allow-chown foo.txt
339
340           Another option is to use new file mode:
341
342               dos2unix -n foo.txt foo.txt
343
344           The advantage of the "--allow-chown" option is that you can use
345           wildcards, and the ownership properties will be preserved when
346           possible.
347
348       -q, --quiet
349           Quiet mode. Suppress all warnings and messages. The return value is
350           zero.  Except when wrong command-line options are used.
351
352       -r, --remove-bom
353           Remove Byte Order Mark (BOM). Do not write a BOM in the output
354           file.  This is the default behavior when converting to Unix line
355           breaks.  See also option "-b".
356
357       -s, --safe
358           Skip binary files (default).
359
360           The skipping of binary files is done to avoid accidental mistakes.
361           Be aware that the detection of binary files is not 100% foolproof.
362           Input files are scanned for binary symbols which are typically not
363           found in text files. It is possible that a binary file contains
364           only normal text characters. Such a binary file will mistakenly be
365           seen as a text file.
366
367       -u, --keep-utf16
368           Keep the original UTF-16 encoding of the input file. The output
369           file will be written in the same UTF-16 encoding, little or big
370           endian, as the input file.  This prevents transformation to UTF-8.
371           An UTF-16 BOM will be written accordingly. This option can be
372           disabled with the "-ascii" option.
373
374       -ul, --assume-utf16le
375           Assume that the input file format is UTF-16LE.
376
377           When there is a Byte Order Mark in the input file the BOM has
378           priority over this option.
379
380           When you made a wrong assumption (the input file was not in
381           UTF-16LE format) and the conversion succeeded, you will get an
382           UTF-8 output file with wrong text.  You can undo the wrong
383           conversion with iconv(1) by converting the UTF-8 output file back
384           to UTF-16LE. This will bring back the original file.
385
386           The assumption of UTF-16LE works as a conversion mode. By switching
387           to the default ascii mode the UTF-16LE assumption is turned off.
388
389       -ub, --assume-utf16be
390           Assume that the input file format is UTF-16BE.
391
392           This option works the same as option "-ul".
393
394       -v, --verbose
395           Display verbose messages. Extra information is displayed about Byte
396           Order Marks and the amount of converted line breaks.
397
398       -F, --follow-symlink
399           Follow symbolic links and convert the targets.
400
401       -R, --replace-symlink
402           Replace symbolic links with converted files (original target files
403           remain unchanged).
404
405       -S, --skip-symlink
406           Keep symbolic links and targets unchanged (default).
407
408       -V, --version
409           Display version information and exit.
410

MAC MODE

412       In normal mode line breaks are converted from DOS to Unix and vice
413       versa.  Mac line breaks are not converted.
414
415       In Mac mode line breaks are converted from Mac to Unix and vice versa.
416       DOS line breaks are not changed.
417
418       To run in Mac mode use the command-line option "-c mac" or use the
419       commands "mac2unix" or "unix2mac".
420

CONVERSION MODES

422       ascii
423           In mode "ascii" only line breaks are converted. This is the default
424           conversion mode.
425
426           Although the name of this mode is ASCII, which is a 7 bit standard,
427           the actual mode is 8 bit. Use always this mode when converting
428           Unicode UTF-8 files.
429
430       7bit
431           In this mode all 8 bit non-ASCII characters (with values from 128
432           to 255) are converted to a 7 bit space.
433
434       iso Characters are converted between a DOS character set (code page)
435           and ISO character set ISO-8859-1 (Latin-1) on Unix. DOS characters
436           without ISO-8859-1 equivalent, for which conversion is not
437           possible, are converted to a dot. The same counts for ISO-8859-1
438           characters without DOS counterpart.
439
440           When only option "-iso" is used dos2unix will try to determine the
441           active code page. When this is not possible dos2unix will use
442           default code page CP437, which is mainly used in the USA.  To force
443           a specific code page use options "-437" (US), "-850" (Western
444           European), "-860" (Portuguese), "-863" (French Canadian), or "-865"
445           (Nordic).  Windows code page CP1252 (Western European) is also
446           supported with option "-1252". For other code pages use dos2unix in
447           combination with iconv(1).  Iconv can convert between a long list
448           of character encodings.
449
450           Never use ISO conversion on Unicode text files. It will corrupt
451           UTF-8 encoded files.
452
453           Some examples:
454
455           Convert from DOS default code page to Unix Latin-1:
456
457               dos2unix -iso -n in.txt out.txt
458
459           Convert from DOS CP850 to Unix Latin-1:
460
461               dos2unix -850 -n in.txt out.txt
462
463           Convert from Windows CP1252 to Unix Latin-1:
464
465               dos2unix -1252 -n in.txt out.txt
466
467           Convert from Windows CP1252 to Unix UTF-8 (Unicode):
468
469               iconv -f CP1252 -t UTF-8 in.txt | dos2unix > out.txt
470
471           Convert from Unix Latin-1 to DOS default code page:
472
473               unix2dos -iso -n in.txt out.txt
474
475           Convert from Unix Latin-1 to DOS CP850:
476
477               unix2dos -850 -n in.txt out.txt
478
479           Convert from Unix Latin-1 to Windows CP1252:
480
481               unix2dos -1252 -n in.txt out.txt
482
483           Convert from Unix UTF-8 (Unicode) to Windows CP1252:
484
485               unix2dos < in.txt | iconv -f UTF-8 -t CP1252 > out.txt
486
487           See also <http://czyborra.com/charsets/codepages.html> and
488           <http://czyborra.com/charsets/iso8859.html>.
489

UNICODE

491   Encodings
492       There exist different Unicode encodings. On Unix and Linux Unicode
493       files are typically encoded in UTF-8 encoding. On Windows Unicode text
494       files can be encoded in UTF-8, UTF-16, or UTF-16 big endian, but are
495       mostly encoded in UTF-16 format.
496
497   Conversion
498       Unicode text files can have DOS, Unix or Mac line breaks, like regular
499       text files.
500
501       All versions of dos2unix and unix2dos can convert UTF-8 encoded files,
502       because UTF-8 was designed for backward compatibility with ASCII.
503
504       Dos2unix and unix2dos with Unicode UTF-16 support, can read little and
505       big endian UTF-16 encoded text files. To see if dos2unix was built with
506       UTF-16 support type "dos2unix -V".
507
508       On Unix/Linux UTF-16 encoded files are converted to the locale
509       character encoding. Use the locale(1) command to find out what the
510       locale character encoding is. When conversion is not possible a
511       conversion error will occur and the file will be skipped.
512
513       On Windows UTF-16 files are by default converted to UTF-8. UTF-8
514       formatted text files are well supported on both Windows and Unix/Linux.
515
516       UTF-16 and UTF-8 encoding are fully compatible, there will no text be
517       lost in the conversion. When an UTF-16 to UTF-8 conversion error
518       occurs, for instance when the UTF-16 input file contains an error, the
519       file will be skipped.
520
521       When option "-u" is used, the output file will be written in the same
522       UTF-16 encoding as the input file. Option "-u" prevents conversion to
523       UTF-8.
524
525       Dos2unix and unix2dos have no option to convert UTF-8 files to UTF-16.
526
527       ISO and 7-bit mode conversion do not work on UTF-16 files.
528
529   Byte Order Mark
530       On Windows Unicode text files typically have a Byte Order Mark (BOM),
531       because many Windows programs (including Notepad) add BOMs by default.
532       See also <http://en.wikipedia.org/wiki/Byte_order_mark>.
533
534       On Unix Unicode files typically don't have a BOM. It is assumed that
535       text files are encoded in the locale character encoding.
536
537       Dos2unix can only detect if a file is in UTF-16 format if the file has
538       a BOM.  When an UTF-16 file doesn't have a BOM, dos2unix will see the
539       file as a binary file.
540
541       Use option "-ul" or "-ub" to convert an UTF-16 file without BOM.
542
543       Dos2unix writes by default no BOM in the output file. With option "-b"
544       Dos2unix writes a BOM when the input file has a BOM.
545
546       Unix2dos writes by default a BOM in the output file when the input file
547       has a BOM. Use option "-r" to remove the BOM.
548
549       Dos2unix and unix2dos write always a BOM when option "-m" is used.
550
551   Unicode file names on Windows
552       Dos2unix has optional support for reading and writing Unicode file
553       names in the Windows Command Prompt. That means that dos2unix can open
554       files that have characters in the name that are not part of the default
555       system ANSI code page.  To see if dos2unix for Windows was built with
556       Unicode file name support type "dos2unix -V".
557
558       There are some issues with displaying Unicode file names in a Windows
559       console.  See option "-D", "--display-enc". The file names may be
560       displayed wrongly in the console, but the files will be written with
561       the correct name.
562
563   Unicode examples
564       Convert from Windows UTF-16 (with BOM) to Unix UTF-8:
565
566           dos2unix -n in.txt out.txt
567
568       Convert from Windows UTF-16LE (without BOM) to Unix UTF-8:
569
570           dos2unix -ul -n in.txt out.txt
571
572       Convert from Unix UTF-8 to Windows UTF-8 with BOM:
573
574           unix2dos -m -n in.txt out.txt
575
576       Convert from Unix UTF-8 to Windows UTF-16:
577
578           unix2dos < in.txt | iconv -f UTF-8 -t UTF-16 > out.txt
579

GB18030

581       GB18030 is a Chinese government standard. A mandatory subset of the
582       GB18030 standard is officially required for all software products sold
583       in China. See also <http://en.wikipedia.org/wiki/GB_18030>.
584
585       GB18030 is fully compatible with Unicode, and can be considered an
586       unicode transformation format. Like UTF-8, GB18030 is compatible with
587       ASCII. GB18030 is also compatible with Windows code page 936, also
588       known as GBK.
589
590       On Unix/Linux UTF-16 files are converted to GB18030 when the locale
591       encoding is set to GB18030. Note that this will only work if the locale
592       is supported by the system. Use command "locale -a" to get the list of
593       supported locales.
594
595       On Windows you need to use option "-gb" to convert UTF-16 files to
596       GB18030.
597
598       GB18030 encoded files can have a Byte Order Mark, like Unicode files.
599

EXAMPLES

601       Read input from 'stdin' and write output to 'stdout':
602
603           dos2unix < a.txt
604           cat a.txt | dos2unix
605
606       Convert and replace a.txt. Convert and replace b.txt:
607
608           dos2unix a.txt b.txt
609           dos2unix -o a.txt b.txt
610
611       Convert and replace a.txt in ascii conversion mode:
612
613           dos2unix a.txt
614
615       Convert and replace a.txt in ascii conversion mode, convert and replace
616       b.txt in 7bit conversion mode:
617
618           dos2unix a.txt -c 7bit b.txt
619           dos2unix -c ascii a.txt -c 7bit b.txt
620           dos2unix -ascii a.txt -7 b.txt
621
622       Convert a.txt from Mac to Unix format:
623
624           dos2unix -c mac a.txt
625           mac2unix a.txt
626
627       Convert a.txt from Unix to Mac format:
628
629           unix2dos -c mac a.txt
630           unix2mac a.txt
631
632       Convert and replace a.txt while keeping original date stamp:
633
634           dos2unix -k a.txt
635           dos2unix -k -o a.txt
636
637       Convert a.txt and write to e.txt:
638
639           dos2unix -n a.txt e.txt
640
641       Convert a.txt and write to e.txt, keep date stamp of e.txt same as
642       a.txt:
643
644           dos2unix -k -n a.txt e.txt
645
646       Convert and replace a.txt, convert b.txt and write to e.txt:
647
648           dos2unix a.txt -n b.txt e.txt
649           dos2unix -o a.txt -n b.txt e.txt
650
651       Convert c.txt and write to e.txt, convert and replace a.txt, convert
652       and replace b.txt, convert d.txt and write to f.txt:
653
654           dos2unix -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt
655

RECURSIVE CONVERSION

657       In a Unix shell the find(1) and xargs(1) commands can be used to run
658       dos2unix recursively over all text files in a directory tree. For
659       instance to convert all .txt files in the directory tree under the
660       current directory type:
661
662           find . -name '*.txt' -print0 |xargs -0 dos2unix
663
664       The find(1) option "-print0" and corresponding xargs(1) option "-0" are
665       needed when there are files with spaces or quotes in the name.
666       Otherwise these options can be omitted. Another option is to use
667       find(1) with the "-exec" option:
668
669           find . -name '*.txt' -exec dos2unix {} \;
670
671       In a Windows Command Prompt the following command can be used:
672
673           for /R %G in (*.txt) do dos2unix "%G"
674
675       PowerShell users can use the following command in Windows PowerShell:
676
677           get-childitem -path . -filter '*.txt' -recurse | foreach-object {dos2unix $_.Fullname}
678

LOCALIZATION

680       LANG
681           The primary language is selected with the environment variable
682           LANG. The LANG variable consists out of several parts. The first
683           part is in small letters the language code. The second is optional
684           and is the country code in capital letters, preceded with an
685           underscore. There is also an optional third part: character
686           encoding, preceded with a dot. A few examples for POSIX standard
687           type shells:
688
689               export LANG=nl               Dutch
690               export LANG=nl_NL            Dutch, The Netherlands
691               export LANG=nl_BE            Dutch, Belgium
692               export LANG=es_ES            Spanish, Spain
693               export LANG=es_MX            Spanish, Mexico
694               export LANG=en_US.iso88591   English, USA, Latin-1 encoding
695               export LANG=en_GB.UTF-8      English, UK, UTF-8 encoding
696
697           For a complete list of language and country codes see the gettext
698           manual:
699           <http://www.gnu.org/software/gettext/manual/html_node/Usual-Language-Codes.html>
700
701           On Unix systems you can use the command locale(1) to get locale
702           specific information.
703
704       LANGUAGE
705           With the LANGUAGE environment variable you can specify a priority
706           list of languages, separated by colons. Dos2unix gives preference
707           to LANGUAGE over LANG.  For instance, first Dutch and then German:
708           "LANGUAGE=nl:de". You have to first enable localization, by setting
709           LANG (or LC_ALL) to a value other than "C", before you can use a
710           language priority list through the LANGUAGE variable. See also the
711           gettext manual:
712           <http://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html>
713
714           If you select a language which is not available you will get the
715           standard English messages.
716
717       DOS2UNIX_LOCALEDIR
718           With the environment variable DOS2UNIX_LOCALEDIR the LOCALEDIR set
719           during compilation can be overruled. LOCALEDIR is used to find the
720           language files. The GNU default value is "/usr/local/share/locale".
721           Option --version will display the LOCALEDIR that is used.
722
723           Example (POSIX shell):
724
725               export DOS2UNIX_LOCALEDIR=$HOME/share/locale
726

RETURN VALUE

728       On success, zero is returned.  When a system error occurs the last
729       system error will be returned. For other errors 1 is returned.
730
731       The return value is always zero in quiet mode, except when wrong
732       command-line options are used.
733

STANDARDS

735       <http://en.wikipedia.org/wiki/Text_file>
736
737       <http://en.wikipedia.org/wiki/Carriage_return>
738
739       <http://en.wikipedia.org/wiki/Newline>
740
741       <http://en.wikipedia.org/wiki/Unicode>
742

AUTHORS

744       Benjamin Lin - <blin@socs.uts.edu.au>, Bernd Johannes Wuebben (mac2unix
745       mode) - <wuebben@kde.org>, Christian Wurll (add extra newline) -
746       <wurll@ira.uka.de>, Erwin Waterlander - <waterlan@xs4all.nl>
747       (maintainer)
748
749       Project page: <http://waterlan.home.xs4all.nl/dos2unix.html>
750
751       SourceForge page: <http://sourceforge.net/projects/dos2unix/>
752

SEE ALSO

754       file(1) find(1) iconv(1) locale(1) xargs(1)
755
756
757
758dos2unix                          2022-06-05                       dos2unix(1)
Impressum