diff --git a/Tools/dos2unix/README.txt b/Tools/dos2unix/README.txt deleted file mode 100644 index c6720a2..0000000 --- a/Tools/dos2unix/README.txt +++ /dev/null @@ -1,3 +0,0 @@ -This was downloaded from http://waterlan.home.xs4all.nl/dos2unix.html - -dos2unix-7.2-win32.zip Windows 32 bit version. diff --git a/Tools/dos2unix/bin/dos2unix.exe b/Tools/dos2unix/bin/dos2unix.exe deleted file mode 100644 index 5cacd36..0000000 Binary files a/Tools/dos2unix/bin/dos2unix.exe and /dev/null differ diff --git a/Tools/dos2unix/bin/mac2unix.exe b/Tools/dos2unix/bin/mac2unix.exe deleted file mode 100644 index 5cacd36..0000000 Binary files a/Tools/dos2unix/bin/mac2unix.exe and /dev/null differ diff --git a/Tools/dos2unix/bin/unix2dos.exe b/Tools/dos2unix/bin/unix2dos.exe deleted file mode 100644 index a2c5a30..0000000 Binary files a/Tools/dos2unix/bin/unix2dos.exe and /dev/null differ diff --git a/Tools/dos2unix/bin/unix2mac.exe b/Tools/dos2unix/bin/unix2mac.exe deleted file mode 100644 index a2c5a30..0000000 Binary files a/Tools/dos2unix/bin/unix2mac.exe and /dev/null differ diff --git a/Tools/dos2unix/share/doc/dos2unix-7.2/BUGS.txt b/Tools/dos2unix/share/doc/dos2unix-7.2/BUGS.txt deleted file mode 100644 index 62f817c..0000000 --- a/Tools/dos2unix/share/doc/dos2unix-7.2/BUGS.txt +++ /dev/null @@ -1,19 +0,0 @@ -KNOWN BUGS - - querycp.c: query_con_codepage() - The DOS 16 and 32 bit versions compiled with OpenWatcom report - a wrong active code page under Windows 98. - A correct code page is reported under FreeDOS. - - -REPORTING BUGS - - Report bugs at the dos2unix SourceForge page - http://sourceforge.net/projects/dos2unix/ - - Bugs tracker: http://sourceforge.net/p/dos2unix/bugs/ - - Also patches and feature requests can be entered under the - "Tickets" tab. - - or send an email to Erwin Waterlander diff --git a/Tools/dos2unix/share/doc/dos2unix-7.2/COPYING.txt b/Tools/dos2unix/share/doc/dos2unix-7.2/COPYING.txt deleted file mode 100644 index ff6ac3b..0000000 --- a/Tools/dos2unix/share/doc/dos2unix-7.2/COPYING.txt +++ /dev/null @@ -1,30 +0,0 @@ -The dos2unix package is distributed under FreeBSD style license. -See also http://www.freebsd.org/copyright/freebsd-license.html --------- - -Copyright (C) 2009-2015 Erwin Waterlander -Copyright (C) 1998 Christian Wurll -Copyright (C) 1998 Bernd Johannes Wuebben -Copyright (C) 1994-1995 Benjamin Lin. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice in the documentation and/or other materials provided with - the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT -OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Tools/dos2unix/share/doc/dos2unix-7.2/ChangeLog.txt b/Tools/dos2unix/share/doc/dos2unix-7.2/ChangeLog.txt deleted file mode 100644 index 454c14e..0000000 --- a/Tools/dos2unix/share/doc/dos2unix-7.2/ChangeLog.txt +++ /dev/null @@ -1,1045 +0,0 @@ -2015-02-11 Erwin Waterlander - * Version 7.2 - -2015-01-15 Armin Müller - * common.c,dos2unix.c,unix2dos.c: Use %u in format strings for - unsigned ints. - * common.c: Fixed typo in if condition in write_bom(). - -2015-01-15 Erwin Waterlander - * test/gb18030.t: Added more tests. - -2015-01-03 Erwin Waterlander - * Makefile: Fixed wrong encoded titles in HTML manuals when Perl 5.18 - pod2html was used. Thanks to Tom Christiansen. - -2015-01-02 Erwin Waterlander - * Makefile, man/man1/Makefile: add option --no-wrap to xgettext and - msgmerge. Translation Project standard is not to wrap. - -2015-01-02 Erwin Waterlander - * man/man1/dos2unix.pod: Point to gettext manual html nodes instead of - the full gettext manual. - -2014-12-31 Erwin Waterlander - * man/man1/dos2unix.pod: Cleanup man page. Thanks to Benno Schulenberg. - -2014-12-30 Erwin Waterlander - * common.c: Changed some messages for better translations. - -2014-12-26 Erwin Waterlander - * common.c: Fix. On Windows when option -gb is used, option -m must - add GB18030 BOM i.s.o. UTF-8 BOM. - * test/gb18030.t: Make tests working for Windows version. - -2014-12-24 Erwin Waterlander - * common.c: Fix. In a GB18030 locale, option -m must add GB18030 BOM - i.s.o. UTF-8 BOM. - * test/gb18030.t: New tests for GB18030. - -2014-12-23 Erwin Waterlander - * man/man1/dos2unix.pod: Update section GB18030. - -2014-12-08 Erwin Waterlander - * common.c: When the input file is UTF-16, the input and output - formats are printed. - -2014-12-06 Erwin Waterlander - * common.c: On Unix/Linux convert UTF-16 to the locale encoding. It is - no longer required that the locale encoding is UTF-8. When - conversion is not possible an error will occur and conversion will be - skipped. - -2014-12-06 Erwin Waterlander - * common.c, common.h: Support conversion of UTF-16 to GB18030. - * man/man1/dos2unix.pod: Update with info about GB18030. - -2014-11-09 Yasuaki Taniguchi - * po/ja.po: New Japanese translation of the UI messages. - -2014-10-06 Erwin Waterlander - * Version 7.1 - -2014-09-29 Erwin Waterlander - * common.c: Fixed possible uninitialized use of variable bomtype_orig. - * djgpp.mak: Fix time stamps mac2unix/unix2mac after make strip. - -2014-09-22 Erwin Waterlander - * mingw32.mak, mingw64.mak: Fixed setting path to CRT_glob.o. - Works now independent of MSYS2 install path. - -2014-09-22 Helmut Karlowski - * Makefile: Added settings for freeMiNT, and cleanup setting - OS specific settings. - * common.c: PrintVersion() updated for freeMiNT. - -2014-09-18 Erwin Waterlander - * test/misc.t: Added a test for option -i, --info. - * *.po: Included several translation updates. - -2014-09-17 Erwin Waterlander - * common.c: Program terminates when wrong flag is given for option - -i or --info. - * common.c: Option -i, flag c: don't print binary files when conversion - of binaries is not forced. - -2014-09-16 Erwin Waterlander - * common.c: Options -i, --info can have extra flags to change the - output. For instance to print only the number of Unix line breaks, - or print only the files that have DOS line breaks. - * man/man1/dos2unix.pod: Updated. - -2014-09-11 Erwin Waterlander - * common.c: New option -i, --info, display file information. - This new option prints number of line breaks, the byte order - mark, and if the file is text or binary. - * man/man1/dos2unix.pod: Added option -i. - * test/*.t: Use Test::Simple iso Test::More. - -2014-09-09 Erwin Waterlander - * Version 7.0 - -2014-09-08 Erwin Waterlander - * common.c: Option -V prints home page. - -2014-09-03 Erwin Waterlander - * dos2unix.c, unix2dos.c: Return an error number in stdio mode when the - input is binary. In stdio mode an input stream with a binary symbol - produces broken output. In file mode the binary file is skipped. - * test/misc.t: Added tests for above. - * dos2unix.c, unix2dos.c, common.c: Bug fix. System error number was not - always returned. When disk is full and output can't be written, - or when resolving a symlink fails. - -2014-09-01 Erwin Waterlander - * common.c: Bug fix. Option -u disabled -m for ASCII or UTF-8 input - files without BOM. Bug was introduced on 2014-08-05. - * dos2unix.c, unix2dos.c, common.c: Bug fix. An Unicode input file - disabled 7bit and iso mode also for next input files. Bug was - introduced in version 6.0.1 on 2012-03-23. - * common.c: Cleanup. Don't write BOM when conversion will be cancelled. - * test/misc.t: Added tests for the two bug fixes. - -2014-08-28 Erwin Waterlander - * dos2unix.c, unix2dos.c, common.c: Code cleanup. Moved more code - to common.c. - * common.c: Bug fix mac2unix help text, options -b and -r. Bug was - introduced in 6.0.6. - * *.po: Included updated pt_BR translations. - -2014-08-26 Erwin Waterlander - * dos2unix.c, unix2dos.c, common.c: stdio mode does not automatically - set quiet mode. stdio mode prints errors and returns error code. - * dos2unix.c, unix2dos.c: stdio mode does not automatically force - conversion of binaries. - -2014-08-25 Erwin Waterlander - * test/symlink.t: New tests for options -F, -R, -S - * *.po: Included updated nl,nb ,vi translations. - -2014-08-22 Erwin Waterlander - * *.po: Included updated nl,pl,ru translations. - -2014-08-18 Erwin Waterlander - * unix2dos.c: Fix: Unix2dos did not count UTF-16 line break conversions. - * INSTALL.txt: Update for running self-tests. - * *.po: Included updated fr,de,uk translations. - * test: Added more tests. - -2014-08-17 Erwin Waterlander - * test: Use TAP (Test Anything Protocol) to run tests. - Requires perl module perl-Test-Simple. - -2014-08-11 Erwin Waterlander - * test: Added automated tests. - -2014-08-10 Erwin Waterlander - * dos2unix.c: Bug fix: dos2unix -l created DOS line breaks - from Mac line breaks. This bug was introduced in version 3.2, - by safeconv patch. - * INSTALL.txt: Update for DJGPP. Use gcc <= 4.5.3. - -2014-08-08 Erwin Waterlander - * man/man1/dos2unix.pod: Update manual wrt Unicode. - * common.c: Update help message for option -m. - -2014-08-06 Erwin Waterlander - * New option -v, --verbose: Print extra information about - number of converted line breaks and BOMs. - -2014-08-05 Erwin Waterlander - * New option -u, --keep_utf16: Keep UTF-16 encoding of the - input file. This prevents transformation to UTF-8. - -2014-08-03 Erwin Waterlander - * Version 6.0.6 - -2014-08-03 Enrique Lazcorreta Puigmartí - * po/es.po : Updated Spanish translation of messages. - * man/es/man1/dos2unix.po : Updated Spanish translation of manual. - -2014-07-12 Various authors - * po/*.po, man/*/man1/*.po: Update translations. - See README.txt for details. - -2014-07-12 Yuri Kozlov - * po/ru.po: Update Russian translation of messages. - -2014-07-09 Erwin Waterlander - * dos2unix.c, unix2dos.c: Option -r also disables option - -m (add BOM). - -2014-07-07 Erwin Waterlander - * dos2unix.c, unix2dos.c, common.c: New options -b (keep BOM) - and -r (remove BOM). - -2014-07-06 Erwin Waterlander - * dos2unix.c: Bug fix mac2unix conversion of UTF-16 files. - Mac to Unix conversion produced corrupted output. - Thanks to report of Alan S. Jones. - This bug was introduced in version 6.0. - -2014-05-24 Åka Sikrom - * po/nb.po: New Norwegian Bokmaal translation. - -2014-05-17 Mario Blättermann - * po/de.po: Update German messages. - -2014-05-12 Erwin Waterlander - * INSTALL.txt: Updated for building 64-bit applications - with Microsoft Visual C++ Express. - -2014-05-12 Frédéric Marchal - * man/fr/man1/dos2unix.po: Fixed minor translation error. - -2014-04-23 Erwin Waterlander - * man/man1/Makefile: Removed dependency on GNU sed. - Thanks to Daniel Macks. - * BUGS.txt: Update URL to bug tracker. - -2014-04-17 Erwin Waterlander - * Version 6.0.5 - -2014-04-09 Erwin Waterlander - * common.c: Fix symbolic_link(), don't print error when file - does not exist (problem was introduced on 2014-03-21). - -2014-04-08 Erwin Waterlander - * Makefile: Fix for GNU make < 3.82. For rules with multiple - patterns, put rule with shortest stem first. - -2014-04-04 Erwin Waterlander - * vc.mak, wcc.mif: Only generate English manuals. Target clean - does not delete the manuals, new target maintainer-clean does. - -2014-03-23 Jakub Bogusz - * man/pl/dos2unix.po: New Polish translation of the manual. - -2014-03-23 Benno Schulenberg - * man/nl/dos2unix.po: Update Dutch manual. - -2014-03-22 Balázs Úr - * po/hu.po: New Hungarian translation of UI messages. - -2014-03-21 Erwin Waterlander - * common.c: Windows version of function symbolic_link(). - Now Windows version also skips symbolic links by default. - * man/man1/dos2unix.pod: Update wrt Windows symbolic links, - and some minor updates. - * Makefile: Fix some dependencies for man page creation. - -2014-03-18 Rafael Ferreira - * man/pt_BR/man1/dos2unix.po: New Brazilian Portuguese - translation of the manual. - -2014-03-18 Frédéric Marchal - * man/fr/man1/dos2unix.po: New French translation of the manual. - -2014-03-16 Yuri Chornoivan - * man/uk/man1/dos2unix.po: New Ukrainian translation of the manual. - -2014-03-16 Erwin Waterlander - * Makefile: New target 'getpoman' to get .po files for the manuals - from the Translation Project. - -2014-03-15 Mario Blättermann - * man/de/man1/dos2unix.po: New German translation of the - manual. - -2014-03-14 Erwin Waterlander - * man/man1/Makefile: Generate pod files from gettext - po files with po4a, for easier translation. Thanks to - Mario Blätterman. - See also http://po4a.alioth.debian.org/ - * man/nl/man1/dos2unix.po, man/es/man/dos2unix.po: - New po files, created from original pod. - Thanks to Mario Blätterman. - * man/nl/man1/dos2unix.pod, man/es/man/dos2unix.pod: - Deleted. These are generated now. - * Makefile: Update for manual generation from .po files. - * Makefile, man/man1/Makefile: All man pages are now in - UTF-8 format. - * Makefile: Esperanto x notation no longer supported. - Conversion from UTF-8 is troublesome and gettext will - automatically translate to caret (^) notation when UTF-8 - is not supported by the system. - * po/eo-x.po: Deleted. - -2014-03-14 mail6543210 - * po/zh_TW.po: New Chinese (traditional) translation. - -2014-03-06 Thomas Pryds - * po/da.po: New Danish translation. - -2014-03-06 Мирослав Николић - * po/sr.po: New Serbian translation. - -2014-02-24 Frédéric Marchal - * po/fr.po: New French translation. - -2014-02-05 Erwin Waterlander - * README.txt: List all the new translators. - * Makefile: New target 'getpo' to get .po file from the - Translation Project. New target po/eo-x.po to generate - eo-x.po from eo.po. - -2014-02-05 Enrico Nicoletto - * po/pt_BR.po: New Brazilian Portuguese translation - -2014-02-05 Jakub Bogusz - * po/pl.po: New Polish translation - -2014-02-05 Yuri Chornoivan - * po/uk.po: New Ukrainian translation - -2014-02-05 Trần Ngọc Quân - * po/vi.po: New Vietnamese translation - -2014-02-05 Benno Schulenberg - * po/nl.po: Updated Dutch translation - * po/eo.po: Updated Esperanto translation - -2014-02-02 Erwin Waterlander - * *.c: Print help and version info to stdout iso stderr. - Thanks to Benno Schulenberg. - -2014-01-31 Erwin Waterlander - * *.c,po/*.po: cleanup messages. Thanks to Benno Schulenberg. - -2014-01-29 Erwin Waterlander - * common.c, po/*.po: Split large help text in smaller pieces. - This is easier for the translators. Thanks to Benno Schulenberg. - -2014-01-18 Erwin Waterlander - * Makefile, *.mak: Removed MAN_NONLATIN variable. - * INSTALL.txt: Update section INTERNATIONAL MAN PAGES. - -2014-01-10 Erwin Waterlander - * mingw32.mak, mingw64.mak: Update for easier use in MSYS2. Added - extra include path to find libintl.h. - -2014-01-04 Erwin Waterlander - * Makefile: Also include English manuals in source the package. - Adding man files to the source package, which have been generated with - a high version of perl/pod2man, is a favour to users, because newer - perl/pod2man versions produce better output (also for old systems). - Tip from pod2man maintainer Russ Allbery. - When you want to generate man pages yourself just run first 'make - maintainer-clean'. - -2014-01-03 Erwin Waterlander - * man/nl/man1/dos2unix.pod, man/es/man1/dos2unix.pod: Add =encoding - latin1 command. Perl 5.18 requires =encoding for all non-ASCII pod - files. - See also https://rt.cpan.org/Public/Bug/Display.html?id=91805 - Minimal perl version is now 5.10.1. - * Makefile: Target clean keeps generated non-English manual files to - avoid problems with old perl version. Target maintainer-clean will - erase the generated non-English manual files. - * INSTALL.txt: Update for new required perl version. - -2013-12-30 Erwin Waterlander - * Version 6.0.4 - * man/nonlatin/man1/ru/dos2unix.pod: Removed. Russian - translation of manual moved to later release. - -2013-11-26 Erwin Waterlander - * Makefile, common.c: When MinGW-w64 is used for 32 bit, option - -V prints (MinGW-w64) for used compiler name. - -2013-11-24 Erwin Waterlander - * mingw32.mak: New makefile for MinGW-w64 targeting win32. - MinGW-w64 supports Large File Support (LFS) with - -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 while mingw.org - doesn't. Dos2unix failed when concurrent dos2unix processes - processed huge files on Windows network share drives. - Using MinGW-w64 with LFS support fixed the problem. - Thanks to report by F.J. Brandelik. - - -2013-10-07 Erwin Waterlander - * Makefile: Set MAN_NONLATIN back to 1. Include non-Latin - manuals in source package to prevent compilation troubles. - Target 'clean' keeps non-Latin manuals. Use 'maintainer-clean' - to erase them. - -2013-10-05 Erwin Waterlander - * Makefile: By default don't build non-Latin1 manuals. There are - still too many old perl/pod2man versions around (perl < 5.10.1). - Add MAN_NONLATIN=1 to enable non-Latin1 manuals. - -2013-10-01 Erwin Waterlander - * man/man1/Makefile: Support non-Latin1 man pages. - * Makefile: Support non-Latin1 man pages. - * man/nonlatin/man1/ru/dos2unix.pod: Placeholder for Russian manual. - -2013-09-13 Андрей Углик (Andrei Uhlik) - * po/ru.po: New Russian translation of the messages. - -2013-08-05 Erwin Waterlander - * po/de.po: Update German translations. Thanks to Lars Wendler. - -2013-06-14 Erwin Waterlander - * dos2unix.c/unix2dos.c: New options -ul and -ub to convert - UTF-16 files without BOM. - -2013-06-11 Erwin Waterlander - * dos2unix.c/unix2dos.c: Print value of binary symbol - when found. - -2013-03-12 Erwin Waterlander - * Makefile: Set CC to gcc for MSYS target. Otherwise - /mingw/bin/cc is used. - -2013-01-27 Erwin Waterlander - * Makefile: - - CC and CPP can be overridden by environment. - - CFLAGS optimization flags can be overridden by environment. - - Separate LIBS from LDFLAGS. - Thanks to Justin Lecher - -2013-01-25 Erwin Waterlander - * Version 6.0.3 - -2013-01-18 Erwin Waterlander - * dos2unix.c/unix2dos.c: Print system error when writing to - temporary output file fails. - -2013-01-16 Erwin Waterlander - * dos2unix.c/unix2dos.c: Print system error when closing of - temporary output file fails. E.g. "No space left on device". - -2012-12-25 Erwin Waterlander - * querycp.c/h: Added public domain phrase for Debian - license check. - -2012-12-12 Erwin Waterlander - * test: New directory with some test files. - -2012-09-20 Erwin Waterlander - * man/man1/Makefile: Removed dependency on 'sed' program. - -2012-09-19 Erwin Waterlander - * vc.mak: Visual C++ version supports wildcard expansion. - Added targets 'install', 'uninstall', 'doc', 'dist', - 'txt', 'html', and 'mostlyclean'. - * INSTALL.txt: Update for Visual C++. - -2012-09-16 Erwin Waterlander - * *.c/*.h: Dos2unix compiles with Microsoft Visual C++. - * vc.mak: New makefile for Microsoft Visual C++. - * INSTALL.txt: Update for Visual C++. - -2012-09-15 Erwin Waterlander - * Makefile: Better check for DJGPP. DJGPP 2.04 uname returns "FreeDOS" - on Freedos, 2.03 uname returns always "MS-DOS". Thanks to Rugxulo. - * man/man1/dos2unix.pod: Fixed a typo. Thanks to Jari Aalto. - -2012-09-06 Erwin Waterlander - * Version 6.0.2 - -2012-08-29 Erwin Waterlander - * wcc*: Fix target 'dist' in Watcom makefiles. - * djgpp.mak: Use 8.3 filename for dos32 binary package. - -2012-08-26 Erwin Waterlander - * os2.mak: Renamed to emx.mak. - * wccos2.mak: New Watcom C makefile for OS/2 target. - * wcc.mif: Watcom C makefile with generic parts. This new - makefile containts new targets 'install', 'uninstall', - 'doc', 'dist', and 'mostlyclean'. - * djgpp.mak: Default prefix is now c:\dos32 - * dos16_gnu.mak: Removed. Installation of dos16 version is - now done with Watcom makefiles. - -2012-08-13 Erwin Waterlander - * po/de.po: Update German translations. Thanks to Philipp. - * po/es.po: Update Spanish translations. Thanks to Julio. - -2012-08-12 Erwin Waterlander - * Makefile: Don't use pod2text option --utf8. There are too many - old pod2text versions around that don't support this option. - * Makefile: Install PDF and PostScript files of all languages when - they have been created. - * po/eo*.po: Update Esperanto translations. Thanks to Rugxulo. - * dos2unix/unix2dos: Don't use __MSDOS__ macro for Windows. - -2012-08-10 Erwin Waterlander - * Makefile: Change variable OS to D2U_OS. OS is used by Windows. - * Makefile: By default install only English text and html manuals. - This saves a dependency on iconv. Non-English text and html manuals - will be installed when they have been explicitly generated with - targets 'txt' and 'html'. - -2012-08-09 Erwin Waterlander - * dos2unix/unix2dos: Use only C99 compliant predefined macros. - -2012-08-07 Erwin Waterlander - * dos2unix/unix2dos: Print line number when a binary symbol is found. - Thanks to Somsak Pattanaprateep. - * Makefile: By default install text and html manuals of all languages. - -2012-08-06 Erwin Waterlander - * dos2unix/unix2dos: Fix. Locale encoding was not detected when NLS - was disabled. - * common.c: Update comments. Surrogate halves in UTF-8 are invalid. - -2012-07-25 Erwin Waterlander - * Version 6.0.1 - -2012-07-20 Erwin Waterlander - * Makefile: Target 'html' makes also Dutch and Spanish HTML manuals. - -2012-07-18 Erwin Waterlander - * manual: Update for options -n and -o. Describe the new permissions of - the output file in new-file and old-file mode. - * README.txt: Added references for the findutils package for Windows - and DOS to enable recursive conversions on those platforms. - -2012-05-20 Erwin Waterlander - * common.h: Fix compiler warnings "implicit declaration of function - 'strcasecmp'". Thanks to Michael Schindler - . - -2012-05-11 Julio A. Freyre-Gonzalez - * Update Spanish messages and manual. - -2012-05-06 Erwin Waterlander - * Version 6.0 - * man/*/man1/*.pod: Removed =encoding. It is not supported - by perl 5.8.8, which is shipped with MinGW and DJGPP. - -2012-04-20 Erwin Waterlander - * man/*/man1/*.pod: Set encoding explicitly to Latin-1. - * Makefile: Target 'doc' makes all man pages. - -2012-04-12 Erwin Waterlander - * po/de.po: Update German translations. Thanks to Philipp Thomas. - -2012-04-09 Erwin Waterlander - * INSTALL.txt: List the prerequisites. - * Makefile: Friendlier for DJGPP/MinGW/MSYS. - -2012-04-04 Erwin Waterlander - * po/eo.po: Update Esperanto translations. Thanks to Rugxulo. - -2012-03-30 Erwin Waterlander - * Skip UTF-16 file when conversion to UTF-8 goes wrong. - * Update English and Dutch manual. - -2012-03-28 Erwin Waterlander - * common.c: Support UTF-16 surrogate pairs. - * dos2unix.c, unix2dos.c: Check wchar_t size. - -2012-03-26 Erwin Waterlander - * *.c: Use fgetc/fputc instead of getc/putc. - -2012-03-25 Erwin Waterlander - * po, man: Update Dutch translations. - -2012-03-24 Erwin Waterlander - * On Unix, convert UTF-16 files only when the locale encoding - is UTF-8 to prevent accidental loss of text. - -2012-03-23 Erwin Waterlander - * Turn off ISO and 7-bit mode if an Unicode text file is detected, - to prevent corruption of UTF-8 files. - * Update English manual. - * Fix compilation for WatcomC, DJGPP, MSYS, OS/2. - * Makefile: Support CFLAGS_USER, LDFLAGS_USER, and DEFS_USER for - Debian Linux. Thanks to Jari Aalto. - -2012-03-21 Erwin Waterlander - * Support conversion of Unicode UTF-16 from stdin. - * Update English manual. - -2012-03-20 Erwin Waterlander - * Support conversion of Unicode UTF-16 encoded files. - -2012-03-16 Erwin Waterlander - * common.c: Make it compile on Cygwin 1.5. - -2012-03-10 Erwin Waterlander - * Version 5.3.3 - * Makefile: Binary packages with native language support - get "-nls" suffix. - -2012-03-08 Erwin Waterlander - * common.c: Option -V prints target OS on DOS/Windows/OS2. - -2012-03-07 Erwin Waterlander - * dos2unix.c, unix2dos.c, mingw64.mak: Enabled wildcard - expansion for Win64 (MinGW-w64). Thanks to Steve Hay. - * wccdos16.mak: Enabled wildcard expansion. - * wccdos32.mak: Enabled wildcard expansion. - * wccwin32.mak: Enabled wildcard expansion. - * bcc.mak: Enabled wildcard expansion. - -2012-03-02 Erwin Waterlander - * Makefile: New target 'mostlyclean' that preserves the manual - files. Target 'clean' removes all built files, it restores the - Unix source package to its original state. - * Makefile: New variable HTMLEXT to override the default 'htm' - extension for the manual in HTML format. - -2012-02-01 Erwin Waterlander - * Makefile, version.mk: Fix a compile error when debug - is enabled. Thanks to Maurizio Camisaschi and Lars Wendler. - See https://bugs.gentoo.org/400769 - * Makefile: Enable debugging info for gdb when DEBUG=1 - * man page: Small update in section RETURN VALUE. - -2012-01-27 Erwin Waterlander - * Version 5.3.2 - -2012-01-02 Erwin Waterlander - * os2.mak: Enable support for wild cards (-Zargs-wild). - Thanks to Steven H. Levine and Elbert Pol. - -2011-12-20 Erwin Waterlander - * querycp.c: Extra comment from Rugxulo. - * querycp.c: Undid change of 2011-11-12. MSYS version - behaves as Cygwin version. - -2011-12-15 Erwin Waterlander - * wccdos32.mak: New makefile for Open Watcom for DOS32. - -2011-12-06 Erwin Waterlander - * Makefile: Undo previous change for Darwin. Not restoring group and - owner may be destructive or a security risk. - * Makefile, common.[ch]: Dos2unix builds on MSYS now. - -2011-12-02 Erwin Waterlander - * Makefile: For MacOS the option -DNO_CHOWN has been be added to the compile time flags. - This is necessary because Darwin will create files with the - file-owner-group set to the file-owner-group of the directory - EVEN if - the caller is not a member of the group! Chowning *from* the group is ok, - chowning *to* the group is not - and this will make unix2dos fail when it - tries to restore the permissions. - Thanks to Wolf Geldmacher. - See bug report 3444337, https://sourceforge.net/tracker/?func=detail&atid=1234808&aid=3444337&group_id=292083 - -2011-11-16 Erwin Waterlander - * README.txt, man/man1/dos2unix.pod: Freshmeat changed name to Freecode. - -2011-11-12 Erwin Waterlander - * querycp.c: Fix for MSYS. - -2011-10-20 Erwin Waterlander - * querycp.c: Support OS/2, and Watcom C for Win32. - * wccwin32.mak: New makefile for Open Watcom for Win32. - -2011-08-22 Erwin Waterlander - * Makefile: Added RPM_OPT_FLAGS to LDFLAGS. Required for - cross-platform RPM package building. - -2011-08-20 Erwin Waterlander - * Home page URL: change to http://waterlan.home.xs4all.nl/dos2unix.html - -2011-08-09 Erwin Waterlander - * Version 5.3.1 - -2011-08-08 Julio A. Freyre-Gonzalez - * Spanish translation of messages and manual. - -2011-06-26 Erwin Waterlander - * bugfix: dos2unix changes ownership and permissions on file. - When an other user (e.g. root) than the owner has write permission - on the input file, dos2unix changes owner, group and umask in old - file mode to the other user's owner, group and umask who runs - dos2unix. Fixed only for Unix. Thanks to Christopher Williams. - See http://sourceforge.net/tracker/?func=detail&aid=3327171&group_id=292083&atid=1234808 - * Keep permissions also on Windows. Use chmod() i.s.o. fchmod(). - -2011-06-16 Erwin Waterlander - * Identical functions from dos2unix.c and unix2dos.c - are moved to common.c. - -2011-06-15 Erwin Waterlander - * Dos2unix and Unix2dos share the same language files. - -2011-05-04 Erwin Waterlander - * dos2unix.c: Removed redundant ConvertDosToUnixOldFile(). - * unix2dos.c: Removed redundant ConvertUnixToDosOldFile(). - -2011-04-26 Erwin Waterlander - * Version 5.3 - -2011-04-23 Erwin Waterlander - * Don't report an error when unlink() fails because a file - doesn't exist. - -2011-04-13 Erwin Waterlander - * Print system error when input file can't be openened. - For instance "Permission denied" - * Update manuals. - * Update translations. - -2011-04-04 Erwin Waterlander - * Always print and return an error when wrong command-line - options are used. Also in quiet mode. - * New option '--': Treat all following options as file names. - -2011-04-03 Erwin Waterlander - * Improved error reporting. Return system error when an error occurs. - * Don't quit after first error (like rm, ls, grep, tar). - * In quiet mode the return value is always zero. - -2011-03-27 Erwin Waterlander - * dos2unix.c/unix2dos.c: Check if symbolic links point to - regular files. - * dos2unix.c/unix2dos.c: Added short options -F, -R, -S. - * po: update translations. - -2011-03-24 Erwin Waterlander - * dos2unix.c/unix2dos.c: Changed options --follow, --no-follow, - to --follow-symlink, --replace-symlink, --skip-symlink. - * dos2unix.c/unix2dos.c: Options --force and --safe are only to - covert binary files or skip them. - * dos2unix.c/unix2dos.c: Non-regular files that are not symbolic - links are never converted. - -2011-03-23 Charles Wilson - * dos2unix.c/unix2dos.c: New options --follow and --no-follow. - In follow mode dos2unix writes to the symlink target, instead - of replacing the symbolic link with an output file. - -2011-03-22 Charles Wilson - * querycp.c: Behave on Cygwin same as on Linux. Default - code page in ISO mode is CP437. - -2011-03-21 Charles Wilson - * dos2unix.c/unix2dos.c: - - Cygwin may define WIN32 (via include files). - - bugfix: Cygwin: set mode to binary in stdio mode conversion. - Needed in case non-Cygwin program launches dos2unix. - - bugfix: set failure mode if rename fails in quiet mode. - - New option: -s, --safe. Opposite of -f, --force. - * Makefile: Cleanup for Cygwin. - -2011-03-19 Erwin Waterlander - * Makefile: Install links instead of binary/manpage copies on Cygwin. - -2011-03-05 Erwin Waterlander - * man/man1/dos2unix.pod: Replace GPL with FreeBSD license. - * man/nl/man1/dos2unix.pod: Replace GPL with FreeBSD license. - -2011-03-04 Erwin Waterlander - * Version 5.2.1 - -2011-03-03 Erwin Waterlander - * Don't print used code page in quiet mode. - -2011-03-02 Erwin Waterlander - * Esperanto x-notation format is optional. Default is Unicode. - There is no installation of an 'eo-x' locale any more. - Add EO_XNOTATION=1 to make command-line to select x-notation. - It will change the format of the normal 'eo' locale from Unicode - to ASCII x-notation. - -2011-02-28 Erwin Waterlander - * Makefile: Make LFS optional with variable LFS (default on). - * dos2unix.c/unix2dos.c: Print file name with stat() system error. - -2011-02-26 Erwin Waterlander - * dos2unix.c/unix2dos.c: Report system error when stat() fails. - * Makefile: Enable 64 bit file system interface (_FILE_OFFSET_BITS=64). - This enables opening files larger than 2GB on 32 bit systems, provided - the system has Large File Support (LFS). See also section 1.3.4 - "Feature Test Macros" of The GNU C Library manual. - http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html - -2011-02-22 Erwin Waterlander - * In debug mode file mode is printed (compile with DEBUG=1). - -2011-02-19 Erwin Waterlander - * Makefile: Generation of PostScript and PDF is optional. - This removes dependency on Groff and GhostScript (thanks to Philipp Thomas). - -2011-02-04 Erwin Waterlander - * Makefile: Replace GPL (accidently patched in) with FreeBSD license. - * man/man1/Makefile: Fix perl command for for DOS alike file systems - (Can't do inplace edit without backup.). (thanks to Elbert Pol) - -2011-01-31 Erwin Waterlander - * Version 5.2 - -2011-01-19 Erwin Waterlander - * Update manual. - -2011-01-13 Rugxulo - * querycp.c: Active code page detection. DOS 16 bit, OpenWatcom. - -2011-01-12 Erwin Waterlander - * querycp.c: Detect active code page for ISO mode on Windows. - -2011-01-12 Rugxulo - * querycp.c: Detect active code page for ISO mode. DOS 32 bit, DJGPP. - -2011-01-11 Erwin Waterlander - * New ISO conversion modes DOS CP860 (Portuguese) - and CP863 (French Canadian). - -2011-01-10 Erwin Waterlander - * New ISO conversion mode DOS CP865 (Nordic). - -2011-01-07 Erwin Waterlander - * ISO mode CP437: fix conversion of non-breaking space (NBSP) - * New ISO conversion modes: DOS CP850 (Western European) and Windows - CP1252 (Western European). - * SunOS compatible command-line options -ascii, -iso, -7, -437, -850. - -2011-01-04 Erwin Waterlander - * 7bit and iso mode can be used in Mac mode. - -2010-11-22 Jari Aalto - * Small updates man page and Makefile. - -2010-11-21 Ben Pfaff - * Don't indicate text files with ASCII Form Feed control - characters (^L) as binary. - Form feed characters are fairly common in GNU software text files, - because the GNU coding standards advice to use form feeds to - divide text into pages. - -2010-11-15 Erwin Waterlander - * Put full copyright text in *.h source files (FSF's recommendation). - Thanks to Jari Aalto . - * Don't include generated documentation files in Unix source package. - * Create a source package in DOS text format. - -2010-08-18 Erwin Waterlander - * version 5.1.1 - -2010-07-23 Erwin Waterlander - * Added Dutch translation of the manual. - -2010-07-19 Erwin Waterlander - * MinGW-w64 Makefile added for Windows 64 bit port. - -2010-06-20 Erwin Waterlander - * Don't ship po/*.mo files in source package. - * Win32 binary package uses patched MinGW's libintl, with builtin - relocation support. See http://www.xs4all.nl/~waterlan/libintl.html - -2010-04-22 Erwin Waterlander - * Support compilation in DOSBox (8.3 file names where needed). - -2010-04-14 Erwin Waterlander - * Fixed compilation on Darwin OS. Thanks to Marc Gianzero. - -2010-04-03 Erwin Waterlander - * version 5.1 - -2010-03-22 Erwin Waterlander - * Man page generation from Perl POD file. - Thanks to Jari Aalto - * Merge dos2unix and unix2dos man pages. - -2010-03-17 Erwin Waterlander - * Add localization information to manual. - -2010-03-16 Rugxulo - * Added Esperanto translation. - -2010-03-13 Erwin Waterlander - * DJGPP, dos32bit: Create 'stubs' for mac2unix and unix2mac. - See also http://www.delorie.com/djgpp/v2faq/faq22_5.html - Thanks to Rugxulo - -2010-03-11 Erwin Waterlander - * Allow to set options in stdio mode. - * dos2unix: bugfix MAC mode: Don't change DOS line endings. - * Display help if a wrong option was used. - -2010-03-04 Erwin Waterlander - * Port to 16 bit DOS, using OpenWatcom. - -2010-03-03 Erwin Waterlander - * Port to 16 bit DOS, using Borland C. - -2010-02-16 Erwin Waterlander - * version 5.0 - -2010-02-15 Erwin Waterlander - * unix2dos: Fix problem of reading Mac files. - * unix2dos: Added command 'unix2mac'. - * unix2dos: Can use DOS2UNIX_LOCALEDIR i.s.o. UNIX2DOS_LOCALEDIR. - * dos2unix: 'mac2unix' command can have a prefix. - * Makefile: mac2unix and unix2mac are installed as soft links. - -2010-02-13 Erwin Waterlander - * Bundled dos2unix and unix2dos in one package. - * dos2unix/unix2dos : Cleanup messages and manual. - * dos2unix: Option -l --newline also works in MAC mode. - * unix2dos: Added option -l, --newline. - * unix2dos: Added MAC mode. Convert Unix line endings - to Mac line endings. - -2010-02-10 Erwin Waterlander - * unix2dos: Makefile : - - Use GNU standard directory variables everywhere. - - New target 'dist-tbz' creates bzip2 compressed archive. - -2010-02-10 Philipp Thomas - * unix2dos: po/de.po : Added German translation. - * unix2dos: Makefile : - - Added $(RPM_OPT_FLAGS) to CFLAGS. - - Use DESTDIR only in install and uninstall targets (not in variables, - this is more common practice). - -2010-02-03 Erwin Waterlander - * dos2unix: Makefile : - - Use GNU standard directory variables everywhere. - -2010-02-03 Philipp Thomas - * dos2unix: po/de.po : Added German translation. - * dos2unix: Makefile : - - Use GNU standard directory variable 'datadir' i.s.o. 'sharedir'. - - Added $(RPM_OPT_FLAGS) to CFLAGS. - - New target 'dist-tbz' creates bzip2 compressed archive. - - Use DESTDIR only in install and uninstall targets (not in variables, - this is more common practice). - -2010-02-02 Erwin Waterlander - * dos2unix/unix2dos: Update Dutch translation. - -2010-01-24 Erwin Waterlander - * dos2unix/unix2dos: version 4.1.2 - -2010-01-22 Tim Waugh - * dos2unix/unix2dos: Preserve file mode in 'new file mode'. - * dos2unix/unix2dos: Makefile: Allow CFLAGS to be set externally. - -2010-01-21 Erwin Waterlander - * dos2unix/unix2dos: version 4.1.1 - * dos2unix/unix2dos: Fix compilation on FreeBSD. - * dos2unix/unix2dos: Changed home page URL to http://www.xs4all.nl/~waterlan/dos2unix.html - -2009-12-28 Erwin Waterlander - * dos2unix/unix2dos: version 4.1 - * dos2unix/unix2dos: Automatically skip binary files. - * dos2unix/unix2dos: Automatically skip non-regular files. - * dos2unix/unix2dos: New option: -f --force: Force conversion of all files. - * dos2unix/unix2dos: Option -h: Print options in alphabetical order. - * dos2unix/unix2dos: Update manual. - * dos2unix/unix2dos: ISO mode: - - Non-convertable characters are converted to a dot. - Old conversion risked conversion to unwanted ISO C1 - control characters from ISO 6429. - - Fixed wrong conversion of Interpunct. - - Don't convert ASCII control characters - DC4 (Pilcrow, 0x14) and NAK (Section-sign, 0x15). - -2009-12-21 Erwin Waterlander - * dos2unix/unix2dos: version 4.0.1 - * dos2unix/unix2dos: man page improvements: Thanks to Jari Aalto . - - Replace hyphens with minus signs (look like dashes) where needed. - - Options in alphabetical order. - * dos2unix/unix2dos: man page: Update ISO mode information. - * dos2unix/unix2dos: Option -V prints localedir used. - * dos2unix: Localedir can be overruled with environment variable - DOS2UNIX_LOCALEDIR. - * unix2dos: Localedir can be overruled with environment variable - UNIX2DOS_LOCALEDIR. - * dos2unix/unix2dos: Fixed two wrong conversions in ISO mode: - - Greek mu. - - Closing guillemet (angle quotation mark, >>). - * dos2unix/unix2dos: Port to OS/2 Warp: Thanks to Elbert Pol . - * dos2unix/unix2dos: Makefiles: Added target 'strip'. - -2009-12-15 Erwin Waterlander - * dos2unix/unix2dos: version 4.0 - * dos2unix/unix2dos: Added internationalisation using gettext. - * dos2unix/unix2dos: Added Dutch translation. - * dos2unix/unix2dos: Ported to Win32 using Mingw32 - * dos2unix/unix2dos: Ported to DOS using DJGPP - * dos2unix/unix2dos: Fixed problem in DOS/Windows stdio mode. - * dos2unix/unix2dos: New option -L/--license that prints software license. - * dos2unix/unix2dos: Code cleanup - * dos2unix/unix2dos: Update manual - -2009-12-04 Erwin Waterlander - * dos2unix: version 3.2 - * unix2dos: version 2.3 - * dos2unix/unix2dos: version.mk: New file. - * dos2unix/unix2dos: README: New file. - * dos2unix/unix2dos: ChangeLog : New file. - * dos2unix: INSTALL: Updated. - * dos2unix/unix2dos: Makefile: Makefile according GNU standards. - * unix2dos: INSTALL: New file. - * dos2unix: Applied all patches from RedHat: - - use mkstemp i.s.o. mktemp: Nov 17 2000 Tim Powers - - segfault: Jan 17 2002 Bernhard Rosenkraenzer - - safeconv: Oct 20 2004 Miloslav Trmac - - manpage-update: Oct 6 2004 Mike A. Harris - - preserve-file-modes: Feb 6 2007 Tim Waugh - - tmppath: Apr 13 2005 Tim Waugh - - c-missing-arg: Jan 18 2008 Tim Waugh - - Remove trailing white space. - * unix2dos: Applied all patches from RedHat: - - use mkstemp i.s.o. mktemp: Nov 17 2000 Tim Powers - - segfault: Jan 17 2002 Bernhard Rosenkraenzer - - manpage-update: Oct 6 2004 Mike A. Harris - - preserve-file-modes: Oct 11 2004 Tim Waugh - - tmppath: Apr 13 2005 Tim Waugh - - Remove trailing white space. - -1998-11-19 Christian Wurll - * dos2unix: version 3.1 - * dos2unix: Added extra newline if ^M occurs - -1998-02-04 Bernd Johannes Wuebben - * dos2unix: version 3.0 - * dos2unix: Added Mac text file translation, i.e. \r to \n conversion - -1995-03-30 Benjamin Lin - * dos2unix/unix2dos: version 2.2 - * dos2unix: Fixed a bug in 2.1 where in new file mode, if outfile already exists - * dos2unix: conversion can not be completed properly. - * unix2dos: Conversion from SunOS charset implemented. - -1995-03-29 Benjamin Lin - * dos2unix: version 2.1 - * dos2unix: Conversion to SunOS charset implemented. - -1995-03-19 Benjamin Lin - * dos2unix/unix2dos: version 2.0 - * dos2unix/unix2dos: Rewritten from scratch. - -1995-03-16 Benjamin Lin - * dos2unix: version 1.2 - * unix2dos: version 1.3 - * dos2unix/unix2dos: Modified to more conform to UNIX style. - -1995-03-09 Benjamin Lin - * unix2dos: version 1.2 - * unix2dos: Fixed minor typo error - -1994-12-20 Benjamin Lin - * dos2unix/unix2dos: version 1.1 - * dos2unix/unix2dos: Cleaned up for Borland C/C++ 4.02 - -1989-10-04 John Birchfield - * dos2unix/unix2dos: version 1.0 - diff --git a/Tools/dos2unix/share/doc/dos2unix-7.2/INSTALL.txt b/Tools/dos2unix/share/doc/dos2unix-7.2/INSTALL.txt deleted file mode 100644 index b45c4af..0000000 --- a/Tools/dos2unix/share/doc/dos2unix-7.2/INSTALL.txt +++ /dev/null @@ -1,310 +0,0 @@ -PREREQUISITES - - Using GCC: - Required - * gcc : GNU C compiler - * GNU binutils : A collection of binary tools - * GNU make : make - * sh : POSIX type shell - * GNU coreutils: Core utilities package (chmod, install, mkdir, - mv, rm, uname) - - Optional (depending on build targets): - * perl : Practical Extraction and Report Language - perl >= 5.10.1 is required for rebuilding the - manual pages with perlpod. - Self-tests require module perl-Test-Simple. - * gettext : Framework to help GNU packages produce multi- - lingual messages. - * po4a : PO for anything, for rebuilding manuals. - * groff : GNU troff text formatting system, for - international messages and manuals. - * ghostscript : An interpreter for the PostScript language and - for PDF (ps2pdf) - - - Using LLVM CLANG: - Clang can be used as a drop-in replacement for gcc. Just add CC=clang to the make - command line. - - - Using Watcom C: - Required - * Open Watcom : http://www.openwatcom.org/ - * Open Watcom V2 : http://open-watcom.github.io/open-watcom/ (git repo) - http://sourceforge.net/projects/openwatcom/ (binaries download) - - - Using Microsoft Visual C++: - Required - * Visual C++ : You can get a free express version via this web page: - http://www.visualstudio.com/products/visual-studio-express-vs - Download Visual Studio for Windows Desktop. Visual C++ is part - of Visual Studio. Out of the box compilation for 64-bit - applications is supported since version 2012. - - - -BASIC INSTALLATION - - To build the program type: - - make - - - To run the self-tests type: - - make check - - - To strip the executables: - - make strip - - - To install: - - make install - - - Clean: - - make clean - - -SELF-TESTS - - To run the self-tests you need a Perl installation including - module perl-Test-Simple. - - To check the native Windows ports you need to run the tests in - the MSYS2 shell. - -INSTALLATION NAMES - - By default the 'install' target will install the program in - /usr/bin, the language files in /usr/share/locale - and the man page in /usr/share/man. You can specify an - installation prefix other than /usr by modifying the - 'prefix' variable. An Example: - - make prefix=$HOME clean all - make prefix=$HOME install - - -DEBUG - - A debug enabled build can be made by adding DEBUG=1 - to the make command. Example: - - make clean install DEBUG=1 - - With debug enabled dos2unix will print extra information - and you can debug the source code in gdb. - - -NATIVE LANGUAGE SUPPORT - - Native Language Support (NLS) is by default enabled. - To disable NLS add ENABLE_NLS=. Example: - - make clean install ENABLE_NLS= - - -INTERNATIONAL MAN PAGES - - Since dos2unix 6.0.5 all man pages are encoded in UTF-8, because even - Western-European man pages may contain Unicode characters not supported by - the Latin-1 (ISO-8859-1) character set. - - Originally the Unix man system supported only man pages in Latin1 format. - Although the world is moving to Unicode format (UTF-8) there is still a lot - of Latin1 legacy around. - - The English man page is a pure ASCII file and is readable on all platforms. - - Non-English man pages are encoded in UTF-8. These do not show properly on - old systems. Man pages in UTF-8 format are shown properly on Linux. Not - all roff implementations support UTF-8. - - In order to show UTF-8 man pages properly on Cygwin with traditional man - you need to do the following: - - In /etc/man.conf, change the NROFF definition to use 'preconv'. - - NROFF /usr/bin/preconv | /usr/bin/nroff -c -mandoc 2>/dev/null - - To view the man page set the correct locale. E.g. for Ukrainian: - - export LANG=uk_UA.UTF-8 - man dos2unix - - With man-db the manpages show correctly out of the box. Cygwin changed to - use man-db in June 2014. - Man-db is the default man system on the major Linux distributions. - - -LARGE FILE SUPPORT - - Large File Support (LFS) is by default enabled. This enables - the use of 64 bit file system interface on 32 bit systems. - This makes it possible to open files larger than 2GB on 32 bit - systems, provided the OS has LFS support builtin. - To disable LFS make the LFS variable empty. Example: - - Disable LFS: - make clean install LFS= - - The gcc compiler from the mingw.org project does not support LFS. - It is advised to use the mingw-w64 compiler tool chain for LFS on - 32 bit Windows. - - -UNICODE SUPPORT - - Unicode UTF-16 support is by default enabled for Windows and Unix. To - disable make the UCS variable (Universal Character Set) empty. - - Disable Unicode: - make clean install UCS= - - Unicode UTF-16 is not supported by the DOS and OS/2 versions. - - -DOCUMENTATION - - Manual pages are generated from Perl POD files. - - The manual pages in text and html format are by default only - created in English language. To create text and html manuals - for other languages type: - - make txt - make html - - Once the manuals in non-English languages have been created, - they will also be installed under share/doc/ when you type - 'make install' - - Manuals in PDF format are by default not created. - To create manuals in PDF format type: - - make pdf - - PDF generation requires GhostScript to be installed. - - -WINDOWS 32 BIT PORT - - Using Mingw compiler : - - make -f mingw.mak clean - make -f mingw.mak - make -f mingw.mak strip - make -f mingw.mak install - - Using MinGW-w64 compiler : - I am using the MSYS2 project - which includes the MinGW-w64 compiler and an updated MSYS shell based - on Cygwin 1.7. - - make -f mingw32.mak clean - make -f mingw32.mak - make -f mingw32.mak strip - make -f mingw32.mak install - - Or use Open Watcom and type: - - wmake -f wccwin32.mak clean - wmake -f wccwin32.mak - wmake -f wccwin32.mak install - - Or use Microsoft Visual C++ and type: - - nmake /f vc.mak clean - nmake /f vc.mak - nmake /f vc.mak install - - - The win32 binaries built with MinGW32 are packed with a patched version of - MinGW's libintl-8.dll that has builtin support for relocation. See also - http://waterlan.home.xs4all.nl/libintl.html and - http://sourceforge.net/p/mingw/bugs/1808/ - The MSYS2 project has the relocation patch already included. - - -WINDOWS 64 BIT PORT - - To compile a version for 64 bit Windows, get the Mingw-w64 compiler - , and use makefile mingw64.mak: - I am using the MSYS2 project - which includes the MinGW-w64 compiler and an updated MSYS shell based - on Cygwin 1.7. - - make -f mingw64.mak clean - make -f mingw64.mak - make -f mingw64.mak strip - make -f mingw64.mak install - - Or use Microsoft Visual C++. Visual Studio Express supports - out of the box C/C++ compilation for 64-bit applications since - version 2012. Start an "x64 Cross Tools Command Prompt" and - type: - - nmake /f vc.mak clean - nmake /f vc.mak - nmake /f vc.mak install - - -DOS PORT, 32 BIT - - To compile a version for DOS, get the DJGPP compiler - , and use makefile djgpp.mak. - DJGPP gcc >= 4.6 seems to cause problems. Crashes of gcc itself, - or crashing dos2unix binaries (seen in DOSBox and DOSEMU). - Use DJGPP gcc <= 4.5.3. - - - make -f djgpp.mak clean - make -f djgpp.mak - make -f djgpp.mak strip - make -f djgpp.mak install - - Or use Open Watcom - Cross compiling from Windows 32 bit. This works. - - wmake -f wccdos32.mak clean - wmake -f wccdos32.mak - wmake -f wccdos32.mak install - - -DOS PORT, 16 BIT - - To compile a version for DOS, use the Borland C compiler 3.1 or 4.0, - and use makefile bcc.mak: - - make -f bcc.mak clean - make -f bcc.mak - - Or use Open Watcom - - wmake -f wccdos16.mak clean - wmake -f wccdos16.mak - wmake -f wccdos16.mak install - - -OS/2 PORT - - Using EMX - - make -f emx.mak clean - make -f emx.mak - make -f emx.mak strip - make -f emx.mak install - - Open Watcom - - wmake -f wccos2.mak clean - wmake -f wccos2.mak - wmake -f wccos2.mak install - diff --git a/Tools/dos2unix/share/doc/dos2unix-7.2/NEWS.txt b/Tools/dos2unix/share/doc/dos2unix-7.2/NEWS.txt deleted file mode 100644 index 9ca982f..0000000 --- a/Tools/dos2unix/share/doc/dos2unix-7.2/NEWS.txt +++ /dev/null @@ -1,186 +0,0 @@ -2015-02-11: Version 7.2 - - * New: Japanese translation of the UI messages. - * New: Support Chinese GB18030 locale. - * Change: On Unix/Linux convert UTF-16 to the locale encoding. It is - no longer required that the locale encoding is UTF-8. - -2014-10-06: Version 7.1 - - * New: Option -i, --info to print file information. - This new option prints number of DOS, Unix, and Mac line breaks, the byte - order mark, and if the file is text or binary. And it can print the names - of files that would be converted. - -2014-09-09: Version 7.0 - - * New: automated self-tests. - * New: option -u to keep UTF-16 encoding. - * New: option -v to print information about BOMs and converted line breaks. - * Change: stdio mode does not automatically set quiet mode. - * Change: stdio mode does not automatically force conversion of binaries. - An error is returned when the stdin stream contains a binary symbol. - * Bugfix: dos2unix -l created DOS line breaks from Mac line breaks. - * Bugfix: system error number was not always returned. - * Bugfix: an Unicode input file disabled 7bit and iso mode for next input files. - * Bugfix: mac2unix help text, options -b and -r. - * The code has been cleaned up. - -2014-08-03: Version 6.0.6 - - * Bugfix: mac2unix conversion produced corrupted output from UTF-16 input file. - * New options -b (keep BOM) and -r (remove BOM). - * New translation of the UI messages: Norwegian Bokmaal. - -2014-04-17: Version 6.0.5 - - * Dos2unix is part of the Translation Project (TP). - All translations go via the Translation Project. - See http://translationproject.org/ - * New translations of UI messages: Brazilian Portuguese, Chinese (traditional), - Danish, French, Hungarian, Polish, Serbian, Ukrainian, Vietnamese. - * New translations of the manual: Brazilian Portuguese, French, German, - Polish, Ukrainian. - * Generated man pages are included in the source package to prevent - compilation problems with very old or very new perl/pod2man versions. - * Manuals are now generated from gettext PO files with po4a for easier - translation. - * All manuals are now in UTF-8 encoding. - * Skip symbolic links on Windows by default (same as on Unix). - -2013-12-30: Version 6.0.4 - - * New options -ul and -ub to convert UTF-16 files without BOM. - * New Russian translation of the messages. - * Build 32 bit Windows binaries with Large File Support (LFS) - by using mingw-w64 for 32 bit Windows. - * When a binary symbol is encountered the value is printed. - -2013-01-25: Version 6.0.3 - - * Source code compiles with Microsoft Visual C. - * Print system error when writing output fails. - -2012-09-06: Version 6.0.2 - - * The locale encoding detection has been fixed when NLS was disabled. - * Print line number when a binary symbol is found. - * Updated makefiles for Watcom C, and added a new one for OS/2. - -2012-07-25: Version 6.0.1 - - * Update Spanish translations. - * Update manual. - -2012-05-06: Version 6.0 - - * Conversion of Windows UTF-16 files to Unix UTF-8 files. - * Conversion of Unix UTF-8 files to Windows UTF-8 files with byte - order mark. - -2012-03-10: Version 5.3.3 - - * Enabled wildcard expansion for all versions. - * Fixed a compilation error when debug was enabled. - -2012-01-27: Version 5.3.2 - - * New homepage URL: http://waterlan.home.xs4all.nl/dos2unix.html - * Compiles for native MSYS. - * Compile with OpenWatcom for DOS32 and Win32. - * Detect code page on OS/2. - * Support wild cards on OS/2. - -2011-08-09: Version 5.3.1 - - * Spanish translation of messages and manual. - * File ownership is maintained in old file mode (Unix only). - * Dos2unix and Unix2dos share the same language files. - * Code cleanup. - -2011-04-26: Version 5.3 - - * Improved handling of symbolic links. New options -F, -R, -S. - * Improved handling and reporting of errors. - * Source code improvements for Cygwin. Behave exactly as on Linux. - * New option --. Treat all following options as file names. - -2011-03-04: Version 5.2.1 - - * PDF and PostScript generation is optional. No default dependency on - GhostScript and Groff. - * Enable optional Large File Support (LFS). - * Esperanto x-notation is optional. No longer installation of non-standard - locale 'eo-x'. - * Improved error messages. - -2011-01-31: Version 5.2 - - * ISO conversion mode supports same DOS code pages as SunOS dos2unix does: - CP437 (US), CP850 (Western European), CP860 (Portuguese), - CP863 (French Canadian), and CP865 (Nordic). - * ISO conversion mode supports Windows code page CP1252 (Western). - * SunOS compatible options -ascii, -iso, -7, -437, -850, -860, -863, and -865. - * Active code page detection for ISO mode. - * Fixed ISO conversion of non-breaking space (NBSP). - * ISO and 7bit mode can be used in Mac mode. - * Treat ASCII Form Feed control characters as valid text. - * Update manual pages. - * Don't include generated documentation files in Unix source package. - * Create a source package in DOS text format. - -2010-08-18: Version 5.1.1 - - * Added Dutch translation of the manual. - * Win64 port. - * Win32 binary package uses patched MinGW's libintl, with builtin - * relocation support. - * Support compilation in DOSBox (8.3 file names where needed). - * Fixed compilation on Darwin OS. - -2010-04-03: Version 5.1 - - * Esperanto translations have been added. - * Ports to 16 bit DOS have been made. - * Command-line options can be set in stdio mode. - * Bugfix dos2unix MAC mode: Don't change DOS line endings. - * Create stubs for DOS32 versions of mac2unix and unix2mac. - * Localization information has been added to the manual. - * Man pages have been merged. - * Man page generation from Perl POD file. - - -2010-02-16: Version 5.0 - - * Dos2unix and Unix2dos have been bundled in a single package. - * German translations have been added. - * Dos2unix -l --newline also works in MAC mode. - * Unix2dos also got option -l, --newline. - * Added MAC mode to Unix2dos: Convert Unix line endings to Mac line endings. - * Cleanup of messages and manual. - -2010-01-24: Version 4.1.2 - - * Preserves file modes in new file mode. - -2010-01-21: Version 4.1.1 - - * Fixes a compilation problem on FreeBSD. - -2009-12-28: Version 4.1 - - Automatically skips binary and non-regular files, - and the ISO mode has been cleaned up (see ChangeLog). - -2009-12-21: Version 4.0.1 - - Adds a port to OS/2 Warp. Two wrong conversions in ISO mode - have been fixed. The manual page has been updated. - -2009-12-15: Version 4.0 - - Adds internationalisation (Native Language Support, NLS). A Dutch - translation has been added. Ports to Windows and DOS have been made. - The problem in DOS/Windows stdio mode has been fixed. The manual has - been updated. - diff --git a/Tools/dos2unix/share/doc/dos2unix-7.2/README.txt b/Tools/dos2unix/share/doc/dos2unix-7.2/README.txt deleted file mode 100644 index 3999171..0000000 --- a/Tools/dos2unix/share/doc/dos2unix-7.2/README.txt +++ /dev/null @@ -1,169 +0,0 @@ - -dos2unix - DOS/Mac to Unix and vice versa text file format converter. - - -FILE LIST - - README.txt : This file. - INSTALL.txt : How to build and install. - COPYING.txt : distribution license. - NEWS.txt : Basic change log for users. - ChangeLog.txt : Detailed change log for programmers. - TODO.txt : Things to do. - BUGS.txt : Known bugs and instructions on reporting new ones. - man/man1/dos2unix.txt : Dos2unix manual, text format. - man/man1/dos2unix.htm : Dos2unix manual, HTML format. - - -PROJECT HOME PAGE - - http://waterlan.home.xs4all.nl/dos2unix.html - - -HISTORY - - This is an update of Benjamin Lin's implementations of dos2unix and - unix2dos. Benjamin Lin's implementations of dos2unix and unix2dos were - distributed via SunSITE.unc.edu (later MetaLab.unc.edu, now ibiblio) - and became part of several Linux distributions such as RedHat, Suse, - Gentoo, and others. This update includes all RedHat patches and fixes - several other problems. Internationalization has been added and ports - to DOS, Windows, Cygwin and OS/2 Warp have been made. - - These implementations of dos2unix and unix2dos have been modelled after - dos2unix/unix2dos under SunOS/Solaris. The first versions were made by - John Birchfield in 1989, and in 1995 rewritten from scratch by Benjamin - Lin. Mac to Unix conversion was added by Bernd Johannes Wuebben in - 1998, Unix to Mac conversion by Erwin Waterlander in 2010. - - In 2010 the two separate dos2unix and unix2dos packages have been - bundled into a single dos2unix package (version 5.0). Support for - Unicode UTF-16 was added in 2012 (version 6.0). - - - Features - - * Native language support. - * Automatically skips binary and non-regular files. - * In-place, paired, or stdio mode conversion. - * Keep original file dates option. - * 7-bit and iso conversion modes like SunOS dos2unix. - * Conversion of Unicode UTF-16 files. - * Handles Unicode Byte Order Mark (BOM). - * Display file information. - * Secure. - - -AUTHORS - - Erwin Waterlander version 3.2-7.2 2009-2015 - Christian Wurll version 3.1 1998 - Bernd Johannes Wuebben version 3.0 1998 - Benjamin Lin version 1.1-2.3 1994-1995 - John Birchfield version 1.0 1989 - -TRANSLATORS - - Since verion 6.0.5 dos2unix is part of the Translation Project (TP). - All translations go via the Translation Project. - - Translation of the messages. - See http://translationproject.org/domain/dos2unix.html - - Brazilian Portuguese Enrico Nicoletto Version 6.0.5 - Brazilian Portuguese Rafael Ferreira Version 6.0.6 - 7.2 - Chinese (traditional) mail6543210 Version 6.0.5 - Danish Thomas Pryds Version 6.0.5 - 6.0.6 - Dutch Erwin Waterlander Version 4.0 - 6.0.4 - Dutch Benno Schulenberg Version 6.0.5 - 7.2 - Esperanto Rugxulo Version 5.1 - 6.0.4 - Esperanto Benno Schulenberg Version 6.0.5 - 7.1 - French Frédéric Marchal Version 6.0.5 - 7.2 - German Philipp Thomas Version 5.0 - 6.0.3, 7.0 - German Lars Wendler Version 6.0.4 - German Mario Blättermann Version 6.0.6, 7.1 - 7.2 - Hungarian Balázs Úr Version 6.0.5 - 7.1 - Japanese Yasuaki Taniguchi Version 7.1.1 - Norwegian Bokmaal Åka Sikrom Version 6.0.6 - 7.2 - Polish Jakub Bogusz Version 6.0.5 - 7.2 - Russian Андрей Углик (Andrei Uhlik) Version 6.0.4 - Russian Yuri Kozlov Version 6.0.6 - 7.1 - Serbian Мирослав Николић Version 6.0.5 - 6.0.6 - Spanish Julio A. Freyre-Gonzalez Version 5.3.1 - 6.0.4 - Spanish Enrique Lazcorreta Puigmartí Version 6.0.6 - 7.2 - Ukrainian Yuri Chornoivan Version 6.0.5 - 7.2 - Vietnamese Trần Ngọc Quân Version 6.0.5 - 7.2 - - Translation of the manual. - See http://translationproject.org/domain/dos2unix-man.html - - Brazilian Portuguese Rafael Ferreira Version 6.0.5 - 7.2 - Dutch Erwin Waterlander Version 5.1.1 - 6.0.4 - Dutch Benno Schulenberg Version 6.0.5 - 7.2 - French Frédéric Marchal Version 6.0.5 - 7.2 - German Mario Blättermann Version 6.0.5 - 7.2 - Polish Jakub Bogusz Version 6.0.5 - 7.2 - Spanish Julio A. Freyre-Gonzalez Version 5.3.1 - 6.0.4 - Spanish Enrique Lazcorreta Puigmartí Version 6.0.6 - 7.2 - Ukrainian Yuri Chornoivan Version 6.0.5 - 7.2 - - -ACKNOWLEDGEMENTS - - Rugxulo query_con_codepage(), code page detection in DOS. - Rugxulo DJGPP stubs for mac2unix and unix2mac. - Jari Aalto Improvements man page. - Jari Aalto Improvements Makefile. - Ben Pfaff Treat form feeds as valid text. - Marc Gianzero Darwin OS port. - Elbert Pol OS/2 port. - Tim Waugh Various patches. - Mike Harris Man page update. - Bernard RosenKraenzer segfault patch. - Tim Powers mkstemp patch. - Miloslav Trmac safeconv patch. - Charles Wilson Follow symbolic links. - Charles Wilson Makefile and code cleanup for Cygwin. - Christopher Williams Maintain file ownership in old file mode. - Steven H. Levine Support wildcard expansion on OS/2. - Steve Hay Support wildcard expansion on win64. - Michael Schindler Fixed compiler warning. - Somsak Pattanaprateep Print line number when binary symbol is found. - Justin Lecher Makefile improvement. - F.J. Brandelik Reported problems when win32 version processes - huge files on a network drive. - Benno Schulenberg Cleaning up the UI messages. - Mario Blättermann Generate pod files from gettext po files with po4a. - Daniel Macks Reported dependency on GNU sed. - Alan S. Jones Reported bug in UTF-16 conversion by mac2unix. - Alan S. Jones Idea for an info option, to list file statistics - about line breaks and byte order marks. - Gary Johnson Idea for an info option, to list only files which have - DOS line breaks, or only files with Unix line breaks. - Helmut Karlowski Makefile and PrintVersion() update for freeMiNT. - Tom Christiansen Fix for wrong title in HTML manuals. - Armin Müller Fixed typo in if condition in write_bom(). - - -FINDUTILS - - Windows users who are looking for the Unix 'find' and 'xargs' commands - can find them in the findutils package for Windows at the ezwinports - project page at: http://sourceforge.net/projects/ezwinports/files/ - - A DOS version of the findutils package can be obtained from the DJGPP - project (http://www.delorie.com/djgpp/) at - ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/ - -CONTACT INFORMATION - - Project home page : http://waterlan.home.xs4all.nl/dos2unix.html - SourceForge project page : http://sourceforge.net/projects/dos2unix/ - - Erwin Waterlander - waterlan@xs4all.nl - http://waterlan.home.xs4all.nl/ - - If you need support you can email me directly or make a ticket on the - SourceForge project page. Help in any form is appreciated. A problem - report, a fix, or just a remark. diff --git a/Tools/dos2unix/share/doc/dos2unix-7.2/TODO.txt b/Tools/dos2unix/share/doc/dos2unix-7.2/TODO.txt deleted file mode 100644 index 2bd5053..0000000 --- a/Tools/dos2unix/share/doc/dos2unix-7.2/TODO.txt +++ /dev/null @@ -1,20 +0,0 @@ - -TO DO -===== - -* Translations. - - All translations are going via the Translation Project. - - User interface messages: - See http://translationproject.org/domain/dos2unix.html - - Manual: - See http://translationproject.org/domain/dos2unix-man.html - - -* Support writing to symbolic link targets of Windows native - symbolic links (Windows Vista and up). - -* Keep original owner in old file mode, on Windows. - diff --git a/Tools/dos2unix/share/doc/dos2unix-7.2/de/dos2unix.htm b/Tools/dos2unix/share/doc/dos2unix-7.2/de/dos2unix.htm deleted file mode 100644 index cc8f8dc..0000000 --- a/Tools/dos2unix/share/doc/dos2unix-7.2/de/dos2unix.htm +++ /dev/null @@ -1,654 +0,0 @@ - - - - -dos2unix 7.2 - Formatumwandlung für Textdateien von DOS/Mac nach Unix und umgekehrt - - - - - - - - - - -

BEZEICHNUNG

- -

dos2unix - Formatumwandlung für Textdateien von DOS/Mac nach Unix und umgekehrt

- -

ÜBERSICHT

- -
    dos2unix [Optionen] [DATEI …] [-n EINGABEDATEI AUSGABEDATEI …]
-    unix2dos [Optionen] [DATEI …] [-n EINGABEDATEI AUSGABEDATEI …]
- -

BESCHREIBUNG

- -

Das Paket Dos2unix enthält die Werkzeuge dos2unix und unix2dos zum Umwandeln einfacher Textdateien aus dem DOS- oder Mac-Format in das Unix-Format und umgekehrt.

- -

In Textdateien unter DOS/Windows sind Zeilenumbrüche, auch als neue Zeile (NL) bekannt, eine Kombination aus zwei Zeichen: einem Wagenrücklauf (Carriage Return, CR) gefolgt von einem Zeilenvorschub (Line Feed, LF). In Unix-Textdateien bestehen Zeilenumbrüche nur aus einem Zeichen, dem Zeilenvorschub (LF). In Mac-Textdateien aus der Zeit vor MacOSX bestand ein Zeilenumbruch aus einem einzelnen CR-Zeichen. Heute verwendet Mac OS Zeilenumbrüche im Unix-Stil (LF).

- -

Neben Zeilenumbrüchen kann Dos2unix auch die Zeichenkodierung von Dateien umwandeln. Einige DOS-Codepages können in Unix Latin-1 umgewandelt werden, und Windows-Unicode-Dateien (UTF-16) können in Unix-Unicode-Dateien (UTF-8) umgewandelt werden.

- -

Binärdateien werden automatisch übersprungen, sofern die Umwandlung nicht erzwungen wird.

- -

Nicht-reguläre Dateien, wie Verzeichnisse und FIFOS (Weiterleitungen) werden automatisch übersprungen.

- -

Symbolische Links und deren Ziele werden per Vorgabe unverändert belassen. Symbolische Links können optional ersetzt werden, oder die Ausgabe wird in das Ziel des symbolischen Links geschrieben. Unter Windows wird das Schreiben in das Ziel eines symbolischen Links nicht unterstützt.

- -

Dos2unix wurde nach dem Vorbild der dos2unix-Version unter SunOS/Solaris entwickelt, doch es gitb einen wesentlichen Unterschied zu: Diese Version ersetzt per Vorgabe Dateien bei der Umwandlung (Alte-Datei-Modus), während unter SunOS/Solaris nur die paarweise Umwandlung (Neue-Datei-Modus) unterstützt wird. Siehe dazu die Optionen -o und -n.

- -

OPTIONEN

- -
- -
--
-
- -

nimmt alle folgenden Optionen als Dateinamen an. Verwenden Sie diese Option, wenn Sie Dateien umwandeln wollen, deren Namen mit einem Minuszeichen beginnen. Um beispielsweise eine Datei namens »-bla« umzuwandeln, können Sie folgenden Befehl verwenden:

- -
    dos2unix -- -bla
- -

oder im Neue-Datei-Modus:

- -
    dos2unix -n -- -bla ausgabe.txt
- -
-
-ascii
-
- -

wandelt nur Zeilenumbrüche um. Dies ist der vorgegebene Umwandlungsmodus.

- -
-
-iso
-
- -

wandelt aus dem DOS- in den ISO-8859-1-Zeichensatz um. Weitere Informationen hierzu finden Sie im Abschnitt UMWANDLUNGSMODI.

- -
-
-1252
-
- -

verwendet die Windows-Codepage 1252 (Westeuropäisch).

- -
-
-437
-
- -

verwendet die DOS-Codepage 437 (US). Dies ist die vorgegebene Codepage für die ISO-Umwandlung.

- -
-
-850
-
- -

verwendet die DOS-Codepage 850 (Westeuropäisch).

- -
-
-860
-
- -

verwendet die DOS-Codepage 860 (Portugiesisch).

- -
-
-863
-
- -

verwendet die DOS-Codepage 863 (Kanadisches Französisch).

- -
-
-865
-
- -

verwendet die DOS-Codepage 865 (Skandinavisch).

- -
-
-7
-
- -

wandelt 8bit-Zeichen in ein 7bit-Bitmuster um.

- -
-
-b, --keep-bom
-
- -

erhält die Markierung der Bytereihenfolge (BOM). Wenn die Eingabedatei eine BOM enthält, wird ebenfalls eine BOM in die Ausgabedatei geschrieben. Dies ist das Standardverhalten beim Umwandeln von DOS-Zeilenumbrüchen. Siehe auch die Option -r.

- -
-
-c, --convmode UMWANDLUNGSMODUS
-
- -

legt den Umwandlungsmodus fest. UMWANDLUNGSMODUS kann ascii, 7bit, iso oder mac sein, wobei ascii die Vorgabe ist.

- -
-
-f, --force
-
- -

erzwingt die Umwandlung von Binärdateien.

- -
-
-gb, --gb18030
-
- -

wandelt unter Windows UTF-16-Dateien standardmäßig in UTF-8 um, ungeachtet der Einstellung der Locale. Verwenden Sie diese Option zum umwandeln von Utf-16-Dateien in GB18030. Diese Option ist nur unter Windows verfügbar. Siehe auch Abschnitt GB18030.

- -
-
-h, --help
-
- -

zeigt eine Hilfe an und beendet das Programm.

- -
-
-i[SCHALTER], --info[=SCHALTER] DATEI
-
- -

zeigt Dateiinformationen an. Es wird keine Umwandlung vorgenommen.

- -

Die Ausgabe der Informationen geschieht in der folgenden Reihenfolge: Anzahl der DOS-Zeilenumbrüche, Anzahl der Unix-Zeilenumbrüche, Anzahl der Mac-Zeilenumbrüche, Markierung der Bytereihenfolge, Text- oder Binärformat, Dateiname.

- -

Beispielausgabe:

- -
     6       0       0  no_bom    text    dos.txt
-     0       6       0  no_bom    text    unix.txt
-     0       0       6  no_bom    text    mac.txt
-     6       6       6  no_bom    text    mixed.txt
-    50       0       0  UTF-16LE  text    utf16le.txt
-     0      50       0  no_bom    text    utf8unix.txt
-    50       0       0  UTF-8     text    utf8dos.txt
-     2     418     219  no_bom    binary  dos2unix.exe
- -

Optionale zusätzliche Schalter können gesetzt werden, um die Ausgabe anzupassen. Einer oder mehrere Schalter können hinzugefügt werden.

- -
- -
d
-
- -

gibt die Anzahl der DOS-Zeilenumbrüche aus.

- -
-
u
-
- -

gibt die Anzahl der Unix-Zeilenumbrüche aus.

- -
-
m
-
- -

gibt die Anzahl der Mac-Zeilenumbrüche aus.

- -
-
b
-
- -

gibt die Markierung der Bytereihenfolge aus.

- -
-
t
-
- -

zeigt an, ob es sich um eine Text- oder eine Binärdatei handelt.

- -
-
c
-
- -

gibt nur die Dateien aus, die umgewandelt werden würden.

- -

Mit dem Schalter c gibt dos2unix nur die Dateien aus, die DOS-Zeilenumbrüche enthalten, unix2dos nur die Dateien mit Unix-Zeilenumbrüchen.

- -
-
- -

Beispiele:

- -

Informationen zu allen *.txt-Dateien anzeigen:

- -
    dos2unix -i *.txt
- -

Nur die Anzahl der DOS-Zeilenumbrüche und Unix-Zeilenumbrüche anzeigen:

- -
    dos2unix -idu *.txt
- -

Nur die Markierung der Bytereihenfolge anzeigen:

- -
    dos2unix --info=b *.txt
- -

Die Dateien auflisten, die DOS-Zeilenumbrüche enthalten:

- -
    dos2unix -ic *.txt
- -

Die Dateien auflisten, die Unix-Zeilenumbrüche enthalten:

- -
    unix2dos -ic *.txt
- -
-
-k, --keepdate
-
- -

übernimmt den Zeitstempel der Eingabedatei in die Ausgabedatei.

- -
-
-L, --license
-
- -

zeigt die Lizenz des Programms an.

- -
-
-l, --newline
-
- -

fügt eine zusätzliche neue Zeile hinzu.

- -

dos2unix: Nur DOS-Zeilenumbrüche werden in Unix-Zeilenumbrüche umgewandelt. Im Mac-Modus werden nur Mac-Zeilenumbrüche in Unix-Zeilenumbrüche umgewandelt.

- -

unix2dos: Nur Unix-Zeilenumbrüche werden in DOS-Zeilenumbrüche umgewandelt. Im Mac-Modus werden nur Unix-Zeilenumbrüche in Mac-Zeilenumbrüche umgewandelt.

- -
-
-m, --add-bom
-
- -

schreibt eine Markierung der Bytereihenfolge (BOM) in die Ausgabedatei. In der Voreinstellung wird eine UTF-8-BOM geschrieben.

- -

Wenn die Eingabedatei in UTF-16 kodiert ist und die Option -u verwendet wird, wird eine UTF-16-BOM geschrieben.

- -

Verwenden Sie diese Option niemals, wenn die Kodierung der Ausgabedatei weder UTF-8 noch UTF-16 ist. Weitere Informationen finden Sie im Abschnitt UNICODE.

- -
-
-n, --newfile EINGABEDATEI AUSGABEDATEI …
-
- -

Neue-Datei-Modus. Die EINGABEDATEI wird umgewandelt und in die AUSGABEDATEI geschrieben. Die Dateinamen müssen paarweise angegeben werden. Platzhalter sollten nicht verwendet werden, sonst werden Sie Ihre Dateien verlieren.

- -

Der Benutzer, der die Umwandlung im Neue-Datei-Modus startet, wird Besitzer der umgewandelten Datei. Die Lese- und Schreibrechte werden aus den Zugriffsrechten der Originaldatei minus der umask(1) der Person ermittelt, die die Umwandlung ausgeführt hat.

- -
-
-o, --oldfile DATEI …
-
- -

Alte-Datei-Modus. Die DATEI wird umgewandelt und durch die Ausgabedatei überschrieben. Per Vorgabe werden Umwandlungen in diesem Modus ausgeführt. Platzhalter sind verwendbar.

- -

Im Alte-Datei-Modus (Ersetzungsmodus) erhalten die umgewandelten Dateien den gleichen Eigentümer, die gleiche Gruppe und die gleichen Lese- und Schreibberechtigungen wie die Originaldatei, auch wenn die Datei von einem anderen Benutzer umgewandelt wird, der Schreibrechte für die Datei hat (zum Beispiel der Systemadministrator). Die Umwandlung wird abgebrochen, wenn es nicht möglich ist, die originalen Werte beizubehalten. Die Änderung des Eigentümers könnte zum Beispiel bewirken, dass der ursprüngliche Eigentümer die Datei nicht mehr lesen kann. Die Änderung der Gruppe könnte ein Sicherheitsrisiko sein, da die Datei vielleicht für Benutzer lesbar wird, für die sie nicht bestimmt ist. Die Beibehaltung von Eigentümer, Gruppe und Schreib- und Leserechten wird nur unter Unix unterstützt.

- -
-
-q, --quiet
-
- -

Stiller Modus, in dem alle Warnungen und sonstige Meldungen unterdrückt werden. Der Rückgabewert ist 0, außer wenn fehlerhafte Befehlszeilenoptionen angegeben werden.

- -
-
-r, --remove-bom
-
- -

entfernt die Markierung der Bytereihenfolge (BOM). Es wird keine BOM in die Ausgabedatei geschrieben. Dies ist das Standardverhalten beim Umwandeln von Unix-Zeilenumbrüchen. Siehe auch die Option -b.

- -
-
-s, --safe
-
- -

überspringt Binärdateien (Vorgabe).

- -
-
-u, --keep-utf16
-
- -

erhält die originale UTF-16-Kodierung der Eingabedatei. Die Ausgabedatei wird in der gleichen UTF-16-Kodierung geschrieben (Little-Endian- oder Big-Endian-Bytereihenfolge) wie die Eingabedatei. Dies verhindert die Umwandlung in UTF-8. Eine UTF-16-BOM wird dementsprechend geschrieben. Diese Option kann durch Angabe der Option -ascii deaktiviert werden.

- -
-
-ul, --assume-utf16le
-
- -

nimmt an, dass die Eingabedatei das Format UTF-16LE hat.

- -

Wenn die Eingabedatei eine Markierung der Bytereihenfolge enthält (BOM), dann hat die BOM Vorrang vor dieser Option.

- -

Durch eine falsche Annahme (die Eingabedatei war nicht in UTF-16LE kodiert) mit erfolgreicher Umwandlung erhalten Sie eine UTF-8-Ausgabedatei mit fehlerhaftem Text. Sie können die fehlgeschlagene Umwandlung mit iconv(1) rückgängig machen, indem Sie die Rückumwandlung von UTF-8 nach UTF-16LE vornehmen. Dadurch gewinnen Sie die Originaldatei zurück.

- -

Die Annahme von UTF-16LE wirkt wie ein Umwandlungsmodus. Beim Wechsel zum vorgegebenen ascii-Modus wird die UTF16LE-Annahme deaktiviert.

- -
-
-ub, --assume-utf16be
-
- -

nimmt an, dass die Eingabedatei das Format UTF-16BE hat.

- -

Diese Option ist gleichbedeutend mit -ul.

- -
-
-v, --verbose
-
- -

zeigt ausführliche Meldungen an. Zusätzliche Informationen werden zu den Markierungen der Bytereihenfolge (BOM) und zur Anzahl der umgewandelten Zeilenumbrüche angezeigt.

- -
- -
- -

folgt symbolischen Links und wandelt die Zieldateien um.

- -
- -
- -

ersetzt symbolische Links durch die umgewandelten Dateien (die originalen Zieldateien bleiben unverändert).

- -
- -
- -

erhält symbolische Links als solche und lässt die Ziele unverändert (Vorgabe).

- -
-
-V, --version
-
- -

zeigt Versionsinformationen an und beendet das Programm.

- -
-
- -

MAC-MODUS

- -

Im Normalmodus werden Zeilenumbrüche von DOS nach Unix und umgekehrt umgewandelt. Mac-Zeilenumbrüche werden nicht verändert.

- -

Im Mac-Modus werden Zeilenumbrüche von Mac nach Unix und umgekehrt umgewandelt. DOS-Zeilenumbrüche werden nicht verändert.

- -

Um das Programm im Mac-Modus auszuführen, verwenden Sie die Befehlszeilenoption -c mac oder die Befehle mac2unix oder unix2mac.

- -

UMWANDLUNGSMODI

- -
- -
ascii
-
- -

Im ascii-Modus werden nur Zeilenumbrüche umgewandelt. Dies ist der vorgegebene Umwandlungsmodus.

- -

Obwohl der Name dieses Modus auf ASCII hinweist, welches ein 7-bit-Standard ist, bezieht sich der eigentliche Modus auf 8 Bit. Verwenden Sie diesen Modus immer dann, wenn Sie Unicode-Dateien in UTF-8-Kodierung umwandeln.

- -
-
7bit
-
- -

In diesem Modus werden alle Nicht-ASCII-Zeichen aus 8 Bit in das 7-Bit-Bitmuster umgewandelt.

- -
-
iso
-
- -

Die Zeichen werden aus dem DOS-Zeichensatz (der Codepage) in den ISO-Zeichensatz ISO-8859-1 (Latin-1) in Unix umgewandelt. DOS-Zeichen ohne Äquivalent in ISO-8859-1, für die die Umwandlung nicht möglich ist, werden durch einen Punkt ersetzt. Gleiches gilt für ISO-8859-1-Zeichen ohne DOS-Gegenstück.

- -

Wenn nur die Option -iso angegeben ist, versucht dos2unix die aktive Codepage selbst zu ermitteln. Sollte dies nicht möglich sein, wird die Standard-Codepage CP437 verwendet, welche hauptsächlich in den USA eingesetzt wird. Um eine bestimmte Codepage zu erzwingen, verwenden Sie die Optionen -437 (US), -850 (Westeuropäisch), -860 (Portugiesisch), -863 (Kanadisches Französisch) oder -865 (Skandinavisch). Die Windows-Codepage CP1252 (Westeuropäisch) wird durch die Option -1252 unterstützt.

- -

Wenden Sie niemals die ISO-Umwandlung auf Unicode-Textdateien an. In UTF-8 kodierte Dateien werden dadurch beschädigt.

- -

Einige Beispiele:

- -

Umwandlung aus der vorgegebenen DOS-Codepage nach Unix Latin-1:

- -
    dos2unix -iso -n in.txt ausgabe.txt
- -

Umwandlung von DOS CP850 nach Unix Latin-1:

- -
    dos2unix -850 -n eingabe.txt ausgabe.txt
- -

Umwandlung von Windows CP1252 nach Unix Latin-1:

- -
    dos2unix -1252 -n eingabe.txt ausgabe.txt
- -

Umwandlung von Windows CP1252 nach Unix UTF-8 (Unicode):

- -
    iconv -f CP1252 -t UTF-8 eingabe.txt | dos2unix > ausgabe.txt
- -

Umwandlung von Unix Latin-1 in die vorgegebene DOS-Codepage:

- -
    unix2dos -iso -n eingabe.txt ausgabe.txt
- -

Umwandlung von Unix Latin-1 nach DOS CP850:

- -
    unix2dos -850 -n eingabe.txt ausgabe.txt
- -

Umwandlung von Unix Latin-1 nach Windows CP1252:

- -
    unix2dos -1252 -n eingabe.txt ausgabe.txt
- -

Umwandlung von Unix UTF-8 (Unicode) nach Windows CP1252:

- -
    unix2dos < eingabe.txt | iconv -f UTF-8 -t CP1252 > ausgabe.txt
- -

Siehe auch http://czyborra.com/charsets/codepages.html und http://czyborra.com/charsets/iso8859.html.

- -
-
- -

UNICODE

- -

Zeichenkodierungen

- -

Es gibt verschiedene Unicode-Zeichenkodierungen. Unter Unix und Linux sind Unicode-Dateien typischerweise in UTF-8 kodiert. Unter Windows können Textdateien in UTF-8, UTF-16 oder UTF-16 in Big-Endian-Bytereihenfolge kodiert sein, liegen aber meist im Format UTF-16 vor.

- -

Umwandlung

- -

Unicode-Textdateien können DOS-, Unix- oder Mac-Zeilenumbrüche enthalten, so wie reguläre Textdateien.

- -

Alle Versionen von dos2unix und unix2dos können UTF-8-kodierte Dateien umwandeln, weil UTF-8 im Hinblick auf Abwärtskompatiblität mit ASCII entwickelt wurde.

- -

Dos2unix und unix2dos mit Unterstützung für UTF-16 können in UTF-16 kodierte Dateien in Little-Endian- und Big-Endian-Bytereihenfolge lesen. Um festzustellen, ob dos2unix mit UTF-16-Unterstützung kompiliert wurde, geben Sie dos2unix -V ein.

- -

Unter Unix/Linux werden UTF-16 kodierte Dateien standardmäßig in die Zeichenkodierung entsprechend der Locale umgewandelt. Mit dem Befehl locale(1) können Sie herausfinden, wie die Zeichenkodierung der Locale eingestellt ist. Wenn eine Umwandlung nicht möglich ist, verursacht dies einen Umwandlungsfehler, wodurch die Datei übersprungen wird.

- -

Unter Windows werden UTF-16-Dateien standardmäßig in UTF-8 umgewandelt. In UTF-8 formatierte Textdateien werden von Windows und Unix/Linux gleichermaßen unterstützt.

- -

Die Kodierungen UTF-16 und UTF-8 sind vollständig kompatibel, daher wird bei der Umwandlung keinerlei Text verlorengehen. Sollte bei der Umwandlung von UTF-16 in UTF-8 ein Problem auftreten, beispielsweise wenn die UTF-16-kodierte Eingabedatei einen Fehler enthält, dann wird diese Datei übersprungen.

- -

Wenn die Option -u verwendet wird, wird die Ausgabedatei in der gleichen UTF-16-Kodierung wie die Eingabedatei geschrieben. Die Option -u verhindert die Umwandlung in UTF-8.

- -

Dos2unix und unix2dos bieten keine Option zur Umwandlung von UTF-8-Dateien in UTF-16.

- -

Umwandlungen im ISO- und 7bit-Modus funktionieren mit UTF-16-Dateien nicht.

- -

Markierung der Bytereihenfolge

- -

Unicode-Textdateien unter Windows haben typischerweise eine Markierung der Bytereihenfolge (BOM), da viele Windows-Programme (zum Beispiel Notepad) solche BOMs standardmäßig hinzufügen. Weitere Informationen hierzu finden Sie auf http://de.wikipedia.org/wiki/Byte-Reihenfolge.

- -

Unter Unix haben Textdateien üblicherweise keine BOM. Es wird stattdessen angenommen, dass Textdateien in der Zeichenkodierung entsprechend der Spracheinstellung vorliegen.

- -

Dos2unix kann nur dann erkennen, ob eine Datei UTF-16-kodiert ist, wenn die Datei eine BOM enthält. Ist dies nicht der Fall, nimmt dos2unix an, dass es sich um eine Binärdatei handelt.

- -

Verwenden Sie die Optionen -ul oder -ub, um eine UTF-16-Datei ohne BOM umzuwandeln.

- -

Dos2unix schreibt in der Voreinstellung keine BOM in die Ausgabedatei. Mit der Option -b schreibt Dos2unix eine BOM, wenn die Eingabedatei ebenfalls eine BOM hat.

- -

Unix2dos schreibt in der Voreinstellung eine BOM in die Ausgabedatei, wenn die Eingabedatei ebenfalls eine solche Markierung hat. Verwenden Sie die Option -r, um die BOM zu entfernen.

- -

Dos2unix und unix2dos schreiben immer eine BOM, wenn die Option -m angegeben ist.

- -

Unicode-Beispiele

- -

Umwandlung von Windows UTF-16 (mit BOM) nach Unix UTF-8:

- -
    dos2unix -n eingabe.txt ausgabe.txt
- -

Umwandlung von Windows UTF-16LE (ohne BOM) nach Unix UTF-8:

- -
    dos2unix -ul -n eingabe.txt ausgabe.txt
- -

Umwandlung von Unix UTF-8 nach Windows UTF-8 mit BOM:

- -
    unix2dos -m -n eingabe.txt ausgabe.txt
- -

Umwandlung von Unix UTF-8 nach Windows UTF-16:

- -
    unix2dos < eingabe.txt | iconv -f UTF-8 -t UTF-16 > ausgabe.txt
- -

GB18030

- -

GB18030 ist ein Standard der chinesischen Regierung. Eine Teilmenge des in GB18030 definierten Standards ist offiziell für alle in China verkauften Softwareprodukte vorgeschrieben. Siehe auch http://de.wikipedia.org/wiki/GB_18030.

- -

GB18030 ist vollständig zu Unicode kompatibel und kann als Unicode-Umwandlungsformat betrahctet werden. Wie auch UTF-8 ist GB18030 kompatibel zu ASCII. Ebenfalls kompatibel ist es zur Codepage 936 von Windows, auch als GBK bekannt.

- -

Unter Unix/Linux werden UTF-16-Dateien in GB18030 umgewandelt, wenn die Einstellung der Locale auf GB18030 gesetzt ist. Beachten Sie, dass dies nur funktioniert, wenn der Ort auf »China« gesetzt ist. Zum Beispiel wird in einer Locale-Einstellung en_GB.GB18030 (Britisches Englisch) die Umwandlung von UTF-16 in GB18030 nicht möglich sein, aber in der chinesischen Einstellung zh_CN.GB18030 dagegen funktionieren.

- -

Unter Windows benötigen Sie die Option -gb, um UTF-16-Dateien in GB18030 umwandeln zu können.

- -

In GB 18030 kodierte Dateien haben wie Unicode-Dateien eine Markierung der Bytereihenfolge (BOM).

- -

BEISPIELE

- -

Aus der Standardeingabe lesen und in die Standardausgabe schreiben:

- -
    dos2unix
-    dos2unix -l -c mac
- -

a.txt umwandeln und ersetzen, b.txt umwandeln und ersetzen:

- -
    dos2unix a.txt b.txt
-    dos2unix -o a.txt b.txt
- -

a.txt im ascii-Modus umwandeln und ersetzen:

- -
    dos2unix a.txt
- -

a.txt im ascii-Modus umwandeln und ersetzen, b.txt im 7bit-Modus umwandeln und ersetzen:

- -
    dos2unix a.txt -c 7bit b.txt
-    dos2unix -c ascii a.txt -c 7bit b.txt
-    dos2unix -ascii a.txt -7 b.txt
- -

a.txt aus dem Mac- in das Unix-Format umwandeln:

- -
    dos2unix -c mac a.txt
-    mac2unix a.txt
- -

a.txt aus dem Unix- in das Mac-Format umwandeln:

- -
    unix2dos -c mac a.txt
-    unix2mac a.txt
- -

a.txt unter Beibehaltung des ursprünglichen Zeitstempels umwandeln:

- -
    dos2unix -k a.txt
-    dos2unix -k -o a.txt
- -

a.txt umwandeln und das Ergebnis nach e.txt schreiben:

- -
    dos2unix -n a.txt e.txt
- -

a.txt umwandeln und das Ergebnis nach e.txt schreiben, wobei e.txt den gleichen Zeitstempel erhält wie a.txt:

- -
    dos2unix -k -n a.txt e.txt
- -

a.txt umwandeln und ersetzen, b.txt umwandeln und das Ergebnis nach e.txt schreiben:

- -
    dos2unix a.txt -n b.txt e.txt
-    dos2unix -o a.txt -n b.txt e.txt
- -

c.txt umwandeln und das Ergebnis nach e.txt schreiben, a.txt umwandeln und ersetzen, b.txt umwandeln und ersetzen, d.txt umwandeln und das Ergebnis nach f.txt schreiben:

- -
    dos2unix -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt
- -

REKURSIVE UMWANDLUNG

- -

Verwenden Sie dos2unix zusammen mit den Befehlen find(1) und xargs(1), um Textdateien in einem Verzeichnisbaum rekursiv umzuwandeln. Um beispielsweise alle *.txt-Dateien im aktuellen Verzeichnis und dessen Unterverzeichnissen umzuwandeln, geben Sie Folgendes ein:

- -
    find . -name *.txt |xargs dos2unix
- -

LOKALISIERUNG

- -
- -
LANG
-
- -

Die primäre Sprache wird durch die Umgebungsvariable LANG festgelegt. Diese Variable besteht aus mehreren Teilen: Der erste Teil besteht aus zwei Kleinbuchstaben, die den Sprachcode angeben. Der zweite Teil ist optional und bezeichnet den Ländercode in Großbuchstaben, vom davor stehenden Sprachcode durch einen Unterstrich getrennt. Der dritte Teil ist ebenfalls optional und gibt die Zeichenkodierung an, vom Ländercode durch einen Punkt getrennt. Einige Beispiele für Standard-POSIX-Shells:

- -
    export LANG=de               Deutsch
-    export LANG=de_DE            Deutsch, Deutschland
-    export LANG=de_AT            Deutsch, Österreich
-    export LANG=es_ES            Spanisch, Spanien
-    export LANG=es_MX            Spanisch, Mexiko
-    export LANG=en_US.iso88591   Englisch, USA, Latin-1-Zeichenkodierung
-    export LANG=en_GB.UTF-8      Englisch, GB, UTF-8-Zeichenkodierung
- -

Eine vollständige Liste der Sprachen und Ländercodes finden Sie im Gettext-Handbuch: http://www.gnu.org/software/gettext/manual/html_node/Usual-Language-Codes.html

- -

Auf Unix-Systemen erhalten Sie mit dem Befehl locale(1) spezifische Informationen zu den Spracheinstellungen.

- -
-
LANGUAGE
-
- -

Mit der Umgebungsvariable LANGUAGE können Sie eine Prioritätenliste für Sprachen übergeben, die Sie durch Doppelpunkte voneinander trennen. Dos2unix gibt LANGUAGE vor LANG den Vorzug, zum Beispiel bei Deutsch vor Niederländisch: LANGUAGE=de:nl. Sie müssen zunächst die Lokalisierung aktivieren, indem Sie die Variable LANG (oder LC_ALL) auf einen anderen Wert als »C« setzen, bevor Sie die Liste der Sprachprioritäten mit der Variable LANGUAGE nutzen können. Weitere Informationen finden Sie im Gettext-Handbuch: http://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html

- -

Falls Sie eine Sprache auswählen, die nicht verfügbar ist, erhalten Sie die Standardmeldungen in englischer Sprache.

- -
-
DOS2UNIX_LOCALEDIR
-
- -

Durch die Umgebungsvariable DOS2UNIX_LOCALEDIR wird LOCALEDIR während der Kompilierung übergangen. LOCALEDIR wird verwendet, um Sprachdateien zu finden. Der GNU-Standardwert ist /usr/local/share/locale. Die Option --version zeigt das verwendete LOCALEDIR an.

- -

Beispiel (POSIX-Shell):

- -
    export DOS2UNIX_LOCALEDIR=$HOME/share/locale
- -
-
- -

RÜCKGABEWERT

- -

Bei Erfolg wird 0 zurückgegeben. Bei aufgetretenen Systemfehlern wird der letzte Systemfehler zurückgegeben. Für alle anderen Fehler wird 1 zurückgegeben.

- -

Der Rückgabewert ist im stillen Modus stets 0, außer wenn fehlerhafte Befehlszeilenoptionen verwendet werden.

- -

STANDARDS

- -

http://de.wikipedia.org/wiki/Textdatei

- -

http://de.wikipedia.org/wiki/Wagenr%C3%BCcklauf

- -

http://de.wikipedia.org/wiki/Zeilenumbruch

- -

http://en.wikipedia.org/wiki/Unicode

- -

AUTOREN

- -

Benjamin Lin - <blin@socs.uts.edu.au>, Bernd Johannes Wuebben (Mac2unix-Modus) - <wuebben@kde.org>, Christian Wurll (Extra Zeilenumbruch) - <wurll@ira.uka.de>, Erwin Waterlander - <waterlan@xs4all.nl> (Betreuer)

- -

Projektseite: http://waterlan.home.xs4all.nl/dos2unix.html

- -

SourceForge-Seite: http://sourceforge.net/projects/dos2unix/

- -

SIEHE AUCH

- -

file(1) find(1) iconv(1) locale(1) xargs(1)

- - - - - - - diff --git a/Tools/dos2unix/share/doc/dos2unix-7.2/de/dos2unix.txt b/Tools/dos2unix/share/doc/dos2unix-7.2/de/dos2unix.txt deleted file mode 100644 index 659653b..0000000 --- a/Tools/dos2unix/share/doc/dos2unix-7.2/de/dos2unix.txt +++ /dev/null @@ -1,634 +0,0 @@ -BEZEICHNUNG - dos2unix - Formatumwandlung für Textdateien von DOS/Mac nach Unix und - umgekehrt - -ÜBERSICHT - dos2unix [Optionen] [DATEI …] [-n EINGABEDATEI AUSGABEDATEI …] - unix2dos [Optionen] [DATEI …] [-n EINGABEDATEI AUSGABEDATEI …] - -BESCHREIBUNG - Das Paket Dos2unix enthält die Werkzeuge "dos2unix" und "unix2dos" zum - Umwandeln einfacher Textdateien aus dem DOS- oder Mac-Format in das - Unix-Format und umgekehrt. - - In Textdateien unter DOS/Windows sind Zeilenumbrüche, auch als neue - Zeile (NL) bekannt, eine Kombination aus zwei Zeichen: einem - Wagenrücklauf (Carriage Return, CR) gefolgt von einem Zeilenvorschub - (Line Feed, LF). In Unix-Textdateien bestehen Zeilenumbrüche nur aus - einem Zeichen, dem Zeilenvorschub (LF). In Mac-Textdateien aus der Zeit - vor MacOSX bestand ein Zeilenumbruch aus einem einzelnen CR-Zeichen. - Heute verwendet Mac OS Zeilenumbrüche im Unix-Stil (LF). - - Neben Zeilenumbrüchen kann Dos2unix auch die Zeichenkodierung von - Dateien umwandeln. Einige DOS-Codepages können in Unix Latin-1 - umgewandelt werden, und Windows-Unicode-Dateien (UTF-16) können in - Unix-Unicode-Dateien (UTF-8) umgewandelt werden. - - Binärdateien werden automatisch übersprungen, sofern die Umwandlung - nicht erzwungen wird. - - Nicht-reguläre Dateien, wie Verzeichnisse und FIFOS (Weiterleitungen) - werden automatisch übersprungen. - - Symbolische Links und deren Ziele werden per Vorgabe unverändert - belassen. Symbolische Links können optional ersetzt werden, oder die - Ausgabe wird in das Ziel des symbolischen Links geschrieben. Unter - Windows wird das Schreiben in das Ziel eines symbolischen Links nicht - unterstützt. - - Dos2unix wurde nach dem Vorbild der dos2unix-Version unter SunOS/Solaris - entwickelt, doch es gitb einen wesentlichen Unterschied zu: Diese - Version ersetzt per Vorgabe Dateien bei der Umwandlung - (Alte-Datei-Modus), während unter SunOS/Solaris nur die paarweise - Umwandlung (Neue-Datei-Modus) unterstützt wird. Siehe dazu die Optionen - "-o" und "-n". - -OPTIONEN - -- nimmt alle folgenden Optionen als Dateinamen an. Verwenden Sie diese - Option, wenn Sie Dateien umwandeln wollen, deren Namen mit einem - Minuszeichen beginnen. Um beispielsweise eine Datei namens »-bla« - umzuwandeln, können Sie folgenden Befehl verwenden: - - dos2unix -- -bla - - oder im Neue-Datei-Modus: - - dos2unix -n -- -bla ausgabe.txt - - -ascii - wandelt nur Zeilenumbrüche um. Dies ist der vorgegebene - Umwandlungsmodus. - - -iso - wandelt aus dem DOS- in den ISO-8859-1-Zeichensatz um. Weitere - Informationen hierzu finden Sie im Abschnitt UMWANDLUNGSMODI. - - -1252 - verwendet die Windows-Codepage 1252 (Westeuropäisch). - - -437 - verwendet die DOS-Codepage 437 (US). Dies ist die vorgegebene - Codepage für die ISO-Umwandlung. - - -850 - verwendet die DOS-Codepage 850 (Westeuropäisch). - - -860 - verwendet die DOS-Codepage 860 (Portugiesisch). - - -863 - verwendet die DOS-Codepage 863 (Kanadisches Französisch). - - -865 - verwendet die DOS-Codepage 865 (Skandinavisch). - - -7 wandelt 8bit-Zeichen in ein 7bit-Bitmuster um. - - -b, --keep-bom - erhält die Markierung der Bytereihenfolge (BOM). Wenn die - Eingabedatei eine BOM enthält, wird ebenfalls eine BOM in die - Ausgabedatei geschrieben. Dies ist das Standardverhalten beim - Umwandeln von DOS-Zeilenumbrüchen. Siehe auch die Option "-r". - - -c, --convmode UMWANDLUNGSMODUS - legt den Umwandlungsmodus fest. UMWANDLUNGSMODUS kann *ascii*, - *7bit*, *iso* oder *mac* sein, wobei *ascii* die Vorgabe ist. - - -f, --force - erzwingt die Umwandlung von Binärdateien. - - -gb, --gb18030 - wandelt unter Windows UTF-16-Dateien standardmäßig in UTF-8 um, - ungeachtet der Einstellung der Locale. Verwenden Sie diese Option - zum umwandeln von Utf-16-Dateien in GB18030. Diese Option ist nur - unter Windows verfügbar. Siehe auch Abschnitt GB18030. - - -h, --help - zeigt eine Hilfe an und beendet das Programm. - - -i[SCHALTER], --info[=SCHALTER] DATEI - zeigt Dateiinformationen an. Es wird keine Umwandlung vorgenommen. - - Die Ausgabe der Informationen geschieht in der folgenden - Reihenfolge: Anzahl der DOS-Zeilenumbrüche, Anzahl der - Unix-Zeilenumbrüche, Anzahl der Mac-Zeilenumbrüche, Markierung der - Bytereihenfolge, Text- oder Binärformat, Dateiname. - - Beispielausgabe: - - 6 0 0 no_bom text dos.txt - 0 6 0 no_bom text unix.txt - 0 0 6 no_bom text mac.txt - 6 6 6 no_bom text mixed.txt - 50 0 0 UTF-16LE text utf16le.txt - 0 50 0 no_bom text utf8unix.txt - 50 0 0 UTF-8 text utf8dos.txt - 2 418 219 no_bom binary dos2unix.exe - - Optionale zusätzliche Schalter können gesetzt werden, um die Ausgabe - anzupassen. Einer oder mehrere Schalter können hinzugefügt werden. - - d gibt die Anzahl der DOS-Zeilenumbrüche aus. - - u gibt die Anzahl der Unix-Zeilenumbrüche aus. - - m gibt die Anzahl der Mac-Zeilenumbrüche aus. - - b gibt die Markierung der Bytereihenfolge aus. - - t zeigt an, ob es sich um eine Text- oder eine Binärdatei handelt. - - c gibt nur die Dateien aus, die umgewandelt werden würden. - - Mit dem Schalter "c" gibt dos2unix nur die Dateien aus, die - DOS-Zeilenumbrüche enthalten, unix2dos nur die Dateien mit - Unix-Zeilenumbrüchen. - - Beispiele: - - Informationen zu allen *.txt-Dateien anzeigen: - - dos2unix -i *.txt - - Nur die Anzahl der DOS-Zeilenumbrüche und Unix-Zeilenumbrüche - anzeigen: - - dos2unix -idu *.txt - - Nur die Markierung der Bytereihenfolge anzeigen: - - dos2unix --info=b *.txt - - Die Dateien auflisten, die DOS-Zeilenumbrüche enthalten: - - dos2unix -ic *.txt - - Die Dateien auflisten, die Unix-Zeilenumbrüche enthalten: - - unix2dos -ic *.txt - - -k, --keepdate - übernimmt den Zeitstempel der Eingabedatei in die Ausgabedatei. - - -L, --license - zeigt die Lizenz des Programms an. - - -l, --newline - fügt eine zusätzliche neue Zeile hinzu. - - dos2unix: Nur DOS-Zeilenumbrüche werden in Unix-Zeilenumbrüche - umgewandelt. Im Mac-Modus werden nur Mac-Zeilenumbrüche in - Unix-Zeilenumbrüche umgewandelt. - - unix2dos: Nur Unix-Zeilenumbrüche werden in DOS-Zeilenumbrüche - umgewandelt. Im Mac-Modus werden nur Unix-Zeilenumbrüche in - Mac-Zeilenumbrüche umgewandelt. - - -m, --add-bom - schreibt eine Markierung der Bytereihenfolge (BOM) in die - Ausgabedatei. In der Voreinstellung wird eine UTF-8-BOM geschrieben. - - Wenn die Eingabedatei in UTF-16 kodiert ist und die Option "-u" - verwendet wird, wird eine UTF-16-BOM geschrieben. - - Verwenden Sie diese Option niemals, wenn die Kodierung der - Ausgabedatei weder UTF-8 noch UTF-16 ist. Weitere Informationen - finden Sie im Abschnitt UNICODE. - - -n, --newfile EINGABEDATEI AUSGABEDATEI … - Neue-Datei-Modus. Die EINGABEDATEI wird umgewandelt und in die - AUSGABEDATEI geschrieben. Die Dateinamen müssen paarweise angegeben - werden. Platzhalter sollten *nicht* verwendet werden, sonst werden - Sie Ihre Dateien *verlieren*. - - Der Benutzer, der die Umwandlung im Neue-Datei-Modus startet, wird - Besitzer der umgewandelten Datei. Die Lese- und Schreibrechte werden - aus den Zugriffsrechten der Originaldatei minus der umask(1) der - Person ermittelt, die die Umwandlung ausgeführt hat. - - -o, --oldfile DATEI … - Alte-Datei-Modus. Die DATEI wird umgewandelt und durch die - Ausgabedatei überschrieben. Per Vorgabe werden Umwandlungen in - diesem Modus ausgeführt. Platzhalter sind verwendbar. - - Im Alte-Datei-Modus (Ersetzungsmodus) erhalten die umgewandelten - Dateien den gleichen Eigentümer, die gleiche Gruppe und die gleichen - Lese- und Schreibberechtigungen wie die Originaldatei, auch wenn die - Datei von einem anderen Benutzer umgewandelt wird, der Schreibrechte - für die Datei hat (zum Beispiel der Systemadministrator). Die - Umwandlung wird abgebrochen, wenn es nicht möglich ist, die - originalen Werte beizubehalten. Die Änderung des Eigentümers könnte - zum Beispiel bewirken, dass der ursprüngliche Eigentümer die Datei - nicht mehr lesen kann. Die Änderung der Gruppe könnte ein - Sicherheitsrisiko sein, da die Datei vielleicht für Benutzer lesbar - wird, für die sie nicht bestimmt ist. Die Beibehaltung von - Eigentümer, Gruppe und Schreib- und Leserechten wird nur unter Unix - unterstützt. - - -q, --quiet - Stiller Modus, in dem alle Warnungen und sonstige Meldungen - unterdrückt werden. Der Rückgabewert ist 0, außer wenn fehlerhafte - Befehlszeilenoptionen angegeben werden. - - -r, --remove-bom - entfernt die Markierung der Bytereihenfolge (BOM). Es wird keine BOM - in die Ausgabedatei geschrieben. Dies ist das Standardverhalten beim - Umwandeln von Unix-Zeilenumbrüchen. Siehe auch die Option "-b". - - -s, --safe - überspringt Binärdateien (Vorgabe). - - -u, --keep-utf16 - erhält die originale UTF-16-Kodierung der Eingabedatei. Die - Ausgabedatei wird in der gleichen UTF-16-Kodierung geschrieben - (Little-Endian- oder Big-Endian-Bytereihenfolge) wie die - Eingabedatei. Dies verhindert die Umwandlung in UTF-8. Eine - UTF-16-BOM wird dementsprechend geschrieben. Diese Option kann durch - Angabe der Option "-ascii" deaktiviert werden. - - -ul, --assume-utf16le - nimmt an, dass die Eingabedatei das Format UTF-16LE hat. - - Wenn die Eingabedatei eine Markierung der Bytereihenfolge enthält - (BOM), dann hat die BOM Vorrang vor dieser Option. - - Durch eine falsche Annahme (die Eingabedatei war nicht in UTF-16LE - kodiert) mit erfolgreicher Umwandlung erhalten Sie eine - UTF-8-Ausgabedatei mit fehlerhaftem Text. Sie können die - fehlgeschlagene Umwandlung mit iconv(1) rückgängig machen, indem Sie - die Rückumwandlung von UTF-8 nach UTF-16LE vornehmen. Dadurch - gewinnen Sie die Originaldatei zurück. - - Die Annahme von UTF-16LE wirkt wie ein *Umwandlungsmodus*. Beim - Wechsel zum vorgegebenen *ascii*-Modus wird die UTF16LE-Annahme - deaktiviert. - - -ub, --assume-utf16be - nimmt an, dass die Eingabedatei das Format UTF-16BE hat. - - Diese Option ist gleichbedeutend mit "-ul". - - -v, --verbose - zeigt ausführliche Meldungen an. Zusätzliche Informationen werden zu - den Markierungen der Bytereihenfolge (BOM) und zur Anzahl der - umgewandelten Zeilenumbrüche angezeigt. - - -F, --follow-symlink - folgt symbolischen Links und wandelt die Zieldateien um. - - -R, --replace-symlink - ersetzt symbolische Links durch die umgewandelten Dateien (die - originalen Zieldateien bleiben unverändert). - - -S, --skip-symlink - erhält symbolische Links als solche und lässt die Ziele unverändert - (Vorgabe). - - -V, --version - zeigt Versionsinformationen an und beendet das Programm. - -MAC-MODUS - Im Normalmodus werden Zeilenumbrüche von DOS nach Unix und umgekehrt - umgewandelt. Mac-Zeilenumbrüche werden nicht verändert. - - Im Mac-Modus werden Zeilenumbrüche von Mac nach Unix und umgekehrt - umgewandelt. DOS-Zeilenumbrüche werden nicht verändert. - - Um das Programm im Mac-Modus auszuführen, verwenden Sie die - Befehlszeilenoption "-c mac" oder die Befehle "mac2unix" oder - "unix2mac". - -UMWANDLUNGSMODI - ascii - Im "ascii"-Modus werden nur Zeilenumbrüche umgewandelt. Dies ist der - vorgegebene Umwandlungsmodus. - - Obwohl der Name dieses Modus auf ASCII hinweist, welches ein - 7-bit-Standard ist, bezieht sich der eigentliche Modus auf 8 Bit. - Verwenden Sie diesen Modus immer dann, wenn Sie Unicode-Dateien in - UTF-8-Kodierung umwandeln. - - 7bit - In diesem Modus werden alle Nicht-ASCII-Zeichen aus 8 Bit in das - 7-Bit-Bitmuster umgewandelt. - - iso Die Zeichen werden aus dem DOS-Zeichensatz (der Codepage) in den - ISO-Zeichensatz ISO-8859-1 (Latin-1) in Unix umgewandelt. - DOS-Zeichen ohne Äquivalent in ISO-8859-1, für die die Umwandlung - nicht möglich ist, werden durch einen Punkt ersetzt. Gleiches gilt - für ISO-8859-1-Zeichen ohne DOS-Gegenstück. - - Wenn nur die Option "-iso" angegeben ist, versucht dos2unix die - aktive Codepage selbst zu ermitteln. Sollte dies nicht möglich sein, - wird die Standard-Codepage CP437 verwendet, welche hauptsächlich in - den USA eingesetzt wird. Um eine bestimmte Codepage zu erzwingen, - verwenden Sie die Optionen -437 (US), -850 (Westeuropäisch), -860 - (Portugiesisch), -863 (Kanadisches Französisch) oder -865 - (Skandinavisch). Die Windows-Codepage CP1252 (Westeuropäisch) wird - durch die Option -1252 unterstützt. - - Wenden Sie niemals die ISO-Umwandlung auf Unicode-Textdateien an. In - UTF-8 kodierte Dateien werden dadurch beschädigt. - - Einige Beispiele: - - Umwandlung aus der vorgegebenen DOS-Codepage nach Unix Latin-1: - - dos2unix -iso -n in.txt ausgabe.txt - - Umwandlung von DOS CP850 nach Unix Latin-1: - - dos2unix -850 -n eingabe.txt ausgabe.txt - - Umwandlung von Windows CP1252 nach Unix Latin-1: - - dos2unix -1252 -n eingabe.txt ausgabe.txt - - Umwandlung von Windows CP1252 nach Unix UTF-8 (Unicode): - - iconv -f CP1252 -t UTF-8 eingabe.txt | dos2unix > ausgabe.txt - - Umwandlung von Unix Latin-1 in die vorgegebene DOS-Codepage: - - unix2dos -iso -n eingabe.txt ausgabe.txt - - Umwandlung von Unix Latin-1 nach DOS CP850: - - unix2dos -850 -n eingabe.txt ausgabe.txt - - Umwandlung von Unix Latin-1 nach Windows CP1252: - - unix2dos -1252 -n eingabe.txt ausgabe.txt - - Umwandlung von Unix UTF-8 (Unicode) nach Windows CP1252: - - unix2dos < eingabe.txt | iconv -f UTF-8 -t CP1252 > ausgabe.txt - - Siehe auch und - . - -UNICODE - Zeichenkodierungen - Es gibt verschiedene Unicode-Zeichenkodierungen. Unter Unix und Linux - sind Unicode-Dateien typischerweise in UTF-8 kodiert. Unter Windows - können Textdateien in UTF-8, UTF-16 oder UTF-16 in - Big-Endian-Bytereihenfolge kodiert sein, liegen aber meist im Format - UTF-16 vor. - - Umwandlung - Unicode-Textdateien können DOS-, Unix- oder Mac-Zeilenumbrüche - enthalten, so wie reguläre Textdateien. - - Alle Versionen von dos2unix und unix2dos können UTF-8-kodierte Dateien - umwandeln, weil UTF-8 im Hinblick auf Abwärtskompatiblität mit ASCII - entwickelt wurde. - - Dos2unix und unix2dos mit Unterstützung für UTF-16 können in UTF-16 - kodierte Dateien in Little-Endian- und Big-Endian-Bytereihenfolge lesen. - Um festzustellen, ob dos2unix mit UTF-16-Unterstützung kompiliert wurde, - geben Sie "dos2unix -V" ein. - - Unter Unix/Linux werden UTF-16 kodierte Dateien standardmäßig in die - Zeichenkodierung entsprechend der Locale umgewandelt. Mit dem Befehl - locale(1) können Sie herausfinden, wie die Zeichenkodierung der Locale - eingestellt ist. Wenn eine Umwandlung nicht möglich ist, verursacht dies - einen Umwandlungsfehler, wodurch die Datei übersprungen wird. - - Unter Windows werden UTF-16-Dateien standardmäßig in UTF-8 umgewandelt. - In UTF-8 formatierte Textdateien werden von Windows und Unix/Linux - gleichermaßen unterstützt. - - Die Kodierungen UTF-16 und UTF-8 sind vollständig kompatibel, daher wird - bei der Umwandlung keinerlei Text verlorengehen. Sollte bei der - Umwandlung von UTF-16 in UTF-8 ein Problem auftreten, beispielsweise - wenn die UTF-16-kodierte Eingabedatei einen Fehler enthält, dann wird - diese Datei übersprungen. - - Wenn die Option "-u" verwendet wird, wird die Ausgabedatei in der - gleichen UTF-16-Kodierung wie die Eingabedatei geschrieben. Die Option - "-u" verhindert die Umwandlung in UTF-8. - - Dos2unix und unix2dos bieten keine Option zur Umwandlung von - UTF-8-Dateien in UTF-16. - - Umwandlungen im ISO- und 7bit-Modus funktionieren mit UTF-16-Dateien - nicht. - - Markierung der Bytereihenfolge - Unicode-Textdateien unter Windows haben typischerweise eine Markierung - der Bytereihenfolge (BOM), da viele Windows-Programme (zum Beispiel - Notepad) solche BOMs standardmäßig hinzufügen. Weitere Informationen - hierzu finden Sie auf . - - Unter Unix haben Textdateien üblicherweise keine BOM. Es wird - stattdessen angenommen, dass Textdateien in der Zeichenkodierung - entsprechend der Spracheinstellung vorliegen. - - Dos2unix kann nur dann erkennen, ob eine Datei UTF-16-kodiert ist, wenn - die Datei eine BOM enthält. Ist dies nicht der Fall, nimmt dos2unix an, - dass es sich um eine Binärdatei handelt. - - Verwenden Sie die Optionen "-ul" oder "-ub", um eine UTF-16-Datei ohne - BOM umzuwandeln. - - Dos2unix schreibt in der Voreinstellung keine BOM in die Ausgabedatei. - Mit der Option "-b" schreibt Dos2unix eine BOM, wenn die Eingabedatei - ebenfalls eine BOM hat. - - Unix2dos schreibt in der Voreinstellung eine BOM in die Ausgabedatei, - wenn die Eingabedatei ebenfalls eine solche Markierung hat. Verwenden - Sie die Option "-r", um die BOM zu entfernen. - - Dos2unix und unix2dos schreiben immer eine BOM, wenn die Option "-m" - angegeben ist. - - Unicode-Beispiele - Umwandlung von Windows UTF-16 (mit BOM) nach Unix UTF-8: - - dos2unix -n eingabe.txt ausgabe.txt - - Umwandlung von Windows UTF-16LE (ohne BOM) nach Unix UTF-8: - - dos2unix -ul -n eingabe.txt ausgabe.txt - - Umwandlung von Unix UTF-8 nach Windows UTF-8 mit BOM: - - unix2dos -m -n eingabe.txt ausgabe.txt - - Umwandlung von Unix UTF-8 nach Windows UTF-16: - - unix2dos < eingabe.txt | iconv -f UTF-8 -t UTF-16 > ausgabe.txt - -GB18030 - GB18030 ist ein Standard der chinesischen Regierung. Eine Teilmenge des - in GB18030 definierten Standards ist offiziell für alle in China - verkauften Softwareprodukte vorgeschrieben. Siehe auch - . - - GB18030 ist vollständig zu Unicode kompatibel und kann als - Unicode-Umwandlungsformat betrahctet werden. Wie auch UTF-8 ist GB18030 - kompatibel zu ASCII. Ebenfalls kompatibel ist es zur Codepage 936 von - Windows, auch als GBK bekannt. - - Unter Unix/Linux werden UTF-16-Dateien in GB18030 umgewandelt, wenn die - Einstellung der Locale auf GB18030 gesetzt ist. Beachten Sie, dass dies - nur funktioniert, wenn der Ort auf »China« gesetzt ist. Zum Beispiel - wird in einer Locale-Einstellung "en_GB.GB18030" (Britisches Englisch) - die Umwandlung von UTF-16 in GB18030 nicht möglich sein, aber in der - chinesischen Einstellung "zh_CN.GB18030" dagegen funktionieren. - - Unter Windows benötigen Sie die Option "-gb", um UTF-16-Dateien in - GB18030 umwandeln zu können. - - In GB 18030 kodierte Dateien haben wie Unicode-Dateien eine Markierung - der Bytereihenfolge (BOM). - -BEISPIELE - Aus der Standardeingabe lesen und in die Standardausgabe schreiben: - - dos2unix - dos2unix -l -c mac - - a.txt umwandeln und ersetzen, b.txt umwandeln und ersetzen: - - dos2unix a.txt b.txt - dos2unix -o a.txt b.txt - - a.txt im ascii-Modus umwandeln und ersetzen: - - dos2unix a.txt - - a.txt im ascii-Modus umwandeln und ersetzen, b.txt im 7bit-Modus - umwandeln und ersetzen: - - dos2unix a.txt -c 7bit b.txt - dos2unix -c ascii a.txt -c 7bit b.txt - dos2unix -ascii a.txt -7 b.txt - - a.txt aus dem Mac- in das Unix-Format umwandeln: - - dos2unix -c mac a.txt - mac2unix a.txt - - a.txt aus dem Unix- in das Mac-Format umwandeln: - - unix2dos -c mac a.txt - unix2mac a.txt - - a.txt unter Beibehaltung des ursprünglichen Zeitstempels umwandeln: - - dos2unix -k a.txt - dos2unix -k -o a.txt - - a.txt umwandeln und das Ergebnis nach e.txt schreiben: - - dos2unix -n a.txt e.txt - - a.txt umwandeln und das Ergebnis nach e.txt schreiben, wobei e.txt den - gleichen Zeitstempel erhält wie a.txt: - - dos2unix -k -n a.txt e.txt - - a.txt umwandeln und ersetzen, b.txt umwandeln und das Ergebnis nach - e.txt schreiben: - - dos2unix a.txt -n b.txt e.txt - dos2unix -o a.txt -n b.txt e.txt - - c.txt umwandeln und das Ergebnis nach e.txt schreiben, a.txt umwandeln - und ersetzen, b.txt umwandeln und ersetzen, d.txt umwandeln und das - Ergebnis nach f.txt schreiben: - - dos2unix -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt - -REKURSIVE UMWANDLUNG - Verwenden Sie dos2unix zusammen mit den Befehlen find(1) und xargs(1), - um Textdateien in einem Verzeichnisbaum rekursiv umzuwandeln. Um - beispielsweise alle *.txt-Dateien im aktuellen Verzeichnis und dessen - Unterverzeichnissen umzuwandeln, geben Sie Folgendes ein: - - find . -name *.txt |xargs dos2unix - -LOKALISIERUNG - LANG - Die primäre Sprache wird durch die Umgebungsvariable LANG - festgelegt. Diese Variable besteht aus mehreren Teilen: Der erste - Teil besteht aus zwei Kleinbuchstaben, die den Sprachcode angeben. - Der zweite Teil ist optional und bezeichnet den Ländercode in - Großbuchstaben, vom davor stehenden Sprachcode durch einen - Unterstrich getrennt. Der dritte Teil ist ebenfalls optional und - gibt die Zeichenkodierung an, vom Ländercode durch einen Punkt - getrennt. Einige Beispiele für Standard-POSIX-Shells: - - export LANG=de Deutsch - export LANG=de_DE Deutsch, Deutschland - export LANG=de_AT Deutsch, Österreich - export LANG=es_ES Spanisch, Spanien - export LANG=es_MX Spanisch, Mexiko - export LANG=en_US.iso88591 Englisch, USA, Latin-1-Zeichenkodierung - export LANG=en_GB.UTF-8 Englisch, GB, UTF-8-Zeichenkodierung - - Eine vollständige Liste der Sprachen und Ländercodes finden Sie im - Gettext-Handbuch: - - - Auf Unix-Systemen erhalten Sie mit dem Befehl locale(1) spezifische - Informationen zu den Spracheinstellungen. - - LANGUAGE - Mit der Umgebungsvariable LANGUAGE können Sie eine Prioritätenliste - für Sprachen übergeben, die Sie durch Doppelpunkte voneinander - trennen. Dos2unix gibt LANGUAGE vor LANG den Vorzug, zum Beispiel - bei Deutsch vor Niederländisch: "LANGUAGE=de:nl". Sie müssen - zunächst die Lokalisierung aktivieren, indem Sie die Variable LANG - (oder LC_ALL) auf einen anderen Wert als »C« setzen, bevor Sie die - Liste der Sprachprioritäten mit der Variable LANGUAGE nutzen können. - Weitere Informationen finden Sie im Gettext-Handbuch: - - - Falls Sie eine Sprache auswählen, die nicht verfügbar ist, erhalten - Sie die Standardmeldungen in englischer Sprache. - - DOS2UNIX_LOCALEDIR - Durch die Umgebungsvariable DOS2UNIX_LOCALEDIR wird LOCALEDIR - während der Kompilierung übergangen. LOCALEDIR wird verwendet, um - Sprachdateien zu finden. Der GNU-Standardwert ist - "/usr/local/share/locale". Die Option --version zeigt das verwendete - LOCALEDIR an. - - Beispiel (POSIX-Shell): - - export DOS2UNIX_LOCALEDIR=$HOME/share/locale - -RÜCKGABEWERT - Bei Erfolg wird 0 zurückgegeben. Bei aufgetretenen Systemfehlern wird - der letzte Systemfehler zurückgegeben. Für alle anderen Fehler wird 1 - zurückgegeben. - - Der Rückgabewert ist im stillen Modus stets 0, außer wenn fehlerhafte - Befehlszeilenoptionen verwendet werden. - -STANDARDS - - - - - - - - -AUTOREN - Benjamin Lin - , Bernd Johannes Wuebben - (Mac2unix-Modus) - , Christian Wurll (Extra - Zeilenumbruch) - , Erwin Waterlander - - (Betreuer) - - Projektseite: - - SourceForge-Seite: - -SIEHE AUCH - file(1) find(1) iconv(1) locale(1) xargs(1) - diff --git a/Tools/dos2unix/share/doc/dos2unix-7.2/dos2unix.htm b/Tools/dos2unix/share/doc/dos2unix-7.2/dos2unix.htm deleted file mode 100644 index 43c0474..0000000 --- a/Tools/dos2unix/share/doc/dos2unix-7.2/dos2unix.htm +++ /dev/null @@ -1,654 +0,0 @@ - - - - -dos2unix 7.2 - DOS/MAC to UNIX and vice versa text file format converter - - - - - - - - - - -

NAME

- -

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

- -

SYNOPSIS

- -
    dos2unix [options] [FILE ...] [-n INFILE OUTFILE ...]
-    unix2dos [options] [FILE ...] [-n INFILE OUTFILE ...]
- -

DESCRIPTION

- -

The Dos2unix package includes utilities dos2unix and unix2dos to convert plain text files in DOS or Mac format to Unix format and vice versa.

- -

In DOS/Windows text files a line break, also known as newline, is a combination of two characters: a Carriage Return (CR) followed by a Line Feed (LF). In Unix text files a line break is a single character: the Line Feed (LF). In Mac text files, prior to Mac OS X, a line break was single Carriage Return (CR) character. Nowadays Mac OS uses Unix style (LF) line breaks.

- -

Besides line breaks Dos2unix can also convert the encoding of files. A few DOS code pages can be converted to Unix Latin-1. And Windows Unicode (UTF-16) files can be converted to Unix Unicode (UTF-8) files.

- -

Binary files are automatically skipped, unless conversion is forced.

- -

Non-regular files, such as directories and FIFOs, are automatically skipped.

- -

Symbolic links and their targets are by default kept untouched. Symbolic links can optionally be replaced, or the output can be written to the symbolic link target. Writing to a symbolic link target is not supported on Windows.

- -

Dos2unix was modelled after dos2unix under SunOS/Solaris. There is one important difference with the original SunOS/Solaris version. This version does by default in-place conversion (old file mode), while the original SunOS/Solaris version only supports paired conversion (new file mode). See also options -o and -n.

- -

OPTIONS

- -
- -
--
-
- -

Treat all following options as file names. Use this option if you want to convert files whose names start with a dash. For instance to convert a file named "-foo", you can use this command:

- -
    dos2unix -- -foo
- -

Or in new file mode:

- -
    dos2unix -n -- -foo out.txt
- -
-
-ascii
-
- -

Convert only line breaks. This is the default conversion mode.

- -
-
-iso
-
- -

Conversion between DOS and ISO-8859-1 character set. See also section CONVERSION MODES.

- -
-
-1252
-
- -

Use Windows code page 1252 (Western European).

- -
-
-437
-
- -

Use DOS code page 437 (US). This is the default code page used for ISO conversion.

- -
-
-850
-
- -

Use DOS code page 850 (Western European).

- -
-
-860
-
- -

Use DOS code page 860 (Portuguese).

- -
-
-863
-
- -

Use DOS code page 863 (French Canadian).

- -
-
-865
-
- -

Use DOS code page 865 (Nordic).

- -
-
-7
-
- -

Convert 8 bit characters to 7 bit space.

- -
-
-b, --keep-bom
-
- -

Keep Byte Order Mark (BOM). When the input file has a BOM, write a BOM in the output file. This is the default behavior when converting to DOS line breaks. See also option -r.

- -
-
-c, --convmode CONVMODE
-
- -

Set conversion mode. Where CONVMODE is one of: ascii, 7bit, iso, mac with ascii being the default.

- -
-
-f, --force
-
- -

Force conversion of binary files.

- -
-
-gb, --gb18030
-
- -

On Windows UTF-16 files are by default converted to UTF-8, regardless of the locale setting. Use this option to convert UTF-16 files to GB18030. This option is only available on Windows. See also section GB18030.

- -
-
-h, --help
-
- -

Display help and exit.

- -
-
-i[FLAGS], --info[=FLAGS] FILE ...
-
- -

Display file information. No conversion is done.

- -

The following information is printed, in this order: number of DOS line breaks, number of Unix line breaks, number of Mac line breaks, byte order mark, text or binary, file name.

- -

Example output:

- -
     6       0       0  no_bom    text    dos.txt
-     0       6       0  no_bom    text    unix.txt
-     0       0       6  no_bom    text    mac.txt
-     6       6       6  no_bom    text    mixed.txt
-    50       0       0  UTF-16LE  text    utf16le.txt
-     0      50       0  no_bom    text    utf8unix.txt
-    50       0       0  UTF-8     text    utf8dos.txt
-     2     418     219  no_bom    binary  dos2unix.exe
- -

Optionally extra flags can be set to change the output. One or more flags can be added.

- -
- -
d
-
- -

Print number of DOS line breaks.

- -
-
u
-
- -

Print number of Unix line breaks.

- -
-
m
-
- -

Print number of Mac line breaks.

- -
-
b
-
- -

Print the byte order mark.

- -
-
t
-
- -

Print if file is text or binary.

- -
-
c
-
- -

Print only the files that would be converted.

- -

With the c flag dos2unix will print only the files that contain DOS line breaks, unix2dos will print only file names that have Unix line breaks.

- -
-
- -

Examples:

- -

Show information for all *.txt files:

- -
    dos2unix -i *.txt
- -

Show only the number of DOS line breaks and Unix line breaks:

- -
    dos2unix -idu *.txt
- -

Show only the byte order mark:

- -
    dos2unix --info=b *.txt
- -

List the files that have DOS line breaks:

- -
    dos2unix -ic *.txt
- -

List the files that have Unix line breaks:

- -
    unix2dos -ic *.txt
- -
-
-k, --keepdate
-
- -

Keep the date stamp of output file same as input file.

- -
-
-L, --license
-
- -

Display program's license.

- -
-
-l, --newline
-
- -

Add additional newline.

- -

dos2unix: Only DOS line breaks are changed to two Unix line breaks. In Mac mode only Mac line breaks are changed to two Unix line breaks.

- -

unix2dos: Only Unix line breaks are changed to two DOS line breaks. In Mac mode Unix line breaks are changed to two Mac line breaks.

- -
-
-m, --add-bom
-
- -

Write a Byte Order Mark (BOM) in the output file. By default an UTF-8 BOM is written.

- -

When the input file is UTF-16, and the option -u is used, an UTF-16 BOM will be written.

- -

Never use this option when the output encoding is other than UTF-8 or UTF-16. See also section UNICODE.

- -
-
-n, --newfile INFILE OUTFILE ...
-
- -

New file mode. Convert file INFILE and write output to file OUTFILE. File names must be given in pairs and wildcard names should not be used or you will lose your files.

- -

The person who starts the conversion in new file (paired) mode will be the owner of the converted file. The read/write permissions of the new file will be the permissions of the original file minus the umask(1) of the person who runs the conversion.

- -
-
-o, --oldfile FILE ...
-
- -

Old file mode. Convert file FILE and overwrite output to it. The program defaults to run in this mode. Wildcard names may be used.

- -

In old file (in-place) mode the converted file gets the same owner, group, and read/write permissions as the original file. Also when the file is converted by another user who has write permissions on the file (e.g. user root). The conversion will be aborted when it is not possible to preserve the original values. Change of owner could mean that the original owner is not able to read the file any more. Change of group could be a security risk, the file could be made readable for persons for whom it is not intended. Preservation of owner, group, and read/write permissions is only supported on Unix.

- -
-
-q, --quiet
-
- -

Quiet mode. Suppress all warnings and messages. The return value is zero. Except when wrong command-line options are used.

- -
-
-r, --remove-bom
-
- -

Remove Byte Order Mark (BOM). Do not write a BOM in the output file. This is the default behavior when converting to Unix line breaks. See also option -b.

- -
-
-s, --safe
-
- -

Skip binary files (default).

- -
-
-u, --keep-utf16
-
- -

Keep the original UTF-16 encoding of the input file. The output file will be written in the same UTF-16 encoding, little or big endian, as the input file. This prevents transformation to UTF-8. An UTF-16 BOM will be written accordingly. This option can be disabled with the -ascii option.

- -
-
-ul, --assume-utf16le
-
- -

Assume that the input file format is UTF-16LE.

- -

When there is a Byte Order Mark in the input file the BOM has priority over this option.

- -

When you made a wrong assumption (the input file was not in UTF-16LE format) and the conversion succeeded, you will get an UTF-8 output file with wrong text. You can undo the wrong conversion with iconv(1) by converting the UTF-8 output file back to UTF-16LE. This will bring back the original file.

- -

The assumption of UTF-16LE works as a conversion mode. By switching to the default ascii mode the UTF-16LE assumption is turned off.

- -
-
-ub, --assume-utf16be
-
- -

Assume that the input file format is UTF-16BE.

- -

This option works the same as option -ul.

- -
-
-v, --verbose
-
- -

Display verbose messages. Extra information is displayed about Byte Order Marks and the amount of converted line breaks.

- -
- -
- -

Follow symbolic links and convert the targets.

- -
- -
- -

Replace symbolic links with converted files (original target files remain unchanged).

- -
- -
- -

Keep symbolic links and targets unchanged (default).

- -
-
-V, --version
-
- -

Display version information and exit.

- -
-
- -

MAC MODE

- -

In normal mode line breaks are converted from DOS to Unix and vice versa. Mac line breaks are not converted.

- -

In Mac mode line breaks are converted from Mac to Unix and vice versa. DOS line breaks are not changed.

- -

To run in Mac mode use the command-line option -c mac or use the commands mac2unix or unix2mac.

- -

CONVERSION MODES

- -
- -
ascii
-
- -

In mode ascii only line breaks are converted. This is the default conversion mode.

- -

Although the name of this mode is ASCII, which is a 7 bit standard, the actual mode is 8 bit. Use always this mode when converting Unicode UTF-8 files.

- -
-
7bit
-
- -

In this mode all 8 bit non-ASCII characters (with values from 128 to 255) are converted to a 7 bit space.

- -
-
iso
-
- -

Characters are converted between a DOS character set (code page) and ISO character set ISO-8859-1 (Latin-1) on Unix. DOS characters without ISO-8859-1 equivalent, for which conversion is not possible, are converted to a dot. The same counts for ISO-8859-1 characters without DOS counterpart.

- -

When only option -iso is used dos2unix will try to determine the active code page. When this is not possible dos2unix will use default code page CP437, which is mainly used in the USA. To force a specific code page use options -437 (US), -850 (Western European), -860 (Portuguese), -863 (French Canadian), or -865 (Nordic). Windows code page CP1252 (Western European) is also supported with option -1252. For other code pages use dos2unix in combination with iconv(1). Iconv can convert between a long list of character encodings.

- -

Never use ISO conversion on Unicode text files. It will corrupt UTF-8 encoded files.

- -

Some examples:

- -

Convert from DOS default code page to Unix Latin-1:

- -
    dos2unix -iso -n in.txt out.txt
- -

Convert from DOS CP850 to Unix Latin-1:

- -
    dos2unix -850 -n in.txt out.txt
- -

Convert from Windows CP1252 to Unix Latin-1:

- -
    dos2unix -1252 -n in.txt out.txt
- -

Convert from Windows CP1252 to Unix UTF-8 (Unicode):

- -
    iconv -f CP1252 -t UTF-8 in.txt | dos2unix > out.txt
- -

Convert from Unix Latin-1 to DOS default code page:

- -
    unix2dos -iso -n in.txt out.txt
- -

Convert from Unix Latin-1 to DOS CP850:

- -
    unix2dos -850 -n in.txt out.txt
- -

Convert from Unix Latin-1 to Windows CP1252:

- -
    unix2dos -1252 -n in.txt out.txt
- -

Convert from Unix UTF-8 (Unicode) to Windows CP1252:

- -
    unix2dos < in.txt | iconv -f UTF-8 -t CP1252 > out.txt
- -

See also http://czyborra.com/charsets/codepages.html and http://czyborra.com/charsets/iso8859.html.

- -
-
- -

UNICODE

- -

Encodings

- -

There exist different Unicode encodings. On Unix and Linux Unicode files are typically encoded in UTF-8 encoding. On Windows Unicode text files can be encoded in UTF-8, UTF-16, or UTF-16 big endian, but are mostly encoded in UTF-16 format.

- -

Conversion

- -

Unicode text files can have DOS, Unix or Mac line breaks, like regular text files.

- -

All versions of dos2unix and unix2dos can convert UTF-8 encoded files, because UTF-8 was designed for backward compatibility with ASCII.

- -

Dos2unix and unix2dos with Unicode UTF-16 support, can read little and big endian UTF-16 encoded text files. To see if dos2unix was built with UTF-16 support type dos2unix -V.

- -

On Unix/Linux UTF-16 encoded files are converted to the locale character encoding. Use the locale(1) command to find out what the locale character encoding is. When conversion is not possible a conversion error will occur and the file will be skipped.

- -

On Windows UTF-16 files are by default converted to UTF-8. UTF-8 formatted text files are well supported on both Windows and Unix/Linux.

- -

UTF-16 and UTF-8 encoding are fully compatible, there will no text be lost in the conversion. When an UTF-16 to UTF-8 conversion error occurs, for instance when the UTF-16 input file contains an error, the file will be skipped.

- -

When option -u is used, the output file will be written in the same UTF-16 encoding as the input file. Option -u prevents conversion to UTF-8.

- -

Dos2unix and unix2dos have no option to convert UTF-8 files to UTF-16.

- -

ISO and 7-bit mode conversion do not work on UTF-16 files.

- -

Byte Order Mark

- -

On Windows Unicode text files typically have a Byte Order Mark (BOM), because many Windows programs (including Notepad) add BOMs by default. See also http://en.wikipedia.org/wiki/Byte_order_mark.

- -

On Unix Unicode files typically don't have a BOM. It is assumed that text files are encoded in the locale character encoding.

- -

Dos2unix can only detect if a file is in UTF-16 format if the file has a BOM. When an UTF-16 file doesn't have a BOM, dos2unix will see the file as a binary file.

- -

Use option -ul or -ub to convert an UTF-16 file without BOM.

- -

Dos2unix writes by default no BOM in the output file. With option -b Dos2unix writes a BOM when the input file has a BOM.

- -

Unix2dos writes by default a BOM in the output file when the input file has a BOM. Use option -r to remove the BOM.

- -

Dos2unix and unix2dos write always a BOM when option -m is used.

- -

Unicode examples

- -

Convert from Windows UTF-16 (with BOM) to Unix UTF-8:

- -
    dos2unix -n in.txt out.txt
- -

Convert from Windows UTF-16LE (without BOM) to Unix UTF-8:

- -
    dos2unix -ul -n in.txt out.txt
- -

Convert from Unix UTF-8 to Windows UTF-8 with BOM:

- -
    unix2dos -m -n in.txt out.txt
- -

Convert from Unix UTF-8 to Windows UTF-16:

- -
    unix2dos < in.txt | iconv -f UTF-8 -t UTF-16 > out.txt
- -

GB18030

- -

GB18030 is a Chinese government standard. A mandatory subset of the GB18030 standard is officially required for all software products sold in China. See also http://en.wikipedia.org/wiki/GB_18030.

- -

GB18030 is fully compatible with Unicode, and can be considered an unicode transformation format. Like UTF-8, GB18030 is compatible with ASCII. GB18030 is also compatible with Windows code page 936, also known as GBK.

- -

On Unix/Linux UTF-16 files are converted to GB18030 when the locale encoding is set to GB18030. Note that this will only work if the location is set to China. E.g. in an English British locale setting en_GB.GB18030 conversion of UTF-16 to GB18030 will not work, but in a Chinese zh_CN.GB18030 locale setting it will work.

- -

On Windows you need to use option -gb to convert UTF-16 files to GB18030.

- -

GB18030 encoded files can have a Byte Order Mark, like Unicode files.

- -

EXAMPLES

- -

Read input from 'stdin' and write output to 'stdout':

- -
    dos2unix
-    dos2unix -l -c mac
- -

Convert and replace a.txt. Convert and replace b.txt:

- -
    dos2unix a.txt b.txt
-    dos2unix -o a.txt b.txt
- -

Convert and replace a.txt in ascii conversion mode:

- -
    dos2unix a.txt
- -

Convert and replace a.txt in ascii conversion mode, convert and replace b.txt in 7bit conversion mode:

- -
    dos2unix a.txt -c 7bit b.txt
-    dos2unix -c ascii a.txt -c 7bit b.txt
-    dos2unix -ascii a.txt -7 b.txt
- -

Convert a.txt from Mac to Unix format:

- -
    dos2unix -c mac a.txt
-    mac2unix a.txt
- -

Convert a.txt from Unix to Mac format:

- -
    unix2dos -c mac a.txt
-    unix2mac a.txt
- -

Convert and replace a.txt while keeping original date stamp:

- -
    dos2unix -k a.txt
-    dos2unix -k -o a.txt
- -

Convert a.txt and write to e.txt:

- -
    dos2unix -n a.txt e.txt
- -

Convert a.txt and write to e.txt, keep date stamp of e.txt same as a.txt:

- -
    dos2unix -k -n a.txt e.txt
- -

Convert and replace a.txt, convert b.txt and write to e.txt:

- -
    dos2unix a.txt -n b.txt e.txt
-    dos2unix -o a.txt -n b.txt e.txt
- -

Convert c.txt and write to e.txt, convert and replace a.txt, convert and replace b.txt, convert d.txt and write to f.txt:

- -
    dos2unix -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt
- -

RECURSIVE CONVERSION

- -

Use dos2unix in combination with the find(1) and xargs(1) commands to recursively convert text files in a directory tree structure. For instance to convert all .txt files in the directory tree under the current directory type:

- -
    find . -name *.txt |xargs dos2unix
- -

LOCALIZATION

- -
- -
LANG
-
- -

The primary language is selected with the environment variable LANG. The LANG variable consists out of several parts. The first part is in small letters the language code. The second is optional and is the country code in capital letters, preceded with an underscore. There is also an optional third part: character encoding, preceded with a dot. A few examples for POSIX standard type shells:

- -
    export LANG=nl               Dutch
-    export LANG=nl_NL            Dutch, The Netherlands
-    export LANG=nl_BE            Dutch, Belgium
-    export LANG=es_ES            Spanish, Spain
-    export LANG=es_MX            Spanish, Mexico
-    export LANG=en_US.iso88591   English, USA, Latin-1 encoding
-    export LANG=en_GB.UTF-8      English, UK, UTF-8 encoding
- -

For a complete list of language and country codes see the gettext manual: http://www.gnu.org/software/gettext/manual/html_node/Usual-Language-Codes.html

- -

On Unix systems you can use the command locale(1) to get locale specific information.

- -
-
LANGUAGE
-
- -

With the LANGUAGE environment variable you can specify a priority list of languages, separated by colons. Dos2unix gives preference to LANGUAGE over LANG. For instance, first Dutch and then German: LANGUAGE=nl:de. You have to first enable localization, by setting LANG (or LC_ALL) to a value other than "C", before you can use a language priority list through the LANGUAGE variable. See also the gettext manual: http://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html

- -

If you select a language which is not available you will get the standard English messages.

- -
-
DOS2UNIX_LOCALEDIR
-
- -

With the environment variable DOS2UNIX_LOCALEDIR the LOCALEDIR set during compilation can be overruled. LOCALEDIR is used to find the language files. The GNU default value is /usr/local/share/locale. Option --version will display the LOCALEDIR that is used.

- -

Example (POSIX shell):

- -
    export DOS2UNIX_LOCALEDIR=$HOME/share/locale
- -
-
- -

RETURN VALUE

- -

On success, zero is returned. When a system error occurs the last system error will be returned. For other errors 1 is returned.

- -

The return value is always zero in quiet mode, except when wrong command-line options are used.

- -

STANDARDS

- -

http://en.wikipedia.org/wiki/Text_file

- -

http://en.wikipedia.org/wiki/Carriage_return

- -

http://en.wikipedia.org/wiki/Newline

- -

http://en.wikipedia.org/wiki/Unicode

- -

AUTHORS

- -

Benjamin Lin - <blin@socs.uts.edu.au>, Bernd Johannes Wuebben (mac2unix mode) - <wuebben@kde.org>, Christian Wurll (add extra newline) - <wurll@ira.uka.de>, Erwin Waterlander - <waterlan@xs4all.nl> (maintainer)

- -

Project page: http://waterlan.home.xs4all.nl/dos2unix.html

- -

SourceForge page: http://sourceforge.net/projects/dos2unix/

- -

SEE ALSO

- -

file(1) find(1) iconv(1) locale(1) xargs(1)

- - - - - - - diff --git a/Tools/dos2unix/share/doc/dos2unix-7.2/dos2unix.txt b/Tools/dos2unix/share/doc/dos2unix-7.2/dos2unix.txt deleted file mode 100644 index c8eacbb..0000000 --- a/Tools/dos2unix/share/doc/dos2unix-7.2/dos2unix.txt +++ /dev/null @@ -1,585 +0,0 @@ -NAME - dos2unix - DOS/Mac to Unix and vice versa text file format converter - -SYNOPSIS - dos2unix [options] [FILE ...] [-n INFILE OUTFILE ...] - unix2dos [options] [FILE ...] [-n INFILE OUTFILE ...] - -DESCRIPTION - The Dos2unix package includes utilities "dos2unix" and "unix2dos" to - convert plain text files in DOS or Mac format to Unix format and vice - versa. - - In DOS/Windows text files a line break, also known as newline, is a - combination of two characters: a Carriage Return (CR) followed by a Line - Feed (LF). In Unix text files a line break is a single character: the - Line Feed (LF). In Mac text files, prior to Mac OS X, a line break was - single Carriage Return (CR) character. Nowadays Mac OS uses Unix style - (LF) line breaks. - - Besides line breaks Dos2unix can also convert the encoding of files. A - few DOS code pages can be converted to Unix Latin-1. And Windows Unicode - (UTF-16) files can be converted to Unix Unicode (UTF-8) files. - - Binary files are automatically skipped, unless conversion is forced. - - Non-regular files, such as directories and FIFOs, are automatically - skipped. - - Symbolic links and their targets are by default kept untouched. Symbolic - links can optionally be replaced, or the output can be written to the - symbolic link target. Writing to a symbolic link target is not supported - on Windows. - - Dos2unix was modelled after dos2unix under SunOS/Solaris. There is one - important difference with the original SunOS/Solaris version. This - version does by default in-place conversion (old file mode), while the - original SunOS/Solaris version only supports paired conversion (new file - mode). See also options "-o" and "-n". - -OPTIONS - -- Treat all following options as file names. Use this option if you - want to convert files whose names start with a dash. For instance to - convert a file named "-foo", you can use this command: - - dos2unix -- -foo - - Or in new file mode: - - dos2unix -n -- -foo out.txt - - -ascii - Convert only line breaks. This is the default conversion mode. - - -iso - Conversion between DOS and ISO-8859-1 character set. See also - section CONVERSION MODES. - - -1252 - Use Windows code page 1252 (Western European). - - -437 - Use DOS code page 437 (US). This is the default code page used for - ISO conversion. - - -850 - Use DOS code page 850 (Western European). - - -860 - Use DOS code page 860 (Portuguese). - - -863 - Use DOS code page 863 (French Canadian). - - -865 - Use DOS code page 865 (Nordic). - - -7 Convert 8 bit characters to 7 bit space. - - -b, --keep-bom - Keep Byte Order Mark (BOM). When the input file has a BOM, write a - BOM in the output file. This is the default behavior when converting - to DOS line breaks. See also option "-r". - - -c, --convmode CONVMODE - Set conversion mode. Where CONVMODE is one of: *ascii*, *7bit*, - *iso*, *mac* with ascii being the default. - - -f, --force - Force conversion of binary files. - - -gb, --gb18030 - On Windows UTF-16 files are by default converted to UTF-8, - regardless of the locale setting. Use this option to convert UTF-16 - files to GB18030. This option is only available on Windows. See also - section GB18030. - - -h, --help - Display help and exit. - - -i[FLAGS], --info[=FLAGS] FILE ... - Display file information. No conversion is done. - - The following information is printed, in this order: number of DOS - line breaks, number of Unix line breaks, number of Mac line breaks, - byte order mark, text or binary, file name. - - Example output: - - 6 0 0 no_bom text dos.txt - 0 6 0 no_bom text unix.txt - 0 0 6 no_bom text mac.txt - 6 6 6 no_bom text mixed.txt - 50 0 0 UTF-16LE text utf16le.txt - 0 50 0 no_bom text utf8unix.txt - 50 0 0 UTF-8 text utf8dos.txt - 2 418 219 no_bom binary dos2unix.exe - - Optionally extra flags can be set to change the output. One or more - flags can be added. - - d Print number of DOS line breaks. - - u Print number of Unix line breaks. - - m Print number of Mac line breaks. - - b Print the byte order mark. - - t Print if file is text or binary. - - c Print only the files that would be converted. - - With the "c" flag dos2unix will print only the files that - contain DOS line breaks, unix2dos will print only file names - that have Unix line breaks. - - Examples: - - Show information for all *.txt files: - - dos2unix -i *.txt - - Show only the number of DOS line breaks and Unix line breaks: - - dos2unix -idu *.txt - - Show only the byte order mark: - - dos2unix --info=b *.txt - - List the files that have DOS line breaks: - - dos2unix -ic *.txt - - List the files that have Unix line breaks: - - unix2dos -ic *.txt - - -k, --keepdate - Keep the date stamp of output file same as input file. - - -L, --license - Display program's license. - - -l, --newline - Add additional newline. - - dos2unix: Only DOS line breaks are changed to two Unix line breaks. - In Mac mode only Mac line breaks are changed to two Unix line - breaks. - - unix2dos: Only Unix line breaks are changed to two DOS line breaks. - In Mac mode Unix line breaks are changed to two Mac line breaks. - - -m, --add-bom - Write a Byte Order Mark (BOM) in the output file. By default an - UTF-8 BOM is written. - - When the input file is UTF-16, and the option "-u" is used, an - UTF-16 BOM will be written. - - Never use this option when the output encoding is other than UTF-8 - or UTF-16. See also section UNICODE. - - -n, --newfile INFILE OUTFILE ... - New file mode. Convert file INFILE and write output to file OUTFILE. - File names must be given in pairs and wildcard names should *not* be - used or you *will* lose your files. - - The person who starts the conversion in new file (paired) mode will - be the owner of the converted file. The read/write permissions of - the new file will be the permissions of the original file minus the - umask(1) of the person who runs the conversion. - - -o, --oldfile FILE ... - Old file mode. Convert file FILE and overwrite output to it. The - program defaults to run in this mode. Wildcard names may be used. - - In old file (in-place) mode the converted file gets the same owner, - group, and read/write permissions as the original file. Also when - the file is converted by another user who has write permissions on - the file (e.g. user root). The conversion will be aborted when it is - not possible to preserve the original values. Change of owner could - mean that the original owner is not able to read the file any more. - Change of group could be a security risk, the file could be made - readable for persons for whom it is not intended. Preservation of - owner, group, and read/write permissions is only supported on Unix. - - -q, --quiet - Quiet mode. Suppress all warnings and messages. The return value is - zero. Except when wrong command-line options are used. - - -r, --remove-bom - Remove Byte Order Mark (BOM). Do not write a BOM in the output file. - This is the default behavior when converting to Unix line breaks. - See also option "-b". - - -s, --safe - Skip binary files (default). - - -u, --keep-utf16 - Keep the original UTF-16 encoding of the input file. The output file - will be written in the same UTF-16 encoding, little or big endian, - as the input file. This prevents transformation to UTF-8. An UTF-16 - BOM will be written accordingly. This option can be disabled with - the "-ascii" option. - - -ul, --assume-utf16le - Assume that the input file format is UTF-16LE. - - When there is a Byte Order Mark in the input file the BOM has - priority over this option. - - When you made a wrong assumption (the input file was not in UTF-16LE - format) and the conversion succeeded, you will get an UTF-8 output - file with wrong text. You can undo the wrong conversion with - iconv(1) by converting the UTF-8 output file back to UTF-16LE. This - will bring back the original file. - - The assumption of UTF-16LE works as a *conversion mode*. By - switching to the default *ascii* mode the UTF-16LE assumption is - turned off. - - -ub, --assume-utf16be - Assume that the input file format is UTF-16BE. - - This option works the same as option "-ul". - - -v, --verbose - Display verbose messages. Extra information is displayed about Byte - Order Marks and the amount of converted line breaks. - - -F, --follow-symlink - Follow symbolic links and convert the targets. - - -R, --replace-symlink - Replace symbolic links with converted files (original target files - remain unchanged). - - -S, --skip-symlink - Keep symbolic links and targets unchanged (default). - - -V, --version - Display version information and exit. - -MAC MODE - In normal mode line breaks are converted from DOS to Unix and vice - versa. Mac line breaks are not converted. - - In Mac mode line breaks are converted from Mac to Unix and vice versa. - DOS line breaks are not changed. - - To run in Mac mode use the command-line option "-c mac" or use the - commands "mac2unix" or "unix2mac". - -CONVERSION MODES - ascii - In mode "ascii" only line breaks are converted. This is the default - conversion mode. - - Although the name of this mode is ASCII, which is a 7 bit standard, - the actual mode is 8 bit. Use always this mode when converting - Unicode UTF-8 files. - - 7bit - In this mode all 8 bit non-ASCII characters (with values from 128 to - 255) are converted to a 7 bit space. - - iso Characters are converted between a DOS character set (code page) and - ISO character set ISO-8859-1 (Latin-1) on Unix. DOS characters - without ISO-8859-1 equivalent, for which conversion is not possible, - are converted to a dot. The same counts for ISO-8859-1 characters - without DOS counterpart. - - When only option "-iso" is used dos2unix will try to determine the - active code page. When this is not possible dos2unix will use - default code page CP437, which is mainly used in the USA. To force a - specific code page use options -437 (US), -850 (Western European), - -860 (Portuguese), -863 (French Canadian), or -865 (Nordic). Windows - code page CP1252 (Western European) is also supported with option - -1252. For other code pages use dos2unix in combination with - iconv(1). Iconv can convert between a long list of character - encodings. - - Never use ISO conversion on Unicode text files. It will corrupt - UTF-8 encoded files. - - Some examples: - - Convert from DOS default code page to Unix Latin-1: - - dos2unix -iso -n in.txt out.txt - - Convert from DOS CP850 to Unix Latin-1: - - dos2unix -850 -n in.txt out.txt - - Convert from Windows CP1252 to Unix Latin-1: - - dos2unix -1252 -n in.txt out.txt - - Convert from Windows CP1252 to Unix UTF-8 (Unicode): - - iconv -f CP1252 -t UTF-8 in.txt | dos2unix > out.txt - - Convert from Unix Latin-1 to DOS default code page: - - unix2dos -iso -n in.txt out.txt - - Convert from Unix Latin-1 to DOS CP850: - - unix2dos -850 -n in.txt out.txt - - Convert from Unix Latin-1 to Windows CP1252: - - unix2dos -1252 -n in.txt out.txt - - Convert from Unix UTF-8 (Unicode) to Windows CP1252: - - unix2dos < in.txt | iconv -f UTF-8 -t CP1252 > out.txt - - See also and - . - -UNICODE - Encodings - There exist different Unicode encodings. On Unix and Linux Unicode files - are typically encoded in UTF-8 encoding. On Windows Unicode text files - can be encoded in UTF-8, UTF-16, or UTF-16 big endian, but are mostly - encoded in UTF-16 format. - - Conversion - Unicode text files can have DOS, Unix or Mac line breaks, like regular - text files. - - All versions of dos2unix and unix2dos can convert UTF-8 encoded files, - because UTF-8 was designed for backward compatibility with ASCII. - - Dos2unix and unix2dos with Unicode UTF-16 support, can read little and - big endian UTF-16 encoded text files. To see if dos2unix was built with - UTF-16 support type "dos2unix -V". - - On Unix/Linux UTF-16 encoded files are converted to the locale character - encoding. Use the locale(1) command to find out what the locale - character encoding is. When conversion is not possible a conversion - error will occur and the file will be skipped. - - On Windows UTF-16 files are by default converted to UTF-8. UTF-8 - formatted text files are well supported on both Windows and Unix/Linux. - - UTF-16 and UTF-8 encoding are fully compatible, there will no text be - lost in the conversion. When an UTF-16 to UTF-8 conversion error occurs, - for instance when the UTF-16 input file contains an error, the file will - be skipped. - - When option "-u" is used, the output file will be written in the same - UTF-16 encoding as the input file. Option "-u" prevents conversion to - UTF-8. - - Dos2unix and unix2dos have no option to convert UTF-8 files to UTF-16. - - ISO and 7-bit mode conversion do not work on UTF-16 files. - - Byte Order Mark - On Windows Unicode text files typically have a Byte Order Mark (BOM), - because many Windows programs (including Notepad) add BOMs by default. - See also . - - On Unix Unicode files typically don't have a BOM. It is assumed that - text files are encoded in the locale character encoding. - - Dos2unix can only detect if a file is in UTF-16 format if the file has a - BOM. When an UTF-16 file doesn't have a BOM, dos2unix will see the file - as a binary file. - - Use option "-ul" or "-ub" to convert an UTF-16 file without BOM. - - Dos2unix writes by default no BOM in the output file. With option "-b" - Dos2unix writes a BOM when the input file has a BOM. - - Unix2dos writes by default a BOM in the output file when the input file - has a BOM. Use option "-r" to remove the BOM. - - Dos2unix and unix2dos write always a BOM when option "-m" is used. - - Unicode examples - Convert from Windows UTF-16 (with BOM) to Unix UTF-8: - - dos2unix -n in.txt out.txt - - Convert from Windows UTF-16LE (without BOM) to Unix UTF-8: - - dos2unix -ul -n in.txt out.txt - - Convert from Unix UTF-8 to Windows UTF-8 with BOM: - - unix2dos -m -n in.txt out.txt - - Convert from Unix UTF-8 to Windows UTF-16: - - unix2dos < in.txt | iconv -f UTF-8 -t UTF-16 > out.txt - -GB18030 - GB18030 is a Chinese government standard. A mandatory subset of the - GB18030 standard is officially required for all software products sold - in China. See also . - - GB18030 is fully compatible with Unicode, and can be considered an - unicode transformation format. Like UTF-8, GB18030 is compatible with - ASCII. GB18030 is also compatible with Windows code page 936, also known - as GBK. - - On Unix/Linux UTF-16 files are converted to GB18030 when the locale - encoding is set to GB18030. Note that this will only work if the - location is set to China. E.g. in an English British locale setting - "en_GB.GB18030" conversion of UTF-16 to GB18030 will not work, but in a - Chinese "zh_CN.GB18030" locale setting it will work. - - On Windows you need to use option "-gb" to convert UTF-16 files to - GB18030. - - GB18030 encoded files can have a Byte Order Mark, like Unicode files. - -EXAMPLES - Read input from 'stdin' and write output to 'stdout': - - dos2unix - dos2unix -l -c mac - - Convert and replace a.txt. Convert and replace b.txt: - - dos2unix a.txt b.txt - dos2unix -o a.txt b.txt - - Convert and replace a.txt in ascii conversion mode: - - dos2unix a.txt - - Convert and replace a.txt in ascii conversion mode, convert and replace - b.txt in 7bit conversion mode: - - dos2unix a.txt -c 7bit b.txt - dos2unix -c ascii a.txt -c 7bit b.txt - dos2unix -ascii a.txt -7 b.txt - - Convert a.txt from Mac to Unix format: - - dos2unix -c mac a.txt - mac2unix a.txt - - Convert a.txt from Unix to Mac format: - - unix2dos -c mac a.txt - unix2mac a.txt - - Convert and replace a.txt while keeping original date stamp: - - dos2unix -k a.txt - dos2unix -k -o a.txt - - Convert a.txt and write to e.txt: - - dos2unix -n a.txt e.txt - - Convert a.txt and write to e.txt, keep date stamp of e.txt same as - a.txt: - - dos2unix -k -n a.txt e.txt - - Convert and replace a.txt, convert b.txt and write to e.txt: - - dos2unix a.txt -n b.txt e.txt - dos2unix -o a.txt -n b.txt e.txt - - Convert c.txt and write to e.txt, convert and replace a.txt, convert and - replace b.txt, convert d.txt and write to f.txt: - - dos2unix -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt - -RECURSIVE CONVERSION - Use dos2unix in combination with the find(1) and xargs(1) commands to - recursively convert text files in a directory tree structure. For - instance to convert all .txt files in the directory tree under the - current directory type: - - find . -name *.txt |xargs dos2unix - -LOCALIZATION - LANG - The primary language is selected with the environment variable LANG. - The LANG variable consists out of several parts. The first part is - in small letters the language code. The second is optional and is - the country code in capital letters, preceded with an underscore. - There is also an optional third part: character encoding, preceded - with a dot. A few examples for POSIX standard type shells: - - export LANG=nl Dutch - export LANG=nl_NL Dutch, The Netherlands - export LANG=nl_BE Dutch, Belgium - export LANG=es_ES Spanish, Spain - export LANG=es_MX Spanish, Mexico - export LANG=en_US.iso88591 English, USA, Latin-1 encoding - export LANG=en_GB.UTF-8 English, UK, UTF-8 encoding - - For a complete list of language and country codes see the gettext - manual: - - - On Unix systems you can use the command locale(1) to get locale - specific information. - - LANGUAGE - With the LANGUAGE environment variable you can specify a priority - list of languages, separated by colons. Dos2unix gives preference to - LANGUAGE over LANG. For instance, first Dutch and then German: - "LANGUAGE=nl:de". You have to first enable localization, by setting - LANG (or LC_ALL) to a value other than "C", before you can use a - language priority list through the LANGUAGE variable. See also the - gettext manual: - - - If you select a language which is not available you will get the - standard English messages. - - DOS2UNIX_LOCALEDIR - With the environment variable DOS2UNIX_LOCALEDIR the LOCALEDIR set - during compilation can be overruled. LOCALEDIR is used to find the - language files. The GNU default value is "/usr/local/share/locale". - Option --version will display the LOCALEDIR that is used. - - Example (POSIX shell): - - export DOS2UNIX_LOCALEDIR=$HOME/share/locale - -RETURN VALUE - On success, zero is returned. When a system error occurs the last system - error will be returned. For other errors 1 is returned. - - The return value is always zero in quiet mode, except when wrong - command-line options are used. - -STANDARDS - - - - - - - - -AUTHORS - Benjamin Lin - , Bernd Johannes Wuebben (mac2unix - mode) - , Christian Wurll (add extra newline) - - , Erwin Waterlander - - (maintainer) - - Project page: - - SourceForge page: - -SEE ALSO - file(1) find(1) iconv(1) locale(1) xargs(1) - diff --git a/Tools/dos2unix/share/doc/dos2unix-7.2/es/dos2unix.htm b/Tools/dos2unix/share/doc/dos2unix-7.2/es/dos2unix.htm deleted file mode 100644 index b954e66..0000000 --- a/Tools/dos2unix/share/doc/dos2unix-7.2/es/dos2unix.htm +++ /dev/null @@ -1,654 +0,0 @@ - - - - -dos2unix 7.2 - Convertidor de archivos de texto de formato DOS/Mac a Unix y viceversa - - - - - - - - - - -

NOMBRE

- -

dos2unix - Convertidor de archivos de texto de formato DOS/Mac a Unix y viceversa

- -

SINOPSIS

- -
    dos2unix [parámetros] [ARCHIVO ...] [-n ARCHIVO_DE_ENTRADA ARCHIVO_DE_SALIDA ...]
-    unix2dos [parámetros] [ARCHIVO ...] [-n ARCHIVO_DE_ENTRADA ARCHIVO_DE_SALIDA ...]
- -

DESCRIPCIÓN

- -

El paquete Dos2unix incluye las herramientas dos2unix y unix2dos para convertir archivos de texto plano en formato DOS o Mac a formato Unix y viceversa.

- -

En archivos de texto DOS/Windows, un salto de línea, también conocido como nueva línea, es una combinación de dos caracteres: un retorno de carro (CR) seguido por un salto de línea (LF). En archivos de texto Unix, un salto de línea es solamente un carácter: el salto de línea (LF). En archivos de texto Mac, antes de Mac OS X, un salto de línea era sólo un carácter retorno de carro (CR). Actualmente, Mac OS usa el estilo Unix de saltos de línea (LF).

- -

Además de saltos de línea, Dos2unix puede también convertir la codificación de archivos. Unas cuantas páginas de códigos DOS pueden ser convertidas a Unix Latin-1. Y archivos Unicode de Windows (UTF-16) pueden ser convertidos a archivos Unicode de Unix (UTF-8).

- -

Los archivos binarios son ignorados automáticamente, a menos que se fuerce su conversión.

- -

Los archivos no regulares, tales como directorios y FIFO, son ignorados automáticamente.

- -

Los enlaces simbólicos y sus destinos no son modificados por defecto. Los enlaces simbólicos pueden opcionalmente ser reemplazados, o la salida puede ser escrita al destino simbólico del enlace. En Windows no está soportada la escritura a enlaces simbólicos.

- -

Dos2unix fue modelado después de dos2unix bajo SunOS/Solaris. Hay una importante diferencia respecto a la versión original SunOS/Solaris. Esta versión hace, por defecto, la conversión en el mismo archivo (modo de archivo antiguo), mientras que la versión original de SunOS/Solaris sólo es compatible con la conversión en archivo emparejado (modo de archivo nuevo). Véanse las opciones -o y -n.

- -

PARÁMETROS

- -
- -
--
-
- -

Todos los parámetros siguientes son tratados como nombres de archivo. Use este parámetro si desea convertir archivos cuyos nombres inician con un guión. Por ejemplo para convertir un archivoo llamado "-foo", use este comando:

- -
    dos2unix -- -foo
- -

O en modo de archivo nuevo:

- -
    dos2unix -n -- -foo out.txt
- -
-
-ascii
-
- -

Sólo convierte los salto de línea. Éste es el modo de conversión por defecto.

- -
-
-iso
-
- -

Conversión entre el conjunto de caracteres DOS e ISO-8859-1. Véase también la sección MODOS DE CONVERSIÓN.

- -
-
-1252
-
- -

Usa la página de códigos Windows 1252 (Europa Occidental).

- -
-
-437
-
- -

Usa la página de códigos DOS 437 (EE. UU.). Está es la página de códigos usada por defecto para conversión ISO.

- -
-
-850
-
- -

Usa la página de códigos DOS 850 (Europa Occidental).

- -
-
-860
-
- -

Usa la página de códigos DOS 860 (Portugués).

- -
-
-863
-
- -

Usa la página de códigos DOS 863 (Francocanadiense).

- -
-
-865
-
- -

Usa la página de códigos DOS 865 (Nórdico).

- -
-
-7
-
- -

Convierte caracteres de 8 bits al espacio de 7 bits.

- -
-
-b, --keep-bom
-
- -

Mantiene la Marca de Orden de Byte (BOM). Cuando el archivo de entrada tiene BOM, escribe BOM en el archivo de salida. Este es el comportamiento por defecto en la conversión a saltos de línea DOS. Vea también la opción -r.

- -
-
-c, --convmode CONVMODE
-
- -

Establece el modo de conversión, Donde CONVMODE puede ser: ascii, 7bit, iso, mac siendo ascii el valor por defecto.

- -
-
-f, --force
-
- -

Fuerza la conversión de archivos binarios.

- -
-
-gb, --gb18030
-
- -

En Windows los archivos UTF-16 se convierten por defecto a UTF-8, sin tener en cuenta la configuración local. Use esta opción para convertir archivos UTF-16 a GB18030. Esta opción sólo está disponible en Windows.l Véase también la sección GB18030.

- -
-
-h, --help
-
- -

Despiega la ayuda y termina el programa.

- -
-
-i[MARCAS], --info[= MARCAS] ARCHIVO ...
-
- -

Muestra la información del archivo. No se realiza ninguna conversión.

- -

Se muestra la siguiente información, en este orden: número de saltos de línea DOS, número de saltos de línea Unix, número de saltos de línea Mac, Marca de Orden de Byte, de texto o binario, nombre del archivo.

- -

Ejemplo de salida:

- -
     6       0       0  no_bom    text    dos.txt
-     0       6       0  no_bom    text    unix.txt
-     0       0       6  no_bom    text    mac.txt
-     6       6       6  no_bom    text    mixed.txt
-    50       0       0  UTF-16LE  text    utf16le.txt
-     0      50       0  no_bom    text    utf8unix.txt
-    50       0       0  UTF-8     text    utf8dos.txt
-     2     418     219  no_bom    binary  dos2unix.exe
- -

Se pueden utilizar marcas extras opcionales para modificar la salida. Se pueden añadir una o más marcas.

- -
- -
d
-
- -

Muestra el número de saltos de línea DOS.

- -
-
u
-
- -

Muestra el número de saltos de línea Unix.

- -
-
m
-
- -

Muestra el número de saltos de línea Mac.

- -
-
b
-
- -

Muestra la Marca de Orden de Byte.

- -
-
t
-
- -

Muestra si el archivo es de texto o binario.

- -
-
c
-
- -

Muestra sólo los archivos que pueden ser convertidos.

- -

Con la marca c dos2unix sólo mostrará los archivos que contengan saltos de línea DOS, unix2dos sólo mostrará los nombres de archivo que tengan saltos de línea Unix.

- -
-
- -

Ejemplos:

- -

Muestra información para todos los archivos *.txt:

- -
    dos2unix -i *.txt
- -

Muestra sólo el número de saltos de línea de DOS y de Unix:

- -
    dos2unix -idu *.txt
- -

Muestra sólo la Marca de Orden de Byte.

- -
    dos2unix --info=b *.txt
- -

Muestra los archivos que tienen saltos de línea DOS:

- -
    dos2unix -ic *.txt
- -

Muestra los archivos que tienen saltos de línea Unix:

- -
    unix2dos -ic *.txt
- -
-
-k, --keepdate
-
- -

Mantiene la fecha del archivo de salida igual a la del archivo de entrada.

- -
-
-L, --license
-
- -

Muestra la licencia del programa.

- -
-
-l, --newline
-
- -

Añade salto de línea adicional.

- -

dos2unix: Sólo los saltos de línea DOS son cambiados por dos saltos de línea Unix. En modo Mac sólo los saltos de línea Mac son cambiados por dos saltos de línea Unix.

- -

unix2dos: Sólo los saltos de línea Unix son cambiados por dos saltos de línea DOS. En modo Mac los saltos de línea Unix son cambiados por dos saltos de línea Mac.

- -
-
-m, --add-bom
-
- -

Escribe una Marca de Orden de Bytes (BOM) en el archivo de salida. Por defecto se escribe una BOM UTF-8.

- -

Cuando el archivo de entrada es UTF-16 y se usa la opción -u, se escribirá un BOM UTF-16.

- -

No utilice esta opción cuando la codificación de salida sea distinta de UTF-8 o UTF-16. Véase también la sección UNICODE.

- -
-
-n, --newfile ARCHIVO_DE_ENTRADA ARCHIVO_DE_SALIDA ...
-
- -

Modo de archivo nuevo. Convierte el archivo ARCHIVO_DE_ENTRADA y escribe la salida al archivo ARCHIVO_DE_SALIDA. Los nombres de archivo deben ser dados en pares y los comodines no deben ser usados o perderá sus archivos.

- -

La persona que inicia la conversión en el modo de archivo nuevo (emparejado) será el propietario del archivo convertido. Los permisos de lectura/escritura del archivo nuevo serán los permisos del archivo original menos la umask(1) de la persona que ejecute la conversión.

- -
-
-o, --oldfile ARCHIVO ...
-
- -

Modo de archivo antiguo. Convierte el archivo ARCHIVO y lo sobrescribe con la salida. El programa por defecto se ejecuta en este modo. Se pueden emplear comodines.

- -

En modo de archivo antiguo (in situ), el archivo convertido tiene el mismo propietario, grupo y permisos de lectura/escritura que el archivo original. Lo mismo aplica cuando el archivo es convertido por otro usuario que tiene permiso de lectura en el archivo (p.e. usuario root). La conversión será abortada cuando no sea posible preservar los valores originales. Cambiar el propietario implicaría que el propietario original ya no podrá leer el archivo. Cambiar el grupo podría ser un riesgo de seguridad, ya que el archivo podría ser accesible a personas inadecuadas. La preservación del propietario, grupo, y permisos de lectura/escritura sólo está soportada bajo Unix.

- -
-
-q, --quiet
-
- -

Modo silencioso. Suprime todas las advertencias y mensajes. El valor retornado es cero. Excepto cuando se emplean parámetros incorrectos.

- -
-
-r, --remove-bom
-
- -

Elimina la Marca de Orden de Byte (BOM). No escribe el BOM en el archivo de salida. Este es el comportamiento por defecto al convertir a saltos de línea Unix. Vea también la opción -b.

- -
-
-s, --safe
-
- -

Ignora los archivos binarios (por defecto).

- -
-
-u, --keep-utf16
-
- -

Mantiene la codificación original UTF-16 en el archivo de entrada. El archivo de salida se escribirá con la misma codificación UTF-16, little o big endian, como el archivo de entrada. Esto impide la transformación a UTF-8. En consecuencia se escribirá un BOM UTF-16. Esta opción se puede desactivar con la opción -ascii.

- -
-
-ul, --assume-utf16le
-
- -

Se asume que el formato de archivo de entrada es UTF-16LE.

- -

Cuando existe una Marca de Orden de Bytes (BOM) en el archivo de entrada, la BOM tiene prioridad sobre esta opción.

- -

Cuando se hace una suposición incorrecta (el archivo de entrada no estaba en formato UTF-16LE) y la conversión tiene éxito, obtendrá un archivo UTF-8 de salida con el texto erróneo. La conversión errónea puede deshacerse con iconv(1) convirtiendo el archivo UTF-8 de salida de vuelta a UTF-16LE. Esto restaurará el archivo original.

- -

El supuesto de UTF-16LE funciona como un modo de conversión. Al cambiar al modo por defecto ascii el supuesto UTF-16LE es deshabilitado.

- -
-
-ub, --assume-utf16be
-
- -

Se asume que el formato del archivo de entrada es UTF-16BE.

- -

Esta opción funciona igual que la opción -ul.

- -
-
-v, --verbose
-
- -

Mostrar mensajes detallados. Se muestra información extra acerca de Marcas de Orden de Bytes (BOM) y el número de saltos de línea convertidos.

- -
- -
- -

Sigue los enlaces simbólicos y convierte los destinos.

- -
- -
- -

Reemplaza los enlaces simbólicos con los archivos convertidos (los archivos destino originales no se alteran).

- -
- -
- -

No altera los enlaces simbólicos ni sus destinos (por defecto).

- -
-
-V, --version
-
- -

Despiega la información de la versión y termina el programa.

- -
-
- -

MODO MAC

- -

En modo normal los saltos de línea son convertidos de DOS a Unix y viceversa. Los saltos de línea Mac no son convertidos.

- -

En modo Mac los saltos de línea son convertidos de Mac a Unix y viceversa. Los saltos de línea DOS no son modificados.

- -

Para ejecutar en modo Mac use el modificador -c mac o use los comandos mac2unix o unix2mac.

- -

MODOS DE CONVERSIÓN

- -
- -
ascii
-
- -

En modo ascii sólo los saltos de línea son convertidos. Éste es el modo de conversión por defecto.

- -

Aunque el nombre de este modo es ASCII, que es un estándar de 7 bits, éste emplea 8 bits. Siempre use este modo cuando convierta archivos Unicode UTF-8.

- -
-
7bit
-
- -

En este modo todos los caracteres no ASCII de 8 bits (con valores de 128 a 255) son convertidos al espacio de 7 bits.

- -
-
iso
-
- -

Los caracteres son convertidos entre un conjunto de caracteres DOS (página de códigos) y el conjunto de caracteres ISO-8859-1 (Latín-1) de Unix. Los caracteres DOS sin equivalente ISO-8859-1, para los cuales la conversión es imposible, son convertidos en un punto. Lo mismo se aplica para caracteres ISO-8859-1 sin contraparte DOS.

- -

Cuando sólo se emplea el parámetro -iso, dos2unix intentará determinar la página de códigos activa. Cuando esto no sea posible, dos2unix utilizará la página de códigos 437 por defecto, la cual es empleada principalmente en EE. UU. Para forzar una página de códigos específica emplee los parámetros -437 (EE. UU.), -850 (Europa Occidental), -860 (Portugués), -863 (Francocanadiense), o -865 (Nórdico). La página de códigos Windows 1252 (Europa Occidental) también está soportada con el parámetro -1252. Para acceder a otras páginas de códigos use dos2unix en combinación con iconv(1). Iconv puede convertir entre una larga lista de codificaciones de caracteres.

- -

No use la conversión ISO en archivos de texto Unicode. Esto corrompería los archivos codificados como UTF-8.

- -

Algunos ejemplos:

- -

Convierte de la página de códigos por defecto de DOS a Latín-1 de Unix:

- -
    dos2unix -iso -n in.txt out.txt
- -

Convierte de DOS CP850 a Unix Latín-1:

- -
    dos2unix -850 -n in.txt out.txt
- -

Convierte de Windows CP1252 a Unix Latin-1:

- -
    dos2unix -1252 -n in.txt out.txt
- -

Convierte de Windows CP1252 a Unix UTF-8 (Unicode).

- -
    iconv -f CP1252 -t UTF-8 in.txt | dos2unix > out.txt
- -

Convierte de Unix Latin-1 a la página de códigos por defecto de DOS:

- -
    unix2dos -iso -n in.txt out.txt
- -

Convierte de Unix Latin-1 a DOS CP850:

- -
    unix2dos -850 -n in.txt out.txt
- -

Convierte de Unix Latin-1 a Windows CP1252.

- -
    unix2dos -1252 -n in.txt out.txt
- -

Convierte de Unix UTF-8 (Unicode) a Windows CP1252:

- -
    unix2dos < in.txt | iconv -f UTF-8 -t CP1252 > out.txt
- -

Véase también http://czyborra.com/charsets/codepages.html y http://czyborra.com/charsets/iso8859.html.

- -
-
- -

UNICODE

- -

Codificaciones

- -

Existen diferentes codificaciones Unicode. En Unix y Linux los archivos Unicode son codificados comúnmente en UTF-8. En Windows los archivos de texto Unicode pueden estar codificados en UTF-8, UTF-16, o UTF-16 big endian, pero en general son codificados en formato UTF-16.

- -

Conversion

- -

Los archivos de texto Unicode pueden tener saltos de línea DOS, Unix o Mac, como cualquier archivo de texto.

- -

Todas las versiones de dos2unix y unix2dos pueden convertir archivos codificados como UTF-8, debido a que UTF-8 fue diseñado para retro-compatibilidad con ASCII.

- -

Dos2unix y unix2dos con soporte Unicode UTF-16, pueden leer archivos de texto codificados como UTF-16 little y big endian. Para ver si dos2unix fue compilado con soporte UTF-16 escriba dos2unix -V.

- -

En Unix/Linux los archivos codificados con UTF-16 se convierten a la codificación de caracteres local. Use el comando locale(1) para averiguar la codificación de caracteres local. Cuando no se puede hacer la conversión se obtendrá un error de conversión y se omitirá el archivo.

- -

En Windows los archivos UTF-16 se convierten por defecto a UTF-8. Los archivos de texto forrajeados con UTF-8 están soportados tanto en Windows como en Unix/Linux.

- -

Las codificaciones UTF-16 y UTF-8 son totalmente compatibles, no se perderá ningún texto en la conversión. Cuando ocurre un error de conversión de UTF-16 a UTF-8, por ejemplo cuando el archivo de entrada UTF-16 contiene un error, se omitirá el archivo.

- -

Cuando se usa la opción -u, el archivo de salida se escribirá en la misma codificación UTF-16 que el archivo de entrada. La opción -u previene la conversión a UTF-8.

- -

Dos2unix y unix2dos no tienen la opción de convertir archivos UTF-8 a UTF-16.

- -

La conversión en modos ISO y 7-bit no funciona en archivos UTF-16.

- -

Marca de orden de bytes

- -

En Windows los archivos de texto Unicode típicamente tienen una Marca de Orden de Bytes (BOM), debido a que muchos programas de Windows (incluyendo el Bloc de Notas) añaden una BOM por defecto. Véase también http://es.wikipedia.org/wiki/Marca_de_orden_de_bytes_%28BOM%29.

- -

En Unix los archivos Unicode no suelen tener BOM. Se supone que los archivos de texto son codificados en la codificación local de caracteres.

- -

Dos2unix sólo puede detectar si un archivo está en formato UTF-16 si el archivo tiene una BOM. Cuando un archivo UTF-16 no tiene una BOM, dos2unix tratará el archivo como un archivo binario.

- -

Use la opción -ul o -ub para convertir un archivo UTF-16 sin BOM.

- -

Dos2Unix, por defecto, no escribe BOM en el archivo de salida. Con la opción -b Dos2unix escribe el BOM cuando el archivo de entrada tiene BOM.

- -

Unix2dos escribe BOM en el archivo de salida cuando el archivo de entrada tiene BOM. Use la opción -r para eliminar la BOM.

- -

Dos2unix y unix2dos escriben siempre BOM cuando se usa la opción -m.

- -

Ejemplos Unicode

- -

Convertir de Windows UTF-16 (con una BOM) a Unix UTF-8:

- -
    dos2unix -n in.txt out.txt
- -

Convertir de Windows UTF-16LE (sin una BOM) a Unix UTF-8:

- -
    dos2unix -ul -n in.txt out.txt
- -

Convertir de Unix UTF-8 a Windows UTF-8 sin una BOM:

- -
    unix2dos -m -n in.txt out.txt
- -

Convertir de Unix UTF-8 a Windows UTF-16:

- -
    unix2dos < in.txt | iconv -f UTF-8 -t UTF-16 > out.txt
- -

GB18030

- -

GB18030 es un estándar del gobierno chino. Todo producto software vendido en China está obligado por ley a contener un subconjunto del GB18030 estándar. Véase http://en.wikipedia.org/wiki/GB_18030.

- -

GB18030 es totalmente compatible con Unicode y puede considerarse como formato de transformación Unicode. Como ocurre con UTF-8, GB18030 es compatible con ASCII. GB18030 también es compatible con la página de códigos de Windows 936, también conocida como GBK.

- -

En Unix/Linux los archivos UTF-16 se convierten a GB18030 cuando la codificación local se establece en GB18030. Tenga en cuenta que esto sólo funcionará si se establece la ubicación en China. Por ejemplo en una configuración local English British la conversión en_GB.GB18030 de UTF-16 a GB18030 no funcionará, pero en una configuración local China zh_CN.GB18030 sí lo hará.

- -

Use la opción -ul o -ub para convertir un archivo UTF-16 sin BOM.

- -

Los archivos codificados como GB18030 pueden tener una Marca de Orden de Bytes, como ocurre con los archivos Unicode.

- -

EJEMPLOS

- -

Lee la entrada desde 'stdin' y escribe la salida a 'stdout':

- -
    dos2unix
-    dos2unix -l -c mac
- -

Convierte y reemplaza a.txt. Convierte y reemplaza b.txt:

- -
    dos2unix a.txt b.txt
-    dos2unix -o a.txt b.txt
- -

Convierte y reemplaza a.txt empleando modo de conversión ascii:

- -
    dos2unix a.txt
- -

Convierte y reemplaza a.txt empleando modo de conversión ascii, convierte y reemplaza b.txt empleando modo de conversión de 7bits:

- -
    dos2unix a.txt -c 7bit b.txt
-    dos2unix -c ascii a.txt -c 7bit b.txt
-    dos2unix -ascii a.txt -7 b.txt
- -

Convierte a.txt del formato de Mac a Unix:

- -
    dos2unix -c mac a.txt
-    mac2unix a.txt
- -

Convierte a.txt del formato de Unix a Mac:

- -
    unix2dos -c mac a.txt
-    unix2mac a.txt
- -

Convierte y reemplaza a.txt manteniendo la fecha del archivo original:

- -
    dos2unix -k a.txt
-    dos2unix -k -o a.txt
- -

Convierte a.txt y escribe la salida en e.txt:

- -
    dos2unix -n a.txt e.txt
- -

Convierte a.txt y escribe la salida en e.txt, manteniendo la fecha de e.txt igual a la de a.txt:

- -
    dos2unix -k -n a.txt e.txt
- -

Convierte y reemplaza a.txt, convierte b.txt y escribe en e.txt:

- -
    dos2unix a.txt -n b.txt e.txt
-    dos2unix -o a.txt -n b.txt e.txt
- -

Convierte c.txt y escribe en e.txt, convierte y reemplaza a.txt, convierte y reemplaza b.txt, convierte d.txt y escribe en f.txt:

- -
    dos2unix -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt
- -

CONVERSIÓN RECURSIVA

- -

Use dos2unix en combinación con los comandos find(1) y xargs(1) para convertir recursivamente archivos de texto contenidos en un árbol de directorios. Por ejemplo para convertir todos los archivos .txt en el árbol de directorios debajo del directorio actual escriba:

- -
    find . -name *.txt |xargs dos2unix
- -

INTERNACIONALIZACIÓN

- -
- -
LANG
-
- -

El idioma principal se selecciona con la variable de entorno LANG. La variable LANG consiste de varias partes. La primer parte es el código del idioma en minúsculas. La segunda es opcional y es el código del país en mayúsculas, precedido por un guión bajo. Existe también una tercera parte opcional: la codificación de caracteres, precedida por un punto. Unos cuantos ejemplos para intérpretes de comandos tipo POSIX estándar:

- -
    export LANG=nl               Neerlandés
-    export LANG=nl_NL            Neerlandés, Países Bajos
-    export LANG=nl_BE            Neerlandés, Bélgica
-    export LANG=es_ES            Español, España
-    export LANG=es_MX            Español, México
-    export LANG=en_US.iso88591   Ingles, EE. UU., codificación Latín-1
-    export LANG=en_GB.UTF-8      Ingles, Reino Unido, codificación UTF-8
- -

Para obtener una lista completa de códigos de idioma y país véase el manual de gettext: http://www.gnu.org/software/gettext/manual/html_node/Usual-Language-Codes.html

- -

En sistemas Unix puede emplear el comando locale(1) para obtener información específica de locale.

- -
-
LANGUAGE
-
- -

Con la variable de entorno LANGUAGE puede especificar una lista de prioridad de los idiomas, separados por dos puntos. Dos2unix da preferencia a LANGUAGE sobre LANG. Por ejemplo, primero neerlandés y entonces alemán: LANGUAGE=nl:de. Para usar una lista de prioridad de idiomas a través de la variable LANGUAGE tiene que habilitar antes la internacionalización, asignando un valor distinto de "C" a LANG (o LC_ALL). Véase también el manual de gettext: http://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html

- -

Si selecciona un idioma que no está disponible el programa funcionará en ingles.

- -
-
DOS2UNIX_LOCALEDIR
-
- -

Con la variable de entorno DOS2UNIX_LOCALEDIR el LOCALEDIR asignado durante la compilación puede ser modificado. LOCALEDIR es usado para encontrar los archivos de idioma. El valor por defecto de GNU es /usr/local/share/locale. El parámetro --version mostrará el LOCALEDIR en uso.

- -

Ejemplo (intérprete de comandos POSIX):

- -
    export DOS2UNIX_LOCALEDIR=$HOME/share/locale
- -
-
- -

VALOR DE RETORNO

- -

Se regresa cero cuando el programa termina exitosamente. Cuando ocurre un error del sistema se regresará el último número de error del sistema. Para otros errores se regresa 1.

- -

El valor de retorno es siempre cero en modo silencioso, excepto cuando se emplean parámetros incorrectos.

- -

ESTÁNDARES

- -

http://es.wikipedia.org/wiki/Documento_de_texto

- -

http://es.wikipedia.org/wiki/Retorno_de_carro

- -

http://es.wikipedia.org/wiki/Nueva_l%C3%ADnea

- -

http://es.wikipedia.org/wiki/Unicode

- -

AUTORES

- -

Benjamin Lin - <blin@socs.uts.edu.au>, Bernd Johannes Wuebben (mac2unix mode) - <wuebben@kde.org>, Christian Wurll (add extra newline) - <wurll@ira.uka.de>, Erwin Waterlander - <waterlan@xs4all.nl> (maintainer)

- -

Página del proyecto: http://waterlan.home.xs4all.nl/dos2unix.html

- -

Página de SourceForge: http://sourceforge.net/projects/dos2unix/

- -

VÉASE TAMBIÉN

- -

file(1) find(1) iconv(1) locale(1) xargs(1)

- - - - - - - diff --git a/Tools/dos2unix/share/doc/dos2unix-7.2/es/dos2unix.txt b/Tools/dos2unix/share/doc/dos2unix-7.2/es/dos2unix.txt deleted file mode 100644 index a79e093..0000000 --- a/Tools/dos2unix/share/doc/dos2unix-7.2/es/dos2unix.txt +++ /dev/null @@ -1,617 +0,0 @@ -NOMBRE - dos2unix - Convertidor de archivos de texto de formato DOS/Mac a Unix y - viceversa - -SINOPSIS - dos2unix [parámetros] [ARCHIVO ...] [-n ARCHIVO_DE_ENTRADA ARCHIVO_DE_SALIDA ...] - unix2dos [parámetros] [ARCHIVO ...] [-n ARCHIVO_DE_ENTRADA ARCHIVO_DE_SALIDA ...] - -DESCRIPCIÓN - El paquete Dos2unix incluye las herramientas "dos2unix" y "unix2dos" - para convertir archivos de texto plano en formato DOS o Mac a formato - Unix y viceversa. - - En archivos de texto DOS/Windows, un salto de línea, también conocido - como nueva línea, es una combinación de dos caracteres: un retorno de - carro (CR) seguido por un salto de línea (LF). En archivos de texto - Unix, un salto de línea es solamente un carácter: el salto de línea - (LF). En archivos de texto Mac, antes de Mac OS X, un salto de línea era - sólo un carácter retorno de carro (CR). Actualmente, Mac OS usa el - estilo Unix de saltos de línea (LF). - - Además de saltos de línea, Dos2unix puede también convertir la - codificación de archivos. Unas cuantas páginas de códigos DOS pueden ser - convertidas a Unix Latin-1. Y archivos Unicode de Windows (UTF-16) - pueden ser convertidos a archivos Unicode de Unix (UTF-8). - - Los archivos binarios son ignorados automáticamente, a menos que se - fuerce su conversión. - - Los archivos no regulares, tales como directorios y FIFO, son ignorados - automáticamente. - - Los enlaces simbólicos y sus destinos no son modificados por defecto. - Los enlaces simbólicos pueden opcionalmente ser reemplazados, o la - salida puede ser escrita al destino simbólico del enlace. En Windows no - está soportada la escritura a enlaces simbólicos. - - Dos2unix fue modelado después de dos2unix bajo SunOS/Solaris. Hay una - importante diferencia respecto a la versión original SunOS/Solaris. Esta - versión hace, por defecto, la conversión en el mismo archivo (modo de - archivo antiguo), mientras que la versión original de SunOS/Solaris sólo - es compatible con la conversión en archivo emparejado (modo de archivo - nuevo). Véanse las opciones "-o" y "-n". - -PARÁMETROS - -- Todos los parámetros siguientes son tratados como nombres de - archivo. Use este parámetro si desea convertir archivos cuyos - nombres inician con un guión. Por ejemplo para convertir un archivoo - llamado "-foo", use este comando: - - dos2unix -- -foo - - O en modo de archivo nuevo: - - dos2unix -n -- -foo out.txt - - -ascii - Sólo convierte los salto de línea. Éste es el modo de conversión por - defecto. - - -iso - Conversión entre el conjunto de caracteres DOS e ISO-8859-1. Véase - también la sección MODOS DE CONVERSIÓN. - - -1252 - Usa la página de códigos Windows 1252 (Europa Occidental). - - -437 - Usa la página de códigos DOS 437 (EE. UU.). Está es la página de - códigos usada por defecto para conversión ISO. - - -850 - Usa la página de códigos DOS 850 (Europa Occidental). - - -860 - Usa la página de códigos DOS 860 (Portugués). - - -863 - Usa la página de códigos DOS 863 (Francocanadiense). - - -865 - Usa la página de códigos DOS 865 (Nórdico). - - -7 Convierte caracteres de 8 bits al espacio de 7 bits. - - -b, --keep-bom - Mantiene la Marca de Orden de Byte (BOM). Cuando el archivo de - entrada tiene BOM, escribe BOM en el archivo de salida. Este es el - comportamiento por defecto en la conversión a saltos de línea DOS. - Vea también la opción "-r". - - -c, --convmode CONVMODE - Establece el modo de conversión, Donde CONVMODE puede ser: *ascii*, - *7bit*, *iso*, *mac* siendo ascii el valor por defecto. - - -f, --force - Fuerza la conversión de archivos binarios. - - -gb, --gb18030 - En Windows los archivos UTF-16 se convierten por defecto a UTF-8, - sin tener en cuenta la configuración local. Use esta opción para - convertir archivos UTF-16 a GB18030. Esta opción sólo está - disponible en Windows.l Véase también la sección GB18030. - - -h, --help - Despiega la ayuda y termina el programa. - - -i[MARCAS], --info[= MARCAS] ARCHIVO ... - Muestra la información del archivo. No se realiza ninguna - conversión. - - Se muestra la siguiente información, en este orden: número de saltos - de línea DOS, número de saltos de línea Unix, número de saltos de - línea Mac, Marca de Orden de Byte, de texto o binario, nombre del - archivo. - - Ejemplo de salida: - - 6 0 0 no_bom text dos.txt - 0 6 0 no_bom text unix.txt - 0 0 6 no_bom text mac.txt - 6 6 6 no_bom text mixed.txt - 50 0 0 UTF-16LE text utf16le.txt - 0 50 0 no_bom text utf8unix.txt - 50 0 0 UTF-8 text utf8dos.txt - 2 418 219 no_bom binary dos2unix.exe - - Se pueden utilizar marcas extras opcionales para modificar la - salida. Se pueden añadir una o más marcas. - - d Muestra el número de saltos de línea DOS. - - u Muestra el número de saltos de línea Unix. - - m Muestra el número de saltos de línea Mac. - - b Muestra la Marca de Orden de Byte. - - t Muestra si el archivo es de texto o binario. - - c Muestra sólo los archivos que pueden ser convertidos. - - Con la marca "c" dos2unix sólo mostrará los archivos que - contengan saltos de línea DOS, unix2dos sólo mostrará los - nombres de archivo que tengan saltos de línea Unix. - - Ejemplos: - - Muestra información para todos los archivos *.txt: - - dos2unix -i *.txt - - Muestra sólo el número de saltos de línea de DOS y de Unix: - - dos2unix -idu *.txt - - Muestra sólo la Marca de Orden de Byte. - - dos2unix --info=b *.txt - - Muestra los archivos que tienen saltos de línea DOS: - - dos2unix -ic *.txt - - Muestra los archivos que tienen saltos de línea Unix: - - unix2dos -ic *.txt - - -k, --keepdate - Mantiene la fecha del archivo de salida igual a la del archivo de - entrada. - - -L, --license - Muestra la licencia del programa. - - -l, --newline - Añade salto de línea adicional. - - dos2unix: Sólo los saltos de línea DOS son cambiados por dos saltos - de línea Unix. En modo Mac sólo los saltos de línea Mac son - cambiados por dos saltos de línea Unix. - - unix2dos: Sólo los saltos de línea Unix son cambiados por dos saltos - de línea DOS. En modo Mac los saltos de línea Unix son cambiados por - dos saltos de línea Mac. - - -m, --add-bom - Escribe una Marca de Orden de Bytes (BOM) en el archivo de salida. - Por defecto se escribe una BOM UTF-8. - - Cuando el archivo de entrada es UTF-16 y se usa la opción "-u", se - escribirá un BOM UTF-16. - - No utilice esta opción cuando la codificación de salida sea distinta - de UTF-8 o UTF-16. Véase también la sección UNICODE. - - -n, --newfile ARCHIVO_DE_ENTRADA ARCHIVO_DE_SALIDA ... - Modo de archivo nuevo. Convierte el archivo ARCHIVO_DE_ENTRADA y - escribe la salida al archivo ARCHIVO_DE_SALIDA. Los nombres de - archivo deben ser dados en pares y los comodines *no* deben ser - usados o *perderá* sus archivos. - - La persona que inicia la conversión en el modo de archivo nuevo - (emparejado) será el propietario del archivo convertido. Los - permisos de lectura/escritura del archivo nuevo serán los permisos - del archivo original menos la umask(1) de la persona que ejecute la - conversión. - - -o, --oldfile ARCHIVO ... - Modo de archivo antiguo. Convierte el archivo ARCHIVO y lo - sobrescribe con la salida. El programa por defecto se ejecuta en - este modo. Se pueden emplear comodines. - - En modo de archivo antiguo (in situ), el archivo convertido tiene el - mismo propietario, grupo y permisos de lectura/escritura que el - archivo original. Lo mismo aplica cuando el archivo es convertido - por otro usuario que tiene permiso de lectura en el archivo (p.e. - usuario root). La conversión será abortada cuando no sea posible - preservar los valores originales. Cambiar el propietario implicaría - que el propietario original ya no podrá leer el archivo. Cambiar el - grupo podría ser un riesgo de seguridad, ya que el archivo podría - ser accesible a personas inadecuadas. La preservación del - propietario, grupo, y permisos de lectura/escritura sólo está - soportada bajo Unix. - - -q, --quiet - Modo silencioso. Suprime todas las advertencias y mensajes. El valor - retornado es cero. Excepto cuando se emplean parámetros incorrectos. - - -r, --remove-bom - Elimina la Marca de Orden de Byte (BOM). No escribe el BOM en el - archivo de salida. Este es el comportamiento por defecto al - convertir a saltos de línea Unix. Vea también la opción "-b". - - -s, --safe - Ignora los archivos binarios (por defecto). - - -u, --keep-utf16 - Mantiene la codificación original UTF-16 en el archivo de entrada. - El archivo de salida se escribirá con la misma codificación UTF-16, - little o big endian, como el archivo de entrada. Esto impide la - transformación a UTF-8. En consecuencia se escribirá un BOM UTF-16. - Esta opción se puede desactivar con la opción "-ascii". - - -ul, --assume-utf16le - Se asume que el formato de archivo de entrada es UTF-16LE. - - Cuando existe una Marca de Orden de Bytes (BOM) en el archivo de - entrada, la BOM tiene prioridad sobre esta opción. - - Cuando se hace una suposición incorrecta (el archivo de entrada no - estaba en formato UTF-16LE) y la conversión tiene éxito, obtendrá un - archivo UTF-8 de salida con el texto erróneo. La conversión errónea - puede deshacerse con iconv(1) convirtiendo el archivo UTF-8 de - salida de vuelta a UTF-16LE. Esto restaurará el archivo original. - - El supuesto de UTF-16LE funciona como un *modo de conversión*. Al - cambiar al modo por defecto *ascii* el supuesto UTF-16LE es - deshabilitado. - - -ub, --assume-utf16be - Se asume que el formato del archivo de entrada es UTF-16BE. - - Esta opción funciona igual que la opción "-ul". - - -v, --verbose - Mostrar mensajes detallados. Se muestra información extra acerca de - Marcas de Orden de Bytes (BOM) y el número de saltos de línea - convertidos. - - -F, --follow-symlink - Sigue los enlaces simbólicos y convierte los destinos. - - -R, --replace-symlink - Reemplaza los enlaces simbólicos con los archivos convertidos (los - archivos destino originales no se alteran). - - -S, --skip-symlink - No altera los enlaces simbólicos ni sus destinos (por defecto). - - -V, --version - Despiega la información de la versión y termina el programa. - -MODO MAC - En modo normal los saltos de línea son convertidos de DOS a Unix y - viceversa. Los saltos de línea Mac no son convertidos. - - En modo Mac los saltos de línea son convertidos de Mac a Unix y - viceversa. Los saltos de línea DOS no son modificados. - - Para ejecutar en modo Mac use el modificador "-c mac" o use los comandos - "mac2unix" o "unix2mac". - -MODOS DE CONVERSIÓN - ascii - En modo "ascii" sólo los saltos de línea son convertidos. Éste es el - modo de conversión por defecto. - - Aunque el nombre de este modo es ASCII, que es un estándar de 7 - bits, éste emplea 8 bits. Siempre use este modo cuando convierta - archivos Unicode UTF-8. - - 7bit - En este modo todos los caracteres no ASCII de 8 bits (con valores de - 128 a 255) son convertidos al espacio de 7 bits. - - iso Los caracteres son convertidos entre un conjunto de caracteres DOS - (página de códigos) y el conjunto de caracteres ISO-8859-1 (Latín-1) - de Unix. Los caracteres DOS sin equivalente ISO-8859-1, para los - cuales la conversión es imposible, son convertidos en un punto. Lo - mismo se aplica para caracteres ISO-8859-1 sin contraparte DOS. - - Cuando sólo se emplea el parámetro "-iso", dos2unix intentará - determinar la página de códigos activa. Cuando esto no sea posible, - dos2unix utilizará la página de códigos 437 por defecto, la cual es - empleada principalmente en EE. UU. Para forzar una página de códigos - específica emplee los parámetros -437 (EE. UU.), -850 (Europa - Occidental), -860 (Portugués), -863 (Francocanadiense), o -865 - (Nórdico). La página de códigos Windows 1252 (Europa Occidental) - también está soportada con el parámetro -1252. Para acceder a otras - páginas de códigos use dos2unix en combinación con iconv(1). Iconv - puede convertir entre una larga lista de codificaciones de - caracteres. - - No use la conversión ISO en archivos de texto Unicode. Esto - corrompería los archivos codificados como UTF-8. - - Algunos ejemplos: - - Convierte de la página de códigos por defecto de DOS a Latín-1 de - Unix: - - dos2unix -iso -n in.txt out.txt - - Convierte de DOS CP850 a Unix Latín-1: - - dos2unix -850 -n in.txt out.txt - - Convierte de Windows CP1252 a Unix Latin-1: - - dos2unix -1252 -n in.txt out.txt - - Convierte de Windows CP1252 a Unix UTF-8 (Unicode). - - iconv -f CP1252 -t UTF-8 in.txt | dos2unix > out.txt - - Convierte de Unix Latin-1 a la página de códigos por defecto de DOS: - - unix2dos -iso -n in.txt out.txt - - Convierte de Unix Latin-1 a DOS CP850: - - unix2dos -850 -n in.txt out.txt - - Convierte de Unix Latin-1 a Windows CP1252. - - unix2dos -1252 -n in.txt out.txt - - Convierte de Unix UTF-8 (Unicode) a Windows CP1252: - - unix2dos < in.txt | iconv -f UTF-8 -t CP1252 > out.txt - - Véase también y - . - -UNICODE - Codificaciones - Existen diferentes codificaciones Unicode. En Unix y Linux los archivos - Unicode son codificados comúnmente en UTF-8. En Windows los archivos de - texto Unicode pueden estar codificados en UTF-8, UTF-16, o UTF-16 big - endian, pero en general son codificados en formato UTF-16. - - Conversion - Los archivos de texto Unicode pueden tener saltos de línea DOS, Unix o - Mac, como cualquier archivo de texto. - - Todas las versiones de dos2unix y unix2dos pueden convertir archivos - codificados como UTF-8, debido a que UTF-8 fue diseñado para - retro-compatibilidad con ASCII. - - Dos2unix y unix2dos con soporte Unicode UTF-16, pueden leer archivos de - texto codificados como UTF-16 little y big endian. Para ver si dos2unix - fue compilado con soporte UTF-16 escriba "dos2unix -V". - - En Unix/Linux los archivos codificados con UTF-16 se convierten a la - codificación de caracteres local. Use el comando locale(1) para - averiguar la codificación de caracteres local. Cuando no se puede hacer - la conversión se obtendrá un error de conversión y se omitirá el - archivo. - - En Windows los archivos UTF-16 se convierten por defecto a UTF-8. Los - archivos de texto forrajeados con UTF-8 están soportados tanto en - Windows como en Unix/Linux. - - Las codificaciones UTF-16 y UTF-8 son totalmente compatibles, no se - perderá ningún texto en la conversión. Cuando ocurre un error de - conversión de UTF-16 a UTF-8, por ejemplo cuando el archivo de entrada - UTF-16 contiene un error, se omitirá el archivo. - - Cuando se usa la opción "-u", el archivo de salida se escribirá en la - misma codificación UTF-16 que el archivo de entrada. La opción "-u" - previene la conversión a UTF-8. - - Dos2unix y unix2dos no tienen la opción de convertir archivos UTF-8 a - UTF-16. - - La conversión en modos ISO y 7-bit no funciona en archivos UTF-16. - - Marca de orden de bytes - En Windows los archivos de texto Unicode típicamente tienen una Marca de - Orden de Bytes (BOM), debido a que muchos programas de Windows - (incluyendo el Bloc de Notas) añaden una BOM por defecto. Véase también - . - - En Unix los archivos Unicode no suelen tener BOM. Se supone que los - archivos de texto son codificados en la codificación local de - caracteres. - - Dos2unix sólo puede detectar si un archivo está en formato UTF-16 si el - archivo tiene una BOM. Cuando un archivo UTF-16 no tiene una BOM, - dos2unix tratará el archivo como un archivo binario. - - Use la opción "-ul" o "-ub" para convertir un archivo UTF-16 sin BOM. - - Dos2Unix, por defecto, no escribe BOM en el archivo de salida. Con la - opción "-b" Dos2unix escribe el BOM cuando el archivo de entrada tiene - BOM. - - Unix2dos escribe BOM en el archivo de salida cuando el archivo de - entrada tiene BOM. Use la opción "-r" para eliminar la BOM. - - Dos2unix y unix2dos escriben siempre BOM cuando se usa la opción "-m". - - Ejemplos Unicode - Convertir de Windows UTF-16 (con una BOM) a Unix UTF-8: - - dos2unix -n in.txt out.txt - - Convertir de Windows UTF-16LE (sin una BOM) a Unix UTF-8: - - dos2unix -ul -n in.txt out.txt - - Convertir de Unix UTF-8 a Windows UTF-8 sin una BOM: - - unix2dos -m -n in.txt out.txt - - Convertir de Unix UTF-8 a Windows UTF-16: - - unix2dos < in.txt | iconv -f UTF-8 -t UTF-16 > out.txt - -GB18030 - GB18030 es un estándar del gobierno chino. Todo producto software - vendido en China está obligado por ley a contener un subconjunto del - GB18030 estándar. Véase . - - GB18030 es totalmente compatible con Unicode y puede considerarse como - formato de transformación Unicode. Como ocurre con UTF-8, GB18030 es - compatible con ASCII. GB18030 también es compatible con la página de - códigos de Windows 936, también conocida como GBK. - - En Unix/Linux los archivos UTF-16 se convierten a GB18030 cuando la - codificación local se establece en GB18030. Tenga en cuenta que esto - sólo funcionará si se establece la ubicación en China. Por ejemplo en - una configuración local English British la conversión "en_GB.GB18030" de - UTF-16 a GB18030 no funcionará, pero en una configuración local China - "zh_CN.GB18030" sí lo hará. - - Use la opción "-ul" o "-ub" para convertir un archivo UTF-16 sin BOM. - - Los archivos codificados como GB18030 pueden tener una Marca de Orden de - Bytes, como ocurre con los archivos Unicode. - -EJEMPLOS - Lee la entrada desde 'stdin' y escribe la salida a 'stdout': - - dos2unix - dos2unix -l -c mac - - Convierte y reemplaza a.txt. Convierte y reemplaza b.txt: - - dos2unix a.txt b.txt - dos2unix -o a.txt b.txt - - Convierte y reemplaza a.txt empleando modo de conversión ascii: - - dos2unix a.txt - - Convierte y reemplaza a.txt empleando modo de conversión ascii, - convierte y reemplaza b.txt empleando modo de conversión de 7bits: - - dos2unix a.txt -c 7bit b.txt - dos2unix -c ascii a.txt -c 7bit b.txt - dos2unix -ascii a.txt -7 b.txt - - Convierte a.txt del formato de Mac a Unix: - - dos2unix -c mac a.txt - mac2unix a.txt - - Convierte a.txt del formato de Unix a Mac: - - unix2dos -c mac a.txt - unix2mac a.txt - - Convierte y reemplaza a.txt manteniendo la fecha del archivo original: - - dos2unix -k a.txt - dos2unix -k -o a.txt - - Convierte a.txt y escribe la salida en e.txt: - - dos2unix -n a.txt e.txt - - Convierte a.txt y escribe la salida en e.txt, manteniendo la fecha de - e.txt igual a la de a.txt: - - dos2unix -k -n a.txt e.txt - - Convierte y reemplaza a.txt, convierte b.txt y escribe en e.txt: - - dos2unix a.txt -n b.txt e.txt - dos2unix -o a.txt -n b.txt e.txt - - Convierte c.txt y escribe en e.txt, convierte y reemplaza a.txt, - convierte y reemplaza b.txt, convierte d.txt y escribe en f.txt: - - dos2unix -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt - -CONVERSIÓN RECURSIVA - Use dos2unix en combinación con los comandos find(1) y xargs(1) para - convertir recursivamente archivos de texto contenidos en un árbol de - directorios. Por ejemplo para convertir todos los archivos .txt en el - árbol de directorios debajo del directorio actual escriba: - - find . -name *.txt |xargs dos2unix - -INTERNACIONALIZACIÓN - LANG - El idioma principal se selecciona con la variable de entorno LANG. - La variable LANG consiste de varias partes. La primer parte es el - código del idioma en minúsculas. La segunda es opcional y es el - código del país en mayúsculas, precedido por un guión bajo. Existe - también una tercera parte opcional: la codificación de caracteres, - precedida por un punto. Unos cuantos ejemplos para intérpretes de - comandos tipo POSIX estándar: - - export LANG=nl Neerlandés - export LANG=nl_NL Neerlandés, Países Bajos - export LANG=nl_BE Neerlandés, Bélgica - export LANG=es_ES Español, España - export LANG=es_MX Español, México - export LANG=en_US.iso88591 Ingles, EE. UU., codificación Latín-1 - export LANG=en_GB.UTF-8 Ingles, Reino Unido, codificación UTF-8 - - Para obtener una lista completa de códigos de idioma y país véase el - manual de gettext: - - - En sistemas Unix puede emplear el comando locale(1) para obtener - información específica de locale. - - LANGUAGE - Con la variable de entorno LANGUAGE puede especificar una lista de - prioridad de los idiomas, separados por dos puntos. Dos2unix da - preferencia a LANGUAGE sobre LANG. Por ejemplo, primero neerlandés y - entonces alemán: "LANGUAGE=nl:de". Para usar una lista de prioridad - de idiomas a través de la variable LANGUAGE tiene que habilitar - antes la internacionalización, asignando un valor distinto de "C" a - LANG (o LC_ALL). Véase también el manual de gettext: - - - Si selecciona un idioma que no está disponible el programa - funcionará en ingles. - - DOS2UNIX_LOCALEDIR - Con la variable de entorno DOS2UNIX_LOCALEDIR el LOCALEDIR asignado - durante la compilación puede ser modificado. LOCALEDIR es usado para - encontrar los archivos de idioma. El valor por defecto de GNU es - "/usr/local/share/locale". El parámetro --version mostrará el - LOCALEDIR en uso. - - Ejemplo (intérprete de comandos POSIX): - - export DOS2UNIX_LOCALEDIR=$HOME/share/locale - -VALOR DE RETORNO - Se regresa cero cuando el programa termina exitosamente. Cuando ocurre - un error del sistema se regresará el último número de error del sistema. - Para otros errores se regresa 1. - - El valor de retorno es siempre cero en modo silencioso, excepto cuando - se emplean parámetros incorrectos. - -ESTÁNDARES - - - - - - - - -AUTORES - Benjamin Lin - , Bernd Johannes Wuebben (mac2unix - mode) - , Christian Wurll (add extra newline) - - , Erwin Waterlander - - (maintainer) - - Página del proyecto: - - Página de SourceForge: - -VÉASE TAMBIÉN - file(1) find(1) iconv(1) locale(1) xargs(1) - diff --git a/Tools/dos2unix/share/doc/dos2unix-7.2/fr/dos2unix.htm b/Tools/dos2unix/share/doc/dos2unix-7.2/fr/dos2unix.htm deleted file mode 100644 index 2279857..0000000 --- a/Tools/dos2unix/share/doc/dos2unix-7.2/fr/dos2unix.htm +++ /dev/null @@ -1,654 +0,0 @@ - - - - -dos2unix 7.2 - Convertit les fichiers textes du format DOS/Mac vers Unix et inversement - - - - - - - - - - -

NOM

- -

dos2unix - Convertit les fichiers textes du format DOS/Mac vers Unix et inversement

- -

SYNOPSIS

- -
    dos2unix [options] [FICHIER …] [-n FICHIER_ENTRÉE FICHIER_SORTIE …]
-    unix2dos [options] [FICHIER …] [-n FICHIER_ENTRÉE FICHIER_SORTIE …]
- -

DESCRIPTION

- -

Le package Dos2unix inclut les utilitaires dos2unix et unix2dos pour convertir des fichiers textes au format DOS ou Mac vers le format Unix et inversement.

- -

Dans les fichiers textes DOS/Windows, un saut de ligne est une combinaison de deux caractères: un retour de chariot (CR) suivi d'un saut de ligne (LF). Dans les fichiers textes Unix, le saut de ligne est un seul caractère: le saut de ligne (LF). Les fichiers textes Mac, avant Mac OS X, utilisaient le retour chariot (CR) comme seul caractère. De nos jours, Mac OS utilise le même style de saut de ligne que Unix (LF).

- -

Outre les sauts de lignes, Dos2unix convertit aussi le codage des fichiers. Quelques codes page DOS peuvent être convertis en Latin-1 sous Unix. L'Unicode des fichiers Windows (UTF-16) peut être converti en Unicode Unix (UTF-8).

- -

Les fichiers binaires sont automatiquement ignorés à moins que la conversion soit forcée.

- -

Les fichiers non réguliers tels que les répertoires et les FIFOs sont automatiquement ignorés.

- -

Les liens symboliques et leur cible sont, par défaut, inchangés. En option, les liens symboliques peuvent être remplacés ou, au choix, la sortie peut être écrite dans la cible du lien symbolique. Écrire dans la cible d'un lien symbolique n'est pas supporté sous Windows.

- -

Dos2unix a été conçu comme dos2unix sous SunOS/Solaris. Il y a une différence importante avec la version originale de SunOS/Solaris. Cette version effectue les conversions en place (ancien mode de fichiers) tandis que la version originale de SunOS/Solaris ne supporte que la conversion par paire (nouveau mode de fichier). Voyez aussi les options -o et -n.

- -

OPTIONS

- -
- -
--
-
- -

Traites toutes les options à sa suite comme étant des noms de fichiers. Utilisez cette option si vous voulez convertir des fichiers dont le nom commence par un tiret. Par exemple, pour convertir un fichier nommé « -foo », vous pouvez utiliser cette commande:

- -
    dos2unix -- -foo
- -

Ou dans le style des nouveaux fichiers:

- -
    dos2unix -n -- -foo sortie.txt
- -
-
-ascii
-
- -

Convertit uniquement les sauts de lignes. C'est le mode de conversion par défaut.

- -
-
-iso
-
- -

Convertit le jeu de caractères du DOS vers ISO-8859-1. Voyez aussi la section des MODES DE CONVERSION.

- -
-
-1252
-
- -

Utilise le code page 1252 de Windows (Europe de l'ouest).

- -
-
-437
-
- -

Utilise le code page 437 du DOS (US). C'est le code page par défaut pour les conversions ISO.

- -
-
-850
-
- -

Utilise le code page 850 du DOS (Europe de l'ouest).

- -
-
-860
-
- -

Utilise le code page 860 du DOS (portugais).

- -
-
-863
-
- -

Utilise le code page 863 du DOS (français canadien).

- -
-
-865
-
- -

Utilise le code page 865 du DOS (nordique).

- -
-
-7
-
- -

Convertit les caractères 8 bits vers l'espace 7 bits.

- -
-
-b, --keep-bom
-
- -

Conserve la marque d'ordre des octets (BOM). Si le fichier d'entrée a une BOM, elle est écrite dans le fichier de sortie. C'est le comportement par défaut quand les sauts de lignes sont convertis au format DOS. Consultez aussi l'option -r.

- -
-
-c, --convmode MODE_CONV
-
- -

Change le mode de conversion. MODE_CONV prend l'une des valeurs: ascii, 7bit, iso, mac. Ascii est la valeur par défaut.

- -
-
-f, --force
-
- -

Force la conversion de fichiers binaires.

- -
-
-gb, --gb18030
-
- -

Sous Windows, les fichiers UTF-16 sont convertis en UTF-8 par défaut sans considération pour les paramètres de la localisation. Utilisez cette option pour convertir UTF-16 en GB18030. Cette option n'est disponible que sous Windows. Consultez aussi la section GB18030.

- -
-
-h, --help
-
- -

Affiche l'aide et s'arrête.

- -
-
-i[FANIONS], --info[=FANIONS] FICHIER …
-
- -

Affiche les informations du fichier. Aucune conversion n'est réalisée.

- -

Les informations suivantes sont affichées dans cet ordre: le nombre de sauts de ligne DOS, le nombre de sauts de ligne Unix, le nombre de sauts de ligne Mac, la marque d'ordre des octets, texte ou binaire, nom du fichier.

- -

Exemple de sortie :

- -
     6       0       0  no_bom    text    dos.txt
-     0       6       0  no_bom    text    unix.txt
-     0       0       6  no_bom    text    mac.txt
-     6       6       6  no_bom    text    mixed.txt
-    50       0       0  UTF-16LE  text    utf16le.txt
-     0      50       0  no_bom    text    utf8unix.txt
-    50       0       0  UTF-8     text    utf8dos.txt
-     2     418     219  no_bom    binary  dos2unix.exe
- -

Des fanions facultatifs peuvent être ajoutés pour changer la sortie. Un ou plusieurs fanions peuvent être ajoutés.

- -
- -
d
-
- -

Affiche le nombre de sauts de ligne DOS.

- -
-
u
-
- -

Affiche le nombre de sauts de ligne Unix.

- -
-
m
-
- -

Affiche le nombre de sauts de ligne Mac.

- -
-
b
-
- -

Afficher la marque d'ordre des octets.

- -
-
t
-
- -

Affiche si le fichier est texte ou binaire.

- -
-
c
-
- -

Affiche uniquement les fichiers qui seraient convertis.

- -

Avec le fanion c, dos2unix n'affichera que les fichiers contenant des sauts de ligne DOS alors que unix2dos n'affichera que les noms des fichiers aillant des sauts de ligne Unix.

- -
-
- -

Exemples:

- -

Afficher les informations pour tous les fichier *.txt :

- -
    dos2unix -i *.txt
- -

Afficher uniquement le nombre de sauts de ligne DOS et Unix :

- -
    dos2unix -idu *.txt
- -

Montrer uniquement la marque d'ordre des octets :

- -
    dos2unix --info=b *.txt
- -

Liste les fichiers qui ont des sauts de ligne DOS :

- -
    dos2unix -ic *.txt
- -

Liste les fichiers qui ont des sauts de ligne Unix :

- -
    unix2dos -ic *.txt
- -
-
-k, --keepdate
-
- -

La date du fichier de sortie est la même que celle du fichier d'entrée.

- -
-
-L, --license
-
- -

Affiche la licence du programme.

- -
-
-l, --newline
-
- -

Ajoute des sauts de lignes additionnels.

- -

dos2unix: Seuls les sauts de lignes du DOS sont changés en deux sauts de lignes de Unix. En mode Mac, seuls les sauts de lignes Mac sont changés en deux sauts de lignes Unix.

- -

unix2dos: Seuls les sauts de lignes Unix sont changés en deux sauts de lignes du DOS. En mode Mac, les sauts de lignes Unix sont remplacés par deux sauts de lignes Mac.

- -
-
-m, --add-bom
-
- -

Écrit une marque d'ordre des octets (BOM) dans le fichier de sortie. Par défaut une BOM UTF-8 est écrite.

- -

Lorsque le fichier d'entrée est en UTF-16 et que l'option -u est utilisée, une BOM UTF-16 est écrite.

- -

N'utilisez jamais cette option quand l'encodage du fichier de sortie n'est ni UTF-8 ni UTF-16. Consultez également la section UNICODE.

- -
-
-n, --newline FICHIER_ENTRÉE FICHIER_SORTIE …
-
- -

Nouveau mode de fichiers. Convertit le fichier FICHER_ENTRÉE et écrit la sortie dans le fichier FICHIER_SORTIE. Les noms des fichiers doivent être indiqués par paires. Les jokers ne doivent pas être utilisés ou vous perdrez vos fichiers.

- -

La personne qui démarre la conversion dans le nouveau mode (pairé) des fichiers sera le propriétaire du fichier converti. Les permissions de lecture/écriture du nouveau fichier seront les permissions du fichier original moins le umask(1) de la personne qui exécute la conversion.

- -
-
-o, --oldfile FICHIER …
-
- -

Ancien mode de fichiers. Convertit le fichier FICHIER et écrit la sortie dedans. Le programme fonctionne dans ce mode par défaut. Les jokers peuvent être utilisés.

- -

Dans l'ancien mode (en place) des fichiers, les fichiers convertis ont le même propriétaire, groupe et permissions lecture/écriture que le fichier original. Idem quand le fichier est converti par un utilisateur qui a la permission d'écrire dans le fichier (par exemple, root). La conversion est interrompue si il n'est pas possible de conserver les valeurs d'origine. Le changement de propriétaire pourrait signifier que le propriétaire original n'est plus en mesure de lire le fichier. Le changement de groupe pourrait être un risque pour la sécurité. Le fichier pourrait être rendu accessible en lecture par des personnes à qui il n'est pas destiné. La conservation du propriétaire, du groupe et des permissions de lecture/écriture n'est supportée que sous Unix.

- -
-
-q, --quiet
-
- -

Mode silencieux. Supprime les avertissements et les messages. La valeur de sortie est zéro sauf quand de mauvaises options sont utilisées sur la ligne de commande.

- -
-
-r, --remove-bom
-
- -

Supprime la marque d'ordre des octets (BOM). N'écrit pas la BOM dans le fichier de sortie. Ceci est le comportement par défaut lorsque les sauts de lignes sont convertis au format Unix. Consultez aussi l'option -b.

- -
-
-s, --safe
-
- -

Ignore les fichiers binaires (par défaut).

- -
-
-u, --keep-utf16
-
- -

Conserve l'encodage UTF-16 original du fichier d'entrée. Le fichier de sortie sera écrit dans le même encodage UTF-16 (petit ou grand boutien) que le fichier d'entrée. Ceci évite la transformation en UTF-8. Une BOM UTF-16 sera écrite en conséquent. Cette option peut être désactivée avec l'option -ascii.

- -
-
-ul, --assume-utf16le
-
- -

Suppose que le fichier d'entrée est au format UTF-16LE.

- -

Quand il y a un indicateur d'ordre des octets dans le fichier d'entrée, l'indicateur a priorité sur cette option.

- -

Si vous vous êtes trompé sur le format du fichier d'entrée (par exemple, ce n'était pas un fichier UTF16-LE) et que la conversion réussi, vous obtiendrez un fichier UTF-8 contenant le mauvais texte. Vous pouvez récupérer le fichier original avec iconv(1) en convertissant le fichier de sortie UTF-8 vers du UTF-16LE.

- -

La présupposition de l'UTF-16LE fonctionne comme un mode de conversion. En utilisant le mode ascii par défaut, UTF-16LE n'est plus présupposé.

- -
-
-ub, --assume-utf16be
-
- -

Suppose que le fichier d'entrée est au format UTF-16BE.

- -

Cette option fonctionne comme l'option -ul.

- -
-
-v, --verbose
-
- -

Affiche des messages verbeux. Des informations supplémentaires sont affichées à propos des marques d'ordre des octets et du nombre de sauts de lignes convertis.

- -
- -
- -

Suit les liens symboliques et convertit les cibles.

- -
- -
- -

Remplace les liens symboliques par les fichiers convertis (les fichiers cibles originaux restent inchangés).

- -
- -
- -

Ne change pas les liens symboliques ni les cibles (par défaut).

- -
-
-V, --version
-
- -

Affiche les informations de version puis arrête.

- -
-
- -

MODE MAC

- -

En mode normal, les sauts de lignes sont convertis du DOS vers Unix et inversement. Les sauts de lignes Mac ne sont pas convertis.

- -

En mode Mac, les sauts de lignes sont convertis du format Mac au format Unix et inversement. Les sauts de lignes DOS ne sont pas changés.

- -

Pour fonctionner en mode Mac, utilisez l'option en ligne de commande -c mac ou utilisez les commandes mac2unix ou unix2mac.

- -

MODES DE CONVERSION

- -
- -
ascii
-
- -

En mode ascii, seuls les sauts de lignes sont convertis. Ceci est le mode de conversion par défaut.

- -

Bien que le nom de ce mode soit ASCII, qui est un standard 7 bits, ce mode travail en réalité sur 8 bits. Utilisez toujours ce mode lorsque vous convertissez des fichiers Unicode UTF-8.

- -
-
7bit
-
- -

Dans ce mode, tous les caractères 8 bits non ASCII (avec des valeurs entre 128 et 255) sont remplacés par une espace 7 bits.

- -
-
iso
-
- -

Les caractères sont convertis entre un jeu de caractères DOS (code page) et le jeu de caractères ISO-8859-1 (Latin-1) de Unix. Les caractères DOS sans équivalent ISO-8859-1, pour lesquels la conversion n'est pas possible, sont remplacés par un point. La même chose est valable pour les caractères ISO-8859-1 sans équivalent DOS.

- -

Quand seule l'option -iso est utilisée, dos2unix essaie de déterminer le code page actif. Quand ce n'est pas possible, dos2unix utilise le code page CP437 par défaut qui est surtout utilisé aux USA. Pour forcer l'utilisation d'un code page spécifique, utilisez les options -437 (US), -850 (Europe de l'ouest), -860 (portugais), -863 (français canadien) ou -865 (nordique). Le code page CP1252 de Windows (Europe de l'ouest) est également supporté avec l'option -1252. Pour d'autres codes pages, utilisez dos2unix avec iconv(1). Iconv supporte une longue liste de codages de caractères.

- -

N'utilisez jamais la conversion ISO sur des fichiers textes Unicode. Cela va corrompre les fichiers encodés en UTF-8.

- -

Quelques exemples:

- -

Convertir du code page par défaut du DOS au Latin-1 Unix :

- -
    dos2unix -iso -n entrée.txt sortie.txt
- -

Convertir du CP850 du DOS au Latin-1 Unix :

- -
    dos2unix -850 -n entrée.txt sortie.txt
- -

Convertir du CP1252 de Windows au Latin-1 de Unix :

- -
    dos2unix -1252 -n entrée.txt sortie.txt
- -

Convertir le CP1252 de Windows en UTF-8 de Unix (Unicode) :

- -
    iconv -f CP1252 -t UTF-8 entrée.txt | dos2unix > sortie.txt
- -

Convertir du Latin-1 de Unix au code page par défaut de DOS :

- -
    unix2dos -iso -n entrée.txt sortie.txt
- -

Convertir le Latin-1 de Unix en CP850 du DOS :

- -
    unix2dos -850 -n entrée.txt sortie.txt
- -

Convertir le Latin-1 de Unix en CP1252 de Windows :

- -
    unix2dos -1252 -n entrée.txt sortie.txt
- -

Convertir le UTF-8 de Unix (Unicode) en CP1252 de Windows :

- -
    unix2dos < entrée.txt | iconv -f UTF-8 -t CP1252 > sortie.txt
- -

Consultez aussi http://czyborra.com/charsets/codepages.html et http://czyborra.com/charsets/iso8859.html.

- -
-
- -

UNICODE

- -

Codages

- -

Il existe plusieurs codages Unicode. Sous Unix et Linux, les fichiers sont généralement codés en UTF-8. Sous Windows, les fichiers textes Unicode peuvent être codés en UTF-8, UTF-16 ou UTF-16 gros boutien mais ils sont majoritairement codés au format UTF-16.

- -

Conversion

- -

Les fichiers textes Unicode peuvent avoir des sauts de lignes DOS, Unix ou Mac, tout comme les fichiers textes normaux.

- -

Toutes les versions de dos2unix et unix2dos peuvent convertir des fichiers codés en UTF-8 car UTF-8 a été conçu pour être rétro-compatible avec l'ASCII.

- -

Dos2unix et unix2dos, avec le support pour l'Unicode UTF-16, peuvent lire les fichiers textes codés sous forme petit boutien ou gros boutien. Pour savoir si dos2unix a été compilé avec le support UTF-16 tapez dos2unix -V.

- -

Sous Unix/Linux, les fichiers encodés en UTF-16 sont convertis vers l'encodage des caractères de la localisation. Utilisez locale(1) pour découvrir quel encodage de caractères est utilisé. Lorsque la conversion n'est pas possible, une erreur de conversion est produite et le fichier est abandonné.

- -

Sous Windows, les fichiers UTF-16 sont convertis par défaut en UTF-8. Les fichiers textes formatés en UTF-8 sont bien supportés sous Windows et Unix/Linux.

- -

Les codages UTF-16 et UTF-8 sont parfaitement compatibles. Il n'y a pas de pertes lors de la conversion. Lorsqu'une erreur de conversion UTF-16 vers UTF-8 survient, par exemple, quand le fichier d'entrée UTF-16 contient une erreur, le fichier est ignoré.

- -

Quand l'option -u est utilisée, le fichier de sortie est écrit dans le même encodage UTF-16 que le fichier d'entrée. L'option -u empêche la conversion en UTF-8.

- -

Dos2unix et unix2dos n'ont pas d'option pour convertir des fichiers UTF-8 en UTF-16.

- -

Les modes de conversion ISO et 7 bits ne fonctionnent pas sur des fichiers UTF-16.

- -

Marque d'ordre des octets

- -

Les fichiers textes Unicode sous Windows on généralement un indicateur d'ordre des octets (BOM) car de nombreux programmes Windows (y compris Notepad) ajoutent cet indicateur par défaut. Consultez aussi http://fr.wikipedia.org/wiki/Indicateur_d%27ordre_des_octets.

- -

Sous Unix, les fichiers Unicodes n'ont habituellement pas de BOM. Il est supposé que les fichiers textes sont codés selon le codage de l'environnement linguistique.

- -

Dos2unix ne peut détecter que le fichier est au format UTF-16 si le fichier n'a pas de BOM. Quand le fichier UTF-16 n'a pas cet indicateur, dos2unix voit le fichier comme un fichier binaire.

- -

Utilisez l'option -ul ou -ub pour convertir un fichier UTF-16 sans BOM.

- -

Dos2unix, par défaut, n'écrit pas de BOM dans le fichier de sortie. Avec l'option -b, Dos2unix écrit une BOM quand le fichier d'entrée a une BOM.

- -

Unix2dos écrit par défaut une BOM dans le fichier de sortie quand le fichier d'entrée a une BOM. Utilisez l'option -r pour supprimer la BOM.

- -

Dos2unix et unix2dos écrivent toujours une BOM quand l'option -m est utilisée.

- -

Exemples Unicode

- -

Convertir de l'UTF-16 Windows (avec BOM) vers l'UTF-8 de Unix :

- -
    dos2unix -n entrée.txt sortie.txt
- -

Convertir de l'UTF-16LE de Windows (sans BOM) vers l'UTF-8 de Unix :

- -
    dos2unix -ul -n entrée.txt sortie.txt
- -

Convertir de l'UTF-8 de Unix vers l'UTF-8 de Windows avec BOM :

- -
    unix2dos -m -n entrée.txt sortie.txt
- -

Convertir de l'UTF-8 de Unix vers l'UTF-16 de Windows :

- -
    unix2dos < entrée.txt | iconv -f UTF-8 -t UTF-16 > sortie.txt
- -

GB18030

- -

GB18030 est un standard du gouvernement chinois. Tout logiciel vendu en Chine doit officiellement supporter un sous ensemble obligatoire du standard GB18030. Consultez http://fr.wikipedia.org/wiki/GB_18030.

- -

GB18030 est entièrement compatible avec Unicode et peut être considéré comme étant un format de transformation unicode. Comme UTF-8, GB18030 est compatible avec ASCII. GB18030 est aussi compatible avec le code page 936 de Windows aussi connu comme GBK.

- -

Sous Unix/Linux, les fichiers UTF-16 sont convertis en GB18030 quand l'encodage de la localisation est GB18030. Notez que cela ne fonctionnera que si l'emplacement est en Chine. Autrement dit, dans la localisation anglaise britannique en_GB.GB18030, la conversion de UTF-16 vers GB18030 ne fonctionnera pas mais une localisation chinoise zh_CN.GB18030 fonctionnera.

- -

Sous Windows, vous avez besoin de l'option -gb pour convertir UTF-16 en GB18030.

- -

Les fichiers encodés en GB18030 peuvent avoir une marque d'ordre des octets, comme les fichiers Unicode.

- -

EXEMPLES

- -

Lire l'entrée depuis « stdin » et écrire la sortie vers « stdout » :

- -
    dos2unix
-    dos2unix -l -c mac
- -

Convertir et remplacer a.txt. Convertir et remplace b.txt :

- -
    dos2unix a.txt b.txt
-    dos2unix -o a.txt b.txt
- -

Convertir et remplacer a.txt en mode de conversion ascii :

- -
    dos2unix a.txt
- -

Convertir et remplacer a.txt en mode de conversion ascii. Convertir et remplacer b.txt en mode de conversion 7 bits :

- -
    dos2unix a.txt -c 7bit b.txt
-    dos2unix -c ascii a.txt -c 7bit b.txt
-    dos2unix -ascii a.txt -7 b.txt
- -

Convertir a.txt depuis le format Mac vers le format Unix :

- -
    dos2unix -c mac a.txt
-    mac2unix a.txt
- -

Convertir a.txt du format Unix au format Mac :

- -
    unix2dos -c mac a.txt
-    unix2mac a.txt
- -

Convertir et remplacer a.txt tout en conservant la date originale :

- -
    dos2unix -k a.txt
-    dos2unix -k -o a.txt
- -

Convertir a.txt et écrire dans e.txt :

- -
    dos2unix -n a.txt e.txt
- -

Convertir a.txt et écrire dans e.txt. La date de e.txt est la même que celle de a.txt :

- -
    dos2unix -k -n a.txt e.txt
- -

Convertir et remplacer a.txt. Convertir b.txt et écrire dans e.txt :

- -
    dos2unix a.txt -n b.txt e.txt
-    dos2unix -o a.txt -n b.txt e.txt
- -

Convertir c.txt et écrire dans e.txt. Convertir et remplacer a.txt. Convertir et remplacer b.txt. Convertir d.txt et écrire dans f.txt :

- -
    dos2unix -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt
- -

CONVERSIONS RÉCURSIVES

- -

Utilisez dos2unix avec les commandes find(1) et xargs(1) pour convertir récursivement des fichiers textes dans une arborescence de répertoires. Par exemple, pour convertir tous les fichiers .txt dans les répertoires sous le répertoire courant, tapez:

- -
    find . -name *.txt |xargs dos2unix
- -

PARAMÈTRES LINGUISTIQUES

- -
- -
LANG
-
- -

La langue principale est sélectionnée par la variable d'environnement LANG. La variable LANG est composée de plusieurs parties. La première partie est le code de la langue en minuscules. La deuxième partie est le code du pays en majuscules précédé d'un souligné. Elle est facultative. Il y a aussi une troisième partie facultative qui est le codage des caractères précédé par un point. Voici quelques exemples pour un shell au standard POSIX:

- -
    export LANG=fr               Français
-    export LANG=fr_CA            Français, Canada
-    export LANG=fr_BE            Français, Belgique
-    export LANG=es_ES            Espagnol, Espagne
-    export LANG=es_MX            Espagnol, Mexique
-    export LANG=en_US.iso88591   Anglais, USA, codage Latin-1
-    export LANG=en_GB.UTF-8      Anglais, UK, codage UTF-8
- -

La liste complète des codes de langues et de pays est dans le manuel de gettext: http://www.gnu.org/software/gettext/manual/html_node/Usual-Language-Codes.html

- -

Sur les systèmes Unix, vous pouvez utiliser la commande locale(1) pour obtenir des informations sur l'environnement linguistique.

- -
-
LANGUE
-
- -

Avec la variable d'environnement LANGUAGE, vous pouvez spécifier une liste de langues prioritaires séparées par des deux-points. Dos2unix fait passer LANGUAGE avant LANG. Par exemple, pour utiliser le français avant l'anglais: LANGUAGE=fr:en. Vous devez d'abord activer l'environnement linguistique en assignant une valeur autre que « C » à LANG (ou LC_ALL). Ensuite, vous pourrez utiliser la liste de priorité avec la variable LANGUAGE. Voyez également le manuel de gettext: http://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html

- -

Si vous sélectionnez une langue qui n'est pas disponible, vous obtiendrez des messages en anglais standard.

- -
-
DOS2UNIX_LOCALEDIR
-
- -

Grâce à la variable d'environnement DOS2UNIX_LOCALEDIR, la variable LOCALEDIR compilée dans l'application peut être remplacée. LOCALEDIR est utilisée pour trouver les fichiers de langue. La valeur par défaut de GNU est /usr/local/share/locale. L'option --version affiche la valeur de LOCALEDIR utilisée.

- -

Exemple (shell POSIX):

- -
    export DOS2UNIX_LOCALEDIR=$HOME/share/locale
- -
-
- -

VALEUR DE RETOUR

- -

Zéro est retourné en cas de succès. Si une erreur système se produit, la dernière erreur système est retournée. Pour les autres erreurs, 1 est renvoyé.

- -

La valeur de sortie est toujours zéro en mode silencieux sauf quand de mauvaises options sont utilisées sur la ligne de commande.

- -

STANDARDS

- -

http://fr.wikipedia.org/wiki/Fichier_texte

- -

http://fr.wikipedia.org/wiki/Retour_chariot

- -

http://fr.wikipedia.org/wiki/Fin_de_ligne

- -

http://fr.wikipedia.org/wiki/Unicode

- -

AUTEURS

- -

Benjamin Lin - <blin@socs.uts.edu.au>, Bernd Johannes Wuebben (mode mac2unix) - <wuebben@kde.org>, Christian Wurll (ajout de saut de ligne supplémentaire) - <wurll@ira.uka.de>, Erwin Waterlander - <waterlan@xs4all.nl> (Mainteneur)

- -

Page du projet: http://waterlan.home.xs4all.nl/dos2unix.html

- -

Page SourceForge: http://sourceforge.net/projects/dos2unix/

- -

VOIR AUSSI

- -

file(1) find(1) iconv(1) locale(1) xargs(1)

- - - - - - - diff --git a/Tools/dos2unix/share/doc/dos2unix-7.2/fr/dos2unix.txt b/Tools/dos2unix/share/doc/dos2unix-7.2/fr/dos2unix.txt deleted file mode 100644 index 424961a..0000000 --- a/Tools/dos2unix/share/doc/dos2unix-7.2/fr/dos2unix.txt +++ /dev/null @@ -1,625 +0,0 @@ -NOM - dos2unix - Convertit les fichiers textes du format DOS/Mac vers Unix et - inversement - -SYNOPSIS - dos2unix [options] [FICHIER …] [-n FICHIER_ENTRÉE FICHIER_SORTIE …] - unix2dos [options] [FICHIER …] [-n FICHIER_ENTRÉE FICHIER_SORTIE …] - -DESCRIPTION - Le package Dos2unix inclut les utilitaires "dos2unix" et "unix2dos" pour - convertir des fichiers textes au format DOS ou Mac vers le format Unix - et inversement. - - Dans les fichiers textes DOS/Windows, un saut de ligne est une - combinaison de deux caractères: un retour de chariot (CR) suivi d'un - saut de ligne (LF). Dans les fichiers textes Unix, le saut de ligne est - un seul caractère: le saut de ligne (LF). Les fichiers textes Mac, avant - Mac OS X, utilisaient le retour chariot (CR) comme seul caractère. De - nos jours, Mac OS utilise le même style de saut de ligne que Unix (LF). - - Outre les sauts de lignes, Dos2unix convertit aussi le codage des - fichiers. Quelques codes page DOS peuvent être convertis en Latin-1 sous - Unix. L'Unicode des fichiers Windows (UTF-16) peut être converti en - Unicode Unix (UTF-8). - - Les fichiers binaires sont automatiquement ignorés à moins que la - conversion soit forcée. - - Les fichiers non réguliers tels que les répertoires et les FIFOs sont - automatiquement ignorés. - - Les liens symboliques et leur cible sont, par défaut, inchangés. En - option, les liens symboliques peuvent être remplacés ou, au choix, la - sortie peut être écrite dans la cible du lien symbolique. Écrire dans la - cible d'un lien symbolique n'est pas supporté sous Windows. - - Dos2unix a été conçu comme dos2unix sous SunOS/Solaris. Il y a une - différence importante avec la version originale de SunOS/Solaris. Cette - version effectue les conversions en place (ancien mode de fichiers) - tandis que la version originale de SunOS/Solaris ne supporte que la - conversion par paire (nouveau mode de fichier). Voyez aussi les options - "-o" et "-n". - -OPTIONS - -- Traites toutes les options à sa suite comme étant des noms de - fichiers. Utilisez cette option si vous voulez convertir des - fichiers dont le nom commence par un tiret. Par exemple, pour - convertir un fichier nommé « -foo », vous pouvez utiliser cette - commande: - - dos2unix -- -foo - - Ou dans le style des nouveaux fichiers: - - dos2unix -n -- -foo sortie.txt - - -ascii - Convertit uniquement les sauts de lignes. C'est le mode de - conversion par défaut. - - -iso - Convertit le jeu de caractères du DOS vers ISO-8859-1. Voyez aussi - la section des MODES DE CONVERSION. - - -1252 - Utilise le code page 1252 de Windows (Europe de l'ouest). - - -437 - Utilise le code page 437 du DOS (US). C'est le code page par défaut - pour les conversions ISO. - - -850 - Utilise le code page 850 du DOS (Europe de l'ouest). - - -860 - Utilise le code page 860 du DOS (portugais). - - -863 - Utilise le code page 863 du DOS (français canadien). - - -865 - Utilise le code page 865 du DOS (nordique). - - -7 Convertit les caractères 8 bits vers l'espace 7 bits. - - -b, --keep-bom - Conserve la marque d'ordre des octets (BOM). Si le fichier d'entrée - a une BOM, elle est écrite dans le fichier de sortie. C'est le - comportement par défaut quand les sauts de lignes sont convertis au - format DOS. Consultez aussi l'option "-r". - - -c, --convmode MODE_CONV - Change le mode de conversion. MODE_CONV prend l'une des valeurs: - *ascii*, *7bit*, *iso*, *mac*. Ascii est la valeur par défaut. - - -f, --force - Force la conversion de fichiers binaires. - - -gb, --gb18030 - Sous Windows, les fichiers UTF-16 sont convertis en UTF-8 par défaut - sans considération pour les paramètres de la localisation. Utilisez - cette option pour convertir UTF-16 en GB18030. Cette option n'est - disponible que sous Windows. Consultez aussi la section GB18030. - - -h, --help - Affiche l'aide et s'arrête. - - -i[FANIONS], --info[=FANIONS] FICHIER … - Affiche les informations du fichier. Aucune conversion n'est - réalisée. - - Les informations suivantes sont affichées dans cet ordre: le nombre - de sauts de ligne DOS, le nombre de sauts de ligne Unix, le nombre - de sauts de ligne Mac, la marque d'ordre des octets, texte ou - binaire, nom du fichier. - - Exemple de sortie : - - 6 0 0 no_bom text dos.txt - 0 6 0 no_bom text unix.txt - 0 0 6 no_bom text mac.txt - 6 6 6 no_bom text mixed.txt - 50 0 0 UTF-16LE text utf16le.txt - 0 50 0 no_bom text utf8unix.txt - 50 0 0 UTF-8 text utf8dos.txt - 2 418 219 no_bom binary dos2unix.exe - - Des fanions facultatifs peuvent être ajoutés pour changer la sortie. - Un ou plusieurs fanions peuvent être ajoutés. - - d Affiche le nombre de sauts de ligne DOS. - - u Affiche le nombre de sauts de ligne Unix. - - m Affiche le nombre de sauts de ligne Mac. - - b Afficher la marque d'ordre des octets. - - t Affiche si le fichier est texte ou binaire. - - c Affiche uniquement les fichiers qui seraient convertis. - - Avec le fanion "c", dos2unix n'affichera que les fichiers - contenant des sauts de ligne DOS alors que unix2dos n'affichera - que les noms des fichiers aillant des sauts de ligne Unix. - - Exemples: - - Afficher les informations pour tous les fichier *.txt : - - dos2unix -i *.txt - - Afficher uniquement le nombre de sauts de ligne DOS et Unix : - - dos2unix -idu *.txt - - Montrer uniquement la marque d'ordre des octets : - - dos2unix --info=b *.txt - - Liste les fichiers qui ont des sauts de ligne DOS : - - dos2unix -ic *.txt - - Liste les fichiers qui ont des sauts de ligne Unix : - - unix2dos -ic *.txt - - -k, --keepdate - La date du fichier de sortie est la même que celle du fichier - d'entrée. - - -L, --license - Affiche la licence du programme. - - -l, --newline - Ajoute des sauts de lignes additionnels. - - dos2unix: Seuls les sauts de lignes du DOS sont changés en deux - sauts de lignes de Unix. En mode Mac, seuls les sauts de lignes Mac - sont changés en deux sauts de lignes Unix. - - unix2dos: Seuls les sauts de lignes Unix sont changés en deux sauts - de lignes du DOS. En mode Mac, les sauts de lignes Unix sont - remplacés par deux sauts de lignes Mac. - - -m, --add-bom - Écrit une marque d'ordre des octets (BOM) dans le fichier de sortie. - Par défaut une BOM UTF-8 est écrite. - - Lorsque le fichier d'entrée est en UTF-16 et que l'option "-u" est - utilisée, une BOM UTF-16 est écrite. - - N'utilisez jamais cette option quand l'encodage du fichier de sortie - n'est ni UTF-8 ni UTF-16. Consultez également la section UNICODE. - - -n, --newline FICHIER_ENTRÉE FICHIER_SORTIE … - Nouveau mode de fichiers. Convertit le fichier FICHER_ENTRÉE et - écrit la sortie dans le fichier FICHIER_SORTIE. Les noms des - fichiers doivent être indiqués par paires. Les jokers *ne* doivent - *pas* être utilisés ou vous *perdrez* vos fichiers. - - La personne qui démarre la conversion dans le nouveau mode (pairé) - des fichiers sera le propriétaire du fichier converti. Les - permissions de lecture/écriture du nouveau fichier seront les - permissions du fichier original moins le umask(1) de la personne qui - exécute la conversion. - - -o, --oldfile FICHIER … - Ancien mode de fichiers. Convertit le fichier FICHIER et écrit la - sortie dedans. Le programme fonctionne dans ce mode par défaut. Les - jokers peuvent être utilisés. - - Dans l'ancien mode (en place) des fichiers, les fichiers convertis - ont le même propriétaire, groupe et permissions lecture/écriture que - le fichier original. Idem quand le fichier est converti par un - utilisateur qui a la permission d'écrire dans le fichier (par - exemple, root). La conversion est interrompue si il n'est pas - possible de conserver les valeurs d'origine. Le changement de - propriétaire pourrait signifier que le propriétaire original n'est - plus en mesure de lire le fichier. Le changement de groupe pourrait - être un risque pour la sécurité. Le fichier pourrait être rendu - accessible en lecture par des personnes à qui il n'est pas destiné. - La conservation du propriétaire, du groupe et des permissions de - lecture/écriture n'est supportée que sous Unix. - - -q, --quiet - Mode silencieux. Supprime les avertissements et les messages. La - valeur de sortie est zéro sauf quand de mauvaises options sont - utilisées sur la ligne de commande. - - -r, --remove-bom - Supprime la marque d'ordre des octets (BOM). N'écrit pas la BOM dans - le fichier de sortie. Ceci est le comportement par défaut lorsque - les sauts de lignes sont convertis au format Unix. Consultez aussi - l'option "-b". - - -s, --safe - Ignore les fichiers binaires (par défaut). - - -u, --keep-utf16 - Conserve l'encodage UTF-16 original du fichier d'entrée. Le fichier - de sortie sera écrit dans le même encodage UTF-16 (petit ou grand - boutien) que le fichier d'entrée. Ceci évite la transformation en - UTF-8. Une BOM UTF-16 sera écrite en conséquent. Cette option peut - être désactivée avec l'option "-ascii". - - -ul, --assume-utf16le - Suppose que le fichier d'entrée est au format UTF-16LE. - - Quand il y a un indicateur d'ordre des octets dans le fichier - d'entrée, l'indicateur a priorité sur cette option. - - Si vous vous êtes trompé sur le format du fichier d'entrée (par - exemple, ce n'était pas un fichier UTF16-LE) et que la conversion - réussi, vous obtiendrez un fichier UTF-8 contenant le mauvais texte. - Vous pouvez récupérer le fichier original avec iconv(1) en - convertissant le fichier de sortie UTF-8 vers du UTF-16LE. - - La présupposition de l'UTF-16LE fonctionne comme un *mode de - conversion*. En utilisant le mode *ascii* par défaut, UTF-16LE n'est - plus présupposé. - - -ub, --assume-utf16be - Suppose que le fichier d'entrée est au format UTF-16BE. - - Cette option fonctionne comme l'option "-ul". - - -v, --verbose - Affiche des messages verbeux. Des informations supplémentaires sont - affichées à propos des marques d'ordre des octets et du nombre de - sauts de lignes convertis. - - -F, --follow-symlink - Suit les liens symboliques et convertit les cibles. - - -R, --replace-symlink - Remplace les liens symboliques par les fichiers convertis (les - fichiers cibles originaux restent inchangés). - - -S, --skip-symlink - Ne change pas les liens symboliques ni les cibles (par défaut). - - -V, --version - Affiche les informations de version puis arrête. - -MODE MAC - En mode normal, les sauts de lignes sont convertis du DOS vers Unix et - inversement. Les sauts de lignes Mac ne sont pas convertis. - - En mode Mac, les sauts de lignes sont convertis du format Mac au format - Unix et inversement. Les sauts de lignes DOS ne sont pas changés. - - Pour fonctionner en mode Mac, utilisez l'option en ligne de commande "-c - mac" ou utilisez les commandes "mac2unix" ou "unix2mac". - -MODES DE CONVERSION - ascii - En mode "ascii", seuls les sauts de lignes sont convertis. Ceci est - le mode de conversion par défaut. - - Bien que le nom de ce mode soit ASCII, qui est un standard 7 bits, - ce mode travail en réalité sur 8 bits. Utilisez toujours ce mode - lorsque vous convertissez des fichiers Unicode UTF-8. - - 7bit - Dans ce mode, tous les caractères 8 bits non ASCII (avec des valeurs - entre 128 et 255) sont remplacés par une espace 7 bits. - - iso Les caractères sont convertis entre un jeu de caractères DOS (code - page) et le jeu de caractères ISO-8859-1 (Latin-1) de Unix. Les - caractères DOS sans équivalent ISO-8859-1, pour lesquels la - conversion n'est pas possible, sont remplacés par un point. La même - chose est valable pour les caractères ISO-8859-1 sans équivalent - DOS. - - Quand seule l'option "-iso" est utilisée, dos2unix essaie de - déterminer le code page actif. Quand ce n'est pas possible, dos2unix - utilise le code page CP437 par défaut qui est surtout utilisé aux - USA. Pour forcer l'utilisation d'un code page spécifique, utilisez - les options -437 (US), -850 (Europe de l'ouest), -860 (portugais), - -863 (français canadien) ou -865 (nordique). Le code page CP1252 de - Windows (Europe de l'ouest) est également supporté avec l'option - -1252. Pour d'autres codes pages, utilisez dos2unix avec iconv(1). - Iconv supporte une longue liste de codages de caractères. - - N'utilisez jamais la conversion ISO sur des fichiers textes Unicode. - Cela va corrompre les fichiers encodés en UTF-8. - - Quelques exemples: - - Convertir du code page par défaut du DOS au Latin-1 Unix : - - dos2unix -iso -n entrée.txt sortie.txt - - Convertir du CP850 du DOS au Latin-1 Unix : - - dos2unix -850 -n entrée.txt sortie.txt - - Convertir du CP1252 de Windows au Latin-1 de Unix : - - dos2unix -1252 -n entrée.txt sortie.txt - - Convertir le CP1252 de Windows en UTF-8 de Unix (Unicode) : - - iconv -f CP1252 -t UTF-8 entrée.txt | dos2unix > sortie.txt - - Convertir du Latin-1 de Unix au code page par défaut de DOS : - - unix2dos -iso -n entrée.txt sortie.txt - - Convertir le Latin-1 de Unix en CP850 du DOS : - - unix2dos -850 -n entrée.txt sortie.txt - - Convertir le Latin-1 de Unix en CP1252 de Windows : - - unix2dos -1252 -n entrée.txt sortie.txt - - Convertir le UTF-8 de Unix (Unicode) en CP1252 de Windows : - - unix2dos < entrée.txt | iconv -f UTF-8 -t CP1252 > sortie.txt - - Consultez aussi et - . - -UNICODE - Codages - Il existe plusieurs codages Unicode. Sous Unix et Linux, les fichiers - sont généralement codés en UTF-8. Sous Windows, les fichiers textes - Unicode peuvent être codés en UTF-8, UTF-16 ou UTF-16 gros boutien mais - ils sont majoritairement codés au format UTF-16. - - Conversion - Les fichiers textes Unicode peuvent avoir des sauts de lignes DOS, Unix - ou Mac, tout comme les fichiers textes normaux. - - Toutes les versions de dos2unix et unix2dos peuvent convertir des - fichiers codés en UTF-8 car UTF-8 a été conçu pour être rétro-compatible - avec l'ASCII. - - Dos2unix et unix2dos, avec le support pour l'Unicode UTF-16, peuvent - lire les fichiers textes codés sous forme petit boutien ou gros boutien. - Pour savoir si dos2unix a été compilé avec le support UTF-16 tapez - "dos2unix -V". - - Sous Unix/Linux, les fichiers encodés en UTF-16 sont convertis vers - l'encodage des caractères de la localisation. Utilisez locale(1) pour - découvrir quel encodage de caractères est utilisé. Lorsque la conversion - n'est pas possible, une erreur de conversion est produite et le fichier - est abandonné. - - Sous Windows, les fichiers UTF-16 sont convertis par défaut en UTF-8. - Les fichiers textes formatés en UTF-8 sont bien supportés sous Windows - et Unix/Linux. - - Les codages UTF-16 et UTF-8 sont parfaitement compatibles. Il n'y a pas - de pertes lors de la conversion. Lorsqu'une erreur de conversion UTF-16 - vers UTF-8 survient, par exemple, quand le fichier d'entrée UTF-16 - contient une erreur, le fichier est ignoré. - - Quand l'option "-u" est utilisée, le fichier de sortie est écrit dans le - même encodage UTF-16 que le fichier d'entrée. L'option "-u" empêche la - conversion en UTF-8. - - Dos2unix et unix2dos n'ont pas d'option pour convertir des fichiers - UTF-8 en UTF-16. - - Les modes de conversion ISO et 7 bits ne fonctionnent pas sur des - fichiers UTF-16. - - Marque d'ordre des octets - Les fichiers textes Unicode sous Windows on généralement un indicateur - d'ordre des octets (BOM) car de nombreux programmes Windows (y compris - Notepad) ajoutent cet indicateur par défaut. Consultez aussi - . - - Sous Unix, les fichiers Unicodes n'ont habituellement pas de BOM. Il est - supposé que les fichiers textes sont codés selon le codage de - l'environnement linguistique. - - Dos2unix ne peut détecter que le fichier est au format UTF-16 si le - fichier n'a pas de BOM. Quand le fichier UTF-16 n'a pas cet indicateur, - dos2unix voit le fichier comme un fichier binaire. - - Utilisez l'option "-ul" ou "-ub" pour convertir un fichier UTF-16 sans - BOM. - - Dos2unix, par défaut, n'écrit pas de BOM dans le fichier de sortie. Avec - l'option "-b", Dos2unix écrit une BOM quand le fichier d'entrée a une - BOM. - - Unix2dos écrit par défaut une BOM dans le fichier de sortie quand le - fichier d'entrée a une BOM. Utilisez l'option "-r" pour supprimer la - BOM. - - Dos2unix et unix2dos écrivent toujours une BOM quand l'option "-m" est - utilisée. - - Exemples Unicode - Convertir de l'UTF-16 Windows (avec BOM) vers l'UTF-8 de Unix : - - dos2unix -n entrée.txt sortie.txt - - Convertir de l'UTF-16LE de Windows (sans BOM) vers l'UTF-8 de Unix : - - dos2unix -ul -n entrée.txt sortie.txt - - Convertir de l'UTF-8 de Unix vers l'UTF-8 de Windows avec BOM : - - unix2dos -m -n entrée.txt sortie.txt - - Convertir de l'UTF-8 de Unix vers l'UTF-16 de Windows : - - unix2dos < entrée.txt | iconv -f UTF-8 -t UTF-16 > sortie.txt - -GB18030 - GB18030 est un standard du gouvernement chinois. Tout logiciel vendu en - Chine doit officiellement supporter un sous ensemble obligatoire du - standard GB18030. Consultez . - - GB18030 est entièrement compatible avec Unicode et peut être considéré - comme étant un format de transformation unicode. Comme UTF-8, GB18030 - est compatible avec ASCII. GB18030 est aussi compatible avec le code - page 936 de Windows aussi connu comme GBK. - - Sous Unix/Linux, les fichiers UTF-16 sont convertis en GB18030 quand - l'encodage de la localisation est GB18030. Notez que cela ne - fonctionnera que si l'emplacement est en Chine. Autrement dit, dans la - localisation anglaise britannique "en_GB.GB18030", la conversion de - UTF-16 vers GB18030 ne fonctionnera pas mais une localisation chinoise - "zh_CN.GB18030" fonctionnera. - - Sous Windows, vous avez besoin de l'option "-gb" pour convertir UTF-16 - en GB18030. - - Les fichiers encodés en GB18030 peuvent avoir une marque d'ordre des - octets, comme les fichiers Unicode. - -EXEMPLES - Lire l'entrée depuis « stdin » et écrire la sortie vers « stdout » : - - dos2unix - dos2unix -l -c mac - - Convertir et remplacer a.txt. Convertir et remplace b.txt : - - dos2unix a.txt b.txt - dos2unix -o a.txt b.txt - - Convertir et remplacer a.txt en mode de conversion ascii : - - dos2unix a.txt - - Convertir et remplacer a.txt en mode de conversion ascii. Convertir et - remplacer b.txt en mode de conversion 7 bits : - - dos2unix a.txt -c 7bit b.txt - dos2unix -c ascii a.txt -c 7bit b.txt - dos2unix -ascii a.txt -7 b.txt - - Convertir a.txt depuis le format Mac vers le format Unix : - - dos2unix -c mac a.txt - mac2unix a.txt - - Convertir a.txt du format Unix au format Mac : - - unix2dos -c mac a.txt - unix2mac a.txt - - Convertir et remplacer a.txt tout en conservant la date originale : - - dos2unix -k a.txt - dos2unix -k -o a.txt - - Convertir a.txt et écrire dans e.txt : - - dos2unix -n a.txt e.txt - - Convertir a.txt et écrire dans e.txt. La date de e.txt est la même que - celle de a.txt : - - dos2unix -k -n a.txt e.txt - - Convertir et remplacer a.txt. Convertir b.txt et écrire dans e.txt : - - dos2unix a.txt -n b.txt e.txt - dos2unix -o a.txt -n b.txt e.txt - - Convertir c.txt et écrire dans e.txt. Convertir et remplacer a.txt. - Convertir et remplacer b.txt. Convertir d.txt et écrire dans f.txt : - - dos2unix -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt - -CONVERSIONS RÉCURSIVES - Utilisez dos2unix avec les commandes find(1) et xargs(1) pour convertir - récursivement des fichiers textes dans une arborescence de répertoires. - Par exemple, pour convertir tous les fichiers .txt dans les répertoires - sous le répertoire courant, tapez: - - find . -name *.txt |xargs dos2unix - -PARAMÈTRES LINGUISTIQUES - LANG - La langue principale est sélectionnée par la variable - d'environnement LANG. La variable LANG est composée de plusieurs - parties. La première partie est le code de la langue en minuscules. - La deuxième partie est le code du pays en majuscules précédé d'un - souligné. Elle est facultative. Il y a aussi une troisième partie - facultative qui est le codage des caractères précédé par un point. - Voici quelques exemples pour un shell au standard POSIX: - - export LANG=fr Français - export LANG=fr_CA Français, Canada - export LANG=fr_BE Français, Belgique - export LANG=es_ES Espagnol, Espagne - export LANG=es_MX Espagnol, Mexique - export LANG=en_US.iso88591 Anglais, USA, codage Latin-1 - export LANG=en_GB.UTF-8 Anglais, UK, codage UTF-8 - - La liste complète des codes de langues et de pays est dans le manuel - de gettext: - - - Sur les systèmes Unix, vous pouvez utiliser la commande locale(1) - pour obtenir des informations sur l'environnement linguistique. - - LANGUE - Avec la variable d'environnement LANGUAGE, vous pouvez spécifier une - liste de langues prioritaires séparées par des deux-points. Dos2unix - fait passer LANGUAGE avant LANG. Par exemple, pour utiliser le - français avant l'anglais: "LANGUAGE=fr:en". Vous devez d'abord - activer l'environnement linguistique en assignant une valeur autre - que « C » à LANG (ou LC_ALL). Ensuite, vous pourrez utiliser la - liste de priorité avec la variable LANGUAGE. Voyez également le - manuel de gettext: - - - Si vous sélectionnez une langue qui n'est pas disponible, vous - obtiendrez des messages en anglais standard. - - DOS2UNIX_LOCALEDIR - Grâce à la variable d'environnement DOS2UNIX_LOCALEDIR, la variable - LOCALEDIR compilée dans l'application peut être remplacée. LOCALEDIR - est utilisée pour trouver les fichiers de langue. La valeur par - défaut de GNU est "/usr/local/share/locale". L'option --version - affiche la valeur de LOCALEDIR utilisée. - - Exemple (shell POSIX): - - export DOS2UNIX_LOCALEDIR=$HOME/share/locale - -VALEUR DE RETOUR - Zéro est retourné en cas de succès. Si une erreur système se produit, la - dernière erreur système est retournée. Pour les autres erreurs, 1 est - renvoyé. - - La valeur de sortie est toujours zéro en mode silencieux sauf quand de - mauvaises options sont utilisées sur la ligne de commande. - -STANDARDS - - - - - - - - -AUTEURS - Benjamin Lin - , Bernd Johannes Wuebben (mode - mac2unix) - , Christian Wurll (ajout de saut de ligne - supplémentaire) - , Erwin Waterlander - - (Mainteneur) - - Page du projet: - - Page SourceForge: - -VOIR AUSSI - file(1) find(1) iconv(1) locale(1) xargs(1) - diff --git a/Tools/dos2unix/share/doc/dos2unix-7.2/nl/dos2unix.htm b/Tools/dos2unix/share/doc/dos2unix-7.2/nl/dos2unix.htm deleted file mode 100644 index 4db3eb4..0000000 --- a/Tools/dos2unix/share/doc/dos2unix-7.2/nl/dos2unix.htm +++ /dev/null @@ -1,654 +0,0 @@ - - - - -dos2unix 7.2 - DOS/Mac naar Unix en vice versa tekstbestand formaat omzetter - - - - - - - - - - -

NAAM

- -

dos2unix - omzetter van tekstbestandsindelingen, van DOS/Mac naar Unix en vice versa

- -

OVERZICHT

- -
    dos2unix [opties] [BESTAND ...] [-n INVOERBESTAND UITVOERBESTAND ...]
-    unix2dos [opties] [BESTAND ...] [-n INVOERBESTAND UITVOERBESTAND ...]
- -

BESCHRIJVING

- -

Het Dos2unix pakket bevat de toepassingen dos2unix en unix2dos om platte tekstbestanden in DOS- of Mac-indeling naar Unix-indeling om te zetten, en vice versa.

- -

In DOS/Windows-tekstbestanden bestaat een regeleinde uit een combinatie van twee tekens: een 'Carriage Return' (CR) gevolgd door een 'Line Feed' (LF). In Unix-tekstbestanden bestaat een regeleinde uit één enkel 'Newline'-teken, dat gelijk is aan een DOS 'Line Feed'-teken (LF). In Mac-tekstbestanden, van vóór Mac OS X, bestaan regeleindes uit één enkel 'Carriage Return'-teken. Mac OS X is op Unix gebaseerd en heeft dezelfde regeleindes als Unix.

- -

Naast regeleindes kan Dos2unix ook de codering van bestanden converteren. Enkele DOS-codetabellen kunnen omgezet worden naar Unix Latin-1. En Windows Unicode-bestanden (UTF-16) kunnen geconverteerd worden naar Unix Unicode-bestanden (UTF-8).

- -

Binaire bestanden worden automatisch overgeslagen, behalve als de omzetting geforceerd wordt.

- -

Niet-reguliere bestanden, zoals mappen en FIFO's, worden automatisch overgeslagen.

- -

Symbolische koppelingen en hun doelen blijven standaard onaangeroerd. Optioneel kunnen symbolische koppelingen worden vervangen, of de uitvoer kan naar het doel van de symbolische koppeling worden geschreven. Op Windows wordt het schrijven naar het doel van een symbolische koppeling niet ondersteund.

- -

Dos2unix is gemodelleerd naar dos2unix op SunOS/Solaris, maar er is één belangrijk verschil: deze versie van dos2unix voert standaard een vervangende conversie uit (oud-bestand-modus) terwijl de oorspronkelijke SunOS/Solaris-versie alleen de gepaarde conversie (nieuw-bestand-modus) kent. Zie ook de opties -o en -n.

- -

OPTIES

- -
- -
--
-
- -

Alle volgende opties als bestandsnamen behandelen. Gebruik deze optie als u een bestand wilt converteren waarvan de naam met een streepje begint. Bijvoorbeeld, om een bestand genaamd "-foo" om te zetten, gebruikt u de volgende opdracht:

- -
    dos2unix -- -foo
- -

Of in nieuw-bestand-modus:

- -
    dos2unix -n -- -foo uit.txt
- -
-
-ascii
-
- -

Alleen regeleindes converteren. Dit is de standaardconversiemodus.

- -
-
-iso
-
- -

Conversie tussen de tekensets DOS en ISO-8859-1. Zie ook de sectie CONVERSIEMODI.

- -
-
-1252
-
- -

Windows-codetabel 1252 (West-Europees) gebruiken.

- -
-
-437
-
- -

DOS-codetabel 437 (VS) gebruiken. Dit is de standaard codetabel die gebruikt wordt bij ISO-conversie.

- -
-
-850
-
- -

DOS-codetabel 850 (West-Europees) gebruiken.

- -
-
-860
-
- -

DOS-codetabel 860 (Portugees) gebruiken.

- -
-
-863
-
- -

DOS-codetabel 863 (Canadees Frans) gebruiken.

- -
-
-865
-
- -

DOS-codetabel 865 (Scandinavisch) gebruiken.

- -
-
-7
-
- -

Lettertekens met het achtste bit gezet converteren naar spaties.

- -
-
-b, --keep-bom
-
- -

Een Byte-Order-Mark (BOM) behouden. Als het invoerbestand een BOM bevat, dan wordt ook een BOM naar het uitvoerbestand geschreven. Dit is het standaardgedrag bij conversie naar DOS. Zie ook optie -r.

- -
-
-c, --convmode CONVERSIEMODUS
-
- -

De te gebruiken conversiemodus. CONVERSIEMODUS kan zijn: ascii, 7bit, iso, of mac, waarbij ascii de standaardinstelling is.

- -
-
-f, --force
-
- -

Conversie van binaire bestanden afdwingen.

- -
-
-gb, --gb18030
-
- -

Op Windows worden UTF-16-bestanden standaard naar UTF-8 geconverteerd, ongeacht de ingestelde taalregio. Gebruik deze optie om UTF-16-bestanden naar GB18030 te converteren. Deze optie is alleen beschikbaar op Windows. Zie ook de sectie GB18030.

- -
-
-h, --help
-
- -

Een hulptekst tonen.

- -
-
-i[VLAGGEN], --info[=VLAGGEN] BESTAND...
-
- -

Bestandsinformatie tonen. Er wordt niets geconverteerd.

- -

De volgende informatie wordt weergegeven, in deze volgorde: het aantal DOS-regeleindes, het aantal Unix-regeleindes, het aantal Mac-regeleindes, de Byte-Order-Mark, of het een tekst- of binair bestand is, en de bestandsnaam.

- -

Voorbeelduitvoer:

- -
     6       0       0  no_bom    text    dos.txt
-     0       6       0  no_bom    text    unix.txt
-     0       0       6  no_bom    text    mac.txt
-     6       6       6  no_bom    text    mixed.txt
-    50       0       0  UTF-16LE  text    utf16le.txt
-     0      50       0  no_bom    text    utf8unix.txt
-    50       0       0  UTF-8     text    utf8dos.txt
-     2     418     219  no_bom    binary  dos2unix.exe
- -

Bij de optie kunnen één of meer vlaggen meegegeven worden om de uitvoer te beperken.

- -
- -
d
-
- -

Het aantal DOS-regeleindes tonen.

- -
-
u
-
- -

Het aantal Unix-regeleindes tonen.

- -
-
m
-
- -

Het aantal Mac-regeleindes tonen.

- -
-
b
-
- -

De Byte-Order-Mark tonen.

- -
-
t
-
- -

Tonen of het bestand tekst is of binair.

- -
-
c
-
- -

Alleen de namen tonen van de bestanden die geconverteerd zouden worden.

- -

Met de vlag c toont dos2unix alleen de bestanden die DOS-regeleindes bevatten, en unix2dos alleen de bestanden die Unix-regeleindes bevatten.

- -
-
- -

Voorbeelden:

- -

Informatie weergeven voor alle bestanden met de extensie 'txt':

- -
    dos2unix -i *.txt
- -

Alleen de aantallen DOS-regeleindes en Unix-regeleindes tonen:

- -
    dos2unix -idu *.txt
- -

Alleen de Byte-Order-Mark tonen:

- -
    dos2unix --info=b *.txt
- -

De bestanden opsommen die DOS-regeleindes bevatten:

- -
    dos2unix -ic *.txt
- -

De bestanden opsommen die Unix-regeleindes bevatten:

- -
    unix2dos -ic *.txt
- -
-
-k, --keepdate
-
- -

Het tijdsstempel van het invoerbestand behouden voor het uitvoerbestand.

- -
-
-L, --license
-
- -

De softwarelicentie tonen.

- -
-
-l, --newline
-
- -

Een extra regeleinde toevoegen.

- -

dos2unix: Alleen DOS-regeleindes worden omgezet naar twee Unix-regeleindes. In Mac-modus worden alleen Mac-regeleindes omgezet naar twee Unix-regeleindes.

- -

unix2dos: Alleen Unix-regeleindes worden omgezet naar twee DOS-regeleindes. In Mac-modus worden Unix-regeleindes omgezet naar twee Mac-regeleindes.

- -
-
-m, --add-bom
-
- -

Een Byte-Order-Mark (BOM) naar het uitvoerbestand schrijven. Standaard wordt een UTF-8-BOM geschreven.

- -

Als het invoerbestand in UTF-16 is, en de optie -u is gegeven, dan wordt een UTF-16-BOM geschreven.

- -

Gebruik deze optie nooit als de codering van het uitvoerbestand niet UTF-8 of UTF-16 is. Zie ook de sectie UNICODE.

- -
-
-n, --newfile INVOERBESTAND UITVOERBESTAND ...
-
- -

Nieuw-bestand-modus. Het bestand INVOERBESTAND converteren en naar bestand UITVOERBESTAND schrijven. Bestandsnamen moeten opgegeven worden in paren. Jokertekens moeten nietgebruikt worden, anders verlies je de bestanden.

- -

De gebruiker die de conversie start in nieuw-bestand (gepaarde) modus wordt de eigenaar van het geconverteerde bestand. De lees/schrijf-toegangsrechten van het nieuwe bestand worden de toegangsrechten van het originele bestand minus de umask(1) van de gebruiker die de conversie draait.

- -
-
-o, --oldfile BESTAND ...
-
- -

Oud-bestand-modus. Het bestand BESTAND converteren en overschrijven. Dit is de standaard modus. Jokertekens kunnen gebruikt worden.

- -

In oud-bestand (vervangende) modus krijgt het geconverteerde bestand dezelfde eigenaar, groep en lees/schrijf-rechten als het originele bestand. Ook wanneer het bestand wordt omgezet door een andere gebruiker die schrijfrechten heeft op het bestand (b.v. gebruiker root). De omzetting wordt afgebroken wanneer het niet mogelijk is de originele waardes te behouden. Verandering van eigenaar kan betekenen dat de originele eigenaar het bestand niet meer kan lezen. Verandering van groep zou een veiligheidsrisico kunnen zijn, het bestand zou leesbaar kunnen worden voor personen voor wie het niet bestemd is. Behoud van eigenaar, groep en lees/schrijf-rechten wordt alleen ondersteund op Unix.

- -
-
-q, --quiet
-
- -

Stille werking. Alle waarschuwingen onderdrukken. De aflsuitwaarde is nul, behalve wanneer verkeerde opties worden gegeven.

- -
-
-r, --remove-bom
-
- -

Een Byte-Order-Mark (BOM) verwijderen. Er wordt geen BOM naar het uitvoerbestand geschreven. Dit is het standaardgedrag bij conversie naar Unix. Zie ook optie -b.

- -
-
-s, --safe
-
- -

Binaire bestanden overslaan (standaard).

- -
-
-u, --keep-utf16
-
- -

De originele UTF-16-codering van het invoerbestand behouden. Het uitvoerbestand wordt in dezelfde UTF-16-codering (little endian of big endian) geschreven als het invoerbestand. Dit voorkomt conversie naar UTF-8. Er wordt ook een corresponderende UTF-16-BOM geschreven. Deze optie kan uitgeschakeld worden met de optie -ascii.

- -
-
-ul, --assume-utf16le
-
- -

Veronderstellen dat de indeling van het invoerbestand UTF-16LE is.

- -

Wanneer het invoerbestand een Byte-Order-Mark (BOM) bevat, dan gaat deze BOM vóór deze optie.

- -

Wanneer een verkeerde aanname is gemaakt (het invoerbestand was geen UTF-16LE) en de conversie verliep met succes, dan krijgt u een UTF-8-bestand met verkeerde tekst. De verkeerde conversie kan ongedaan worden gemaakt door met iconv(1) het UTF-8-uitvoerbestand terug om te zetten naar UTF-16LE. Dit zal het originele bestand terug brengen.

- -

De aanname van UTF-16LE werkt als een conversiemodus. Door de standaardmodus ascii in te schakelen wordt de UTF-16LE-veronderstelling uitgeschakeld.

- -
-
-ub, --assume-utf16be
-
- -

Veronderstellen dat de indeling van het invoerbestand UTF-16BE is.

- -

Deze optie werkt hetzelfde als optie -ul.

- -
-
-v, --verbose
-
- -

Extra meldingen weergeven. Er wordt extra informatie getoond over Byte-Order-Marks en het aantal geconverteerde regeleindes.

- -
- -
- -

Symbolische koppelingen volgen en de doelen converteren.

- -
- -
- -

Symbolische koppelingen vervangen door geconverteerde bestanden (de originele doelbestanden blijven ongewijzigd).

- -
- -
- -

Symbolische koppelingen en doelen ongewijzigd laten (standaard).

- -
-
-V, --version
-
- -

Versie-informatie tonen.

- -
-
- -

MAC-MODUS

- -

In normale modus worden DOS-regeleindes naar Unix omgezet en vice versa. Mac-regeleindes worden niet omgezet.

- -

In Mac-modus worden Mac-regeleindes naar Unix omgezet en vice versa. DOS-regeleindes blijven ongewijzigd.

- -

Om in Mac-modus te draaien kunt u de opdrachtregeloptie -c mac gebruiken, of de opdrachten mac2unix of unix2mac.

- -

CONVERSIEMODI

- -
- -
ascii
-
- -

In modus ascii worden alleen regeleindes omgezet. Dit is de standaardmodus.

- -

Hoewel de naam van deze modus ASCII is, wat een 7-bits standaard is, is de werkelijke modus 8-bits. Gebruik altijd deze modus wanneer u Unicode UTF-8-bestanden omzet.

- -
-
7bit
-
- -

Alle 8-bits niet-ASCII lettertekens (met waardes van 128 t/m 255) worden omgezet naar een 7-bits spatie.

- -
-
iso
-
- -

Tekens worden omgezet tussen een DOS-tekenset (codetabel) en de ISO-tekenset ISO-8859-1 (Latin-1) op Unix. DOS-tekens zonder een ISO-8859-1-equivalent, waarvoor dus geen omzetting mogelijk is, worden omgezet in een punt. Hetzelfde geldt voor ISO-8859-1-tekens zonder DOS-tegenhanger.

- -

Wanneer alleen optie -iso gebruikt wordt, zal dos2unix proberen de actieve codetabel te gebruiken. Als dat niet mogelijk is wordt codetabel CP437 gebruikt, die vooral in de VS gebruikt wordt. Om een bepaalde codetabel te forceren, kunt u de opties -850 (West-Europees), -860 (Portugees), -863 (Canadees Frans) of -865 (Scandinavisch) gebruiken. Windows-codetabel CP1252 (West-Europees) wordt ook ondersteund met optie -1252. Gebruik voor andere codetabellen dos2unix in combinatie met iconv(1). Iconv kan omzetten tussen een lange lijst tekensetcoderingen.

- -

Gebruik ISO-conversie nooit op Unicode-tekstbestanden. Het zal UTF-8-gecodeerde bestanden beschadigen.

- -

Enkele voorbeelden:

- -

Omzetten van de standaard DOS-codetabel naar Unix Latin-1:

- -
    dos2unix -iso -n in.txt uit.txt
- -

Omzetten van DOS CP850 naar Unix Latin-1:

- -
    dos2unix -850 -n in.txt uit.txt
- -

Omzetten van Windows CP1252 naar Unix Latin-1:

- -
    dos2unix -1252 -n in.txt uit.txt
- -

Omzetten van Windows CP1252 naar Unix UTF-8 (Unicode):

- -
    iconv -f CP1252 -t UTF-8 in.txt | dos2unix > uit.txt
- -

Omzetten van Unix Latin-1 naar de standaard DOS-codetabel:

- -
    unix2dos -iso -n in.txt uit.txt
- -

Omzetten van Unix Latin-1 naar DOS CP850:

- -
    unix2dos -850 -n in.txt uit.txt
- -

Omzetten van Unix Latin-1 naar Windows CP1252:

- -
    unix2dos -1252 -n in.txt uit.txt
- -

Omzetten van Unix UTF-8 (Unicode) naar Windows CP1252:

- -
    unix2dos < in.txt | iconv -f UTF-8 -t CP1252 > uit.txt
- -

Zie ook http://czyborra.com/charsets/codepages.html en http://czyborra.com/charsets/iso8859.html.

- -
-
- -

UNICODE

- -

Coderingen

- -

Er bestaan verschillende Unicode-coderingen. Op Unix en Linux zijn Unicode-bestanden typisch gecodeerd in UTF-8. Op Windows kunnen Unicode-tekstbestanden gecodeerd zijn in UTF-8, UTF-16 of UTF-16 big endian, maar ze zijn meestal gecodeerd in UTF-16.

- -

Conversie

- -

Unicode-tekstbestanden kunnen DOS-, Unix- of Mac-regeleindes hebben, net als reguliere tekstbestanden.

- -

Alle versies van dos2unix en unix2dos kunnen UTF-8-gecodeerde bestanden omzetten, want UTF-8 is ontworpen op compatibiliteit met ASCII.

- -

Dos2unix en unix2dos met Unicode UTF-16-ondersteuning kunnen little en big endian UTF-16-gecodeerde tekstbestanden lezen. Om er achter te komen of dos2unix gebouwd is met UTF-16- ondersteuning, typt u dos2unix -V.

- -

Op Unix/Linux worden UTF-16-bestanden geconverteerd naar de codering van de ingestelde taalregio. Gebruik de opdracht locale(1) om te zien wat de ingestelde codering is. Wanneer conversie niet mogelijk is, treedt er een fout op en wordt het bestand overgeslagen.

- -

Op Windows worden UTF-16-bestanden standaard naar UTF-8 geconverteerd. UTF-8-tekstbestanden worden alom goed ondersteund, zowel op Windows als Unix/Linux.

- -

De UTF-16- en UTF-8-coderingen zijn volledig compatibel, er gaat bij het converteren niets verloren. Als er tijdens de conversie van UTF-16 naar UTF-8 een fout optreedt, bijvoorbeeld omdat het UTF-16-invoerbestand een fout bevat, dan wordt het bestand overgeslagen.

- -

Wanneer -u gebruikt wordt, wordt het uitvoerbestand in dezelfde UTF-16-codering geschreven als het invoerbestand. Optie -u voorkomt conversie naar UTF-8.

- -

Dos2unix en unix2dos hebben geen optie om van UTF-8 naar UTF-16 te converteren.

- -

ISO- en 7-bits-conversie werken niet op UTF-16-bestanden.

- -

Byte-Order-Mark

- -

Op Windows bevatten Unicode-tekstbestanden gewoonlijk een Byte-Order-Mark (BOM), omdat veel Windows-programma's (inclusief Kladblok) standaard een BOM toevoegen. Zie ook http://en.wikipedia.org/wiki/Byte_order_mark.

- -

Op Unix hebben Unicode-tekstbestanden meestal geen BOM. Er wordt aangenomen dat de codering van tekstbestanden gelijk is aan de tekencodering van de ingestelde taalregio.

- -

Dos2unix kan alleen detecteren of een bestand in UTF-16-codering is als het bestand een BOM bevat. Wanneer een UTF-16-bestand geen BOM heeft, ziet dos2unix het bestand als een binair bestand.

- -

Gebruik optie -ul of -ub om een UTF-16-bestand zonder BOM om te zetten.

- -

Dos2unix schrijft standaard geen BOM in het uitvoerbestand. Met optie -b schrijft dos2unix een BOM wanneer het invoerbestand een BOM bevat.

- -

Unix2dos schrijft standaard een BOM in het uitvoerbestand wanneer het invoerbestand een BOM bevat. Gebruik optie -r om de BOM te verwijderen.

- -

Dos2unix en unix2dos schrijven altijd een BOM wanneer optie -m gebruikt wordt.

- -

Unicode-voorbeelden

- -

Omzetten van Windows UTF-16 (met BOM) naar Unix UTF-8:

- -
    dos2unix -n in.txt uit.txt
- -

Omzetten van Windows UTF-16LE (zonder BOM) naar Unix UTF-8:

- -
    dos2unix -ul -n in.txt uit.txt
- -

Omzetten van Unix UTF-8 naar Windows UTF-8 met BOM:

- -
    unix2dos -m -n in.txt uit.txt
- -

Omzetten van Unix UTF-8 naar Windows UTF-16:

- -
    unix2dos < in.txt | iconv -f UTF-8 -t UTF-16 > uit.txt
- -

GB18030

- -

GB18030 is een standaard van de Chinese overheid. Een subset van de GB18030-standaard is officieel verplicht voor alle softwareproducten die in China verkocht worden. Zie ook http://en.wikipedia.org/wiki/GB_18030.

- -

GB18030 is volledig compatibel met Unicode, en kan als een Unicodetransformatie beschouwd worden. Net als UTF-8 is GB18030 compatibel met ASCII. GB18030 is ook compatibel met Windows-codetabel 936 (ook wel GBK genoemd).

- -

Op Unix/Linux worden UTF-16-bestanden alleen naar GB18030 geconverteerd wanneer de taalregio op China ingesteld is en de codering op GB18030. Bijvoorbeeld, met de Britse taalregio-instelling en_GB.GB18030 zal conversie van UTF-16 naar GB18030 niet werken, maar met de Chinese instelling zh_CN.GB18030 wel.

- -

Op Windows dient u de optie -gb te gebruiken om UTF-16-bestanden naar GB18030 te converteren.

- -

GB18030-bestanden kunnen een Byte-Order-Mark bevatten, net als Unicode-bestanden.

- -

VOORBEELDEN

- -

Invoer lezen van standaardinvoer en uitvoer schrijven naar standaarduitvoer:

- -
    dos2unix
-    dos2unix -l -c mac
- -

Omzetten en vervangen van a.txt; omzetten en vervangen van b.txt:

- -
    dos2unix a.txt b.txt
-    dos2unix -o a.txt b.txt
- -

Omzetten en vervangen van a.txt in ascii-conversiemodus:

- -
    dos2unix a.txt
- -

Omzetten en vervangen van a.txt in ascii-conversiemodus; omzetten en vervangen van b.txt in 7-bits conversiemodus:

- -
    dos2unix a.txt -c 7bit b.txt
-    dos2unix -c ascii a.txt -c 7bit b.txt
-    dos2unix -ascii a.txt -7 b.txt
- -

Omzetten van a.txt van Mac- naar Unix-indeling:

- -
    dos2unix -c mac a.txt
-    mac2unix a.txt
- -

Omzetten van a.txt van Unix- naar Mac-indeling:

- -
    unix2dos -c mac a.txt
-    unix2mac a.txt
- -

Omzetten en vervangen van a.txt met behoud van origineel tijdsstempel:

- -
    dos2unix -k a.txt
-    dos2unix -k -o a.txt
- -

Omzetten van a.txt en resultaat naar e.txt schrijven:

- -
    dos2unix -n a.txt e.txt
- -

Omzetten van a.txt en naar e.txt schrijven, met tijdsstempel van e.txt gelijk aan die van a.txt:

- -
    dos2unix -k -n a.txt e.txt
- -

Omzetten en vervangen van a.txt; omzetten van b.txt en naar e.txt schrijven:

- -
    dos2unix a.txt -n b.txt e.txt
-    dos2unix -o a.txt -n b.txt e.txt
- -

Omzetten van c.txt en naar e.txt schrijven; omzetten en vervangen van a.txt; omzetten en vervangen van b.txt; omzetten van d.txt en naar f.txt schrijven.

- -
    dos2unix -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt
- -

RECURSIEVE CONVERSIE

- -

Gebruik dos2unix in combinatie met de opdrachten find(1) en xargs(1) om tekstbestanden in een mappenboom recursief om te zetten. Bijvoorbeeld om alle .txt-bestanden in de mappenboom onder de huidige map te converteren, typt u:

- -
    find . -name *.txt |xargs dos2unix
- -

LOKALISATIE

- -
- -
LANG
-
- -

De primaire taal wordt geselecteerd via de omgevingsvariabele LANG. De variabele LANG bestaat uit verschillende onderdelen. Het eerste deel is in kleine letters de taalcode. Het tweede deel is optioneel en is de landcode in hoofdletters, voorafgegaan door een liggend streepje. Er is ook een optioneel derde deel: de tekencodering, voorafgegaan door een punt. Enkele voorbeelden voor een POSIX-shell:

- -
    export LANG=nl               Nederlands
-    export LANG=nl_NL            Nederlands, Nederland
-    export LANG=nl_BE            Nederlands, België
-    export LANG=es_ES            Spaans, Spanje
-    export LANG=es_MX            Spaans, Mexico
-    export LANG=en_US.iso88591   Engels, VS, Latin-1-codering
-    export LANG=en_GB.UTF-8      Engels, GB, UTF-8-codering
- -

Voor een complete lijst van taal- en landcodes zie de gettext-handleiding: http://www.gnu.org/software/gettext/manual/html_node/Usual-Language-Codes.html

- -

Op Unix-systemen kunt u de opdracht locale(1) gebruiken om specifieke taalregio-informatie te verkrijgen.

- -
-
LANGUAGE
-
- -

Met de omgevingsvariabele LANGUAGE kunt u een prioriteitenlijst specificeren van talen, gescheiden door dubbele punten. Dos2unix geeft voorrang aan LANGUAGE boven LANG. Bijvoorbeeld, eerst Nederlands en dan Duits: LANGUAGE=nl:de. U moet eerst lokalisatie in werking stellen, door het instellen van LANG (of LC_ALL) op een waarde ongelijk aan "C", voordat u een talen-prioriteitenlijst kunt gebruiken via de variabele LANGUAGE. Zie ook de gettext-handleiding: http://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html

- -

Als u een taal kiest die niet beschikbaar is, worden de standaard Engelse berichten gebruikt.

- -
-
DOS2UNIX_LOCALEDIR
-
- -

Met de omgevingsvariabele DOS2UNIX_LOCALEDIR kan de LOCALEDIR die ingesteld werd tijdens compilatie worden overstemd. LOCALEDIR wordt gebruikt om de taalbestanden te vinden. De GNU standaardwaarde is /usr/local/share/locale. De optie --version laat de gebruikte LOCALEDIR zien.

- -

Voorbeeld (POSIX-shell):

- -
    export DOS2UNIX_LOCALEDIR=$HOME/share/locale
- -
-
- -

AFSLUITWAARDE

- -

Bij succes wordt nul teruggegeven. Wanneer een systeemfout optreedt wordt het laatste systeemfoutnummer teruggegeven. Bij andere fouten wordt 1 teruggegeven.

- -

De afsluitwaarde is altijd nul in de stillewerkingsmodus, behalve wanneer verkeerde opties worden gegeven.

- -

STANDAARDEN

- -

http://nl.wikipedia.org/wiki/Tekstbestand

- -

http://nl.wikipedia.org/wiki/Carriage_Return

- -

http://nl.wikipedia.org/wiki/Linefeed

- -

<http://nl.wikipedia.org/wiki/Unicode>

- -

AUTEURS

- -

Benjamin Lin - <blin@socs.uts.edu.au>, Bernd Johannes Wuebben (mac2unix-modus) - <wuebben@kde.org>, Christian Wurll (toevoegen van extra regeleindes) - <wurll@ira.uka.de>, Erwin Waterlander - <waterlan@xs4all.nl> (beheerder)

- -

Projectpagina: http://waterlan.home.xs4all.nl/dos2unix.html

- -

SourceForge-pagina: http://sourceforge.net/projects/dos2unix/

- -

ZIE OOK

- -

file(1) find(1) iconv(1) locale(1) xargs(1)

- - - - - - - diff --git a/Tools/dos2unix/share/doc/dos2unix-7.2/nl/dos2unix.txt b/Tools/dos2unix/share/doc/dos2unix-7.2/nl/dos2unix.txt deleted file mode 100644 index 628e522..0000000 --- a/Tools/dos2unix/share/doc/dos2unix-7.2/nl/dos2unix.txt +++ /dev/null @@ -1,614 +0,0 @@ -NAAM - dos2unix - omzetter van tekstbestandsindelingen, van DOS/Mac naar Unix - en vice versa - -OVERZICHT - dos2unix [opties] [BESTAND ...] [-n INVOERBESTAND UITVOERBESTAND ...] - unix2dos [opties] [BESTAND ...] [-n INVOERBESTAND UITVOERBESTAND ...] - -BESCHRIJVING - Het Dos2unix pakket bevat de toepassingen "dos2unix" en "unix2dos" om - platte tekstbestanden in DOS- of Mac-indeling naar Unix-indeling om te - zetten, en vice versa. - - In DOS/Windows-tekstbestanden bestaat een regeleinde uit een combinatie - van twee tekens: een 'Carriage Return' (CR) gevolgd door een 'Line Feed' - (LF). In Unix-tekstbestanden bestaat een regeleinde uit één enkel - 'Newline'-teken, dat gelijk is aan een DOS 'Line Feed'-teken (LF). In - Mac-tekstbestanden, van vóór Mac OS X, bestaan regeleindes uit één enkel - 'Carriage Return'-teken. Mac OS X is op Unix gebaseerd en heeft dezelfde - regeleindes als Unix. - - Naast regeleindes kan Dos2unix ook de codering van bestanden - converteren. Enkele DOS-codetabellen kunnen omgezet worden naar Unix - Latin-1. En Windows Unicode-bestanden (UTF-16) kunnen geconverteerd - worden naar Unix Unicode-bestanden (UTF-8). - - Binaire bestanden worden automatisch overgeslagen, behalve als de - omzetting geforceerd wordt. - - Niet-reguliere bestanden, zoals mappen en FIFO's, worden automatisch - overgeslagen. - - Symbolische koppelingen en hun doelen blijven standaard onaangeroerd. - Optioneel kunnen symbolische koppelingen worden vervangen, of de uitvoer - kan naar het doel van de symbolische koppeling worden geschreven. Op - Windows wordt het schrijven naar het doel van een symbolische koppeling - niet ondersteund. - - Dos2unix is gemodelleerd naar dos2unix op SunOS/Solaris, maar er is één - belangrijk verschil: deze versie van dos2unix voert standaard een - vervangende conversie uit (oud-bestand-modus) terwijl de oorspronkelijke - SunOS/Solaris-versie alleen de gepaarde conversie (nieuw-bestand-modus) - kent. Zie ook de opties "-o" en "-n". - -OPTIES - -- Alle volgende opties als bestandsnamen behandelen. Gebruik deze - optie als u een bestand wilt converteren waarvan de naam met een - streepje begint. Bijvoorbeeld, om een bestand genaamd "-foo" om te - zetten, gebruikt u de volgende opdracht: - - dos2unix -- -foo - - Of in nieuw-bestand-modus: - - dos2unix -n -- -foo uit.txt - - -ascii - Alleen regeleindes converteren. Dit is de standaardconversiemodus. - - -iso - Conversie tussen de tekensets DOS en ISO-8859-1. Zie ook de sectie - CONVERSIEMODI. - - -1252 - Windows-codetabel 1252 (West-Europees) gebruiken. - - -437 - DOS-codetabel 437 (VS) gebruiken. Dit is de standaard codetabel die - gebruikt wordt bij ISO-conversie. - - -850 - DOS-codetabel 850 (West-Europees) gebruiken. - - -860 - DOS-codetabel 860 (Portugees) gebruiken. - - -863 - DOS-codetabel 863 (Canadees Frans) gebruiken. - - -865 - DOS-codetabel 865 (Scandinavisch) gebruiken. - - -7 Lettertekens met het achtste bit gezet converteren naar spaties. - - -b, --keep-bom - Een Byte-Order-Mark (BOM) behouden. Als het invoerbestand een BOM - bevat, dan wordt ook een BOM naar het uitvoerbestand geschreven. Dit - is het standaardgedrag bij conversie naar DOS. Zie ook optie "-r". - - -c, --convmode CONVERSIEMODUS - De te gebruiken conversiemodus. CONVERSIEMODUS kan zijn: *ascii*, - *7bit*, *iso*, of *mac*, waarbij ascii de standaardinstelling is. - - -f, --force - Conversie van binaire bestanden afdwingen. - - -gb, --gb18030 - Op Windows worden UTF-16-bestanden standaard naar UTF-8 - geconverteerd, ongeacht de ingestelde taalregio. Gebruik deze optie - om UTF-16-bestanden naar GB18030 te converteren. Deze optie is - alleen beschikbaar op Windows. Zie ook de sectie GB18030. - - -h, --help - Een hulptekst tonen. - - -i[VLAGGEN], --info[=VLAGGEN] BESTAND... - Bestandsinformatie tonen. Er wordt niets geconverteerd. - - De volgende informatie wordt weergegeven, in deze volgorde: het - aantal DOS-regeleindes, het aantal Unix-regeleindes, het aantal - Mac-regeleindes, de Byte-Order-Mark, of het een tekst- of binair - bestand is, en de bestandsnaam. - - Voorbeelduitvoer: - - 6 0 0 no_bom text dos.txt - 0 6 0 no_bom text unix.txt - 0 0 6 no_bom text mac.txt - 6 6 6 no_bom text mixed.txt - 50 0 0 UTF-16LE text utf16le.txt - 0 50 0 no_bom text utf8unix.txt - 50 0 0 UTF-8 text utf8dos.txt - 2 418 219 no_bom binary dos2unix.exe - - Bij de optie kunnen één of meer vlaggen meegegeven worden om de - uitvoer te beperken. - - d Het aantal DOS-regeleindes tonen. - - u Het aantal Unix-regeleindes tonen. - - m Het aantal Mac-regeleindes tonen. - - b De Byte-Order-Mark tonen. - - t Tonen of het bestand tekst is of binair. - - c Alleen de namen tonen van de bestanden die geconverteerd zouden - worden. - - Met de vlag "c" toont dos2unix alleen de bestanden die - DOS-regeleindes bevatten, en unix2dos alleen de bestanden die - Unix-regeleindes bevatten. - - Voorbeelden: - - Informatie weergeven voor alle bestanden met de extensie 'txt': - - dos2unix -i *.txt - - Alleen de aantallen DOS-regeleindes en Unix-regeleindes tonen: - - dos2unix -idu *.txt - - Alleen de Byte-Order-Mark tonen: - - dos2unix --info=b *.txt - - De bestanden opsommen die DOS-regeleindes bevatten: - - dos2unix -ic *.txt - - De bestanden opsommen die Unix-regeleindes bevatten: - - unix2dos -ic *.txt - - -k, --keepdate - Het tijdsstempel van het invoerbestand behouden voor het - uitvoerbestand. - - -L, --license - De softwarelicentie tonen. - - -l, --newline - Een extra regeleinde toevoegen. - - dos2unix: Alleen DOS-regeleindes worden omgezet naar twee - Unix-regeleindes. In Mac-modus worden alleen Mac-regeleindes omgezet - naar twee Unix-regeleindes. - - unix2dos: Alleen Unix-regeleindes worden omgezet naar twee - DOS-regeleindes. In Mac-modus worden Unix-regeleindes omgezet naar - twee Mac-regeleindes. - - -m, --add-bom - Een Byte-Order-Mark (BOM) naar het uitvoerbestand schrijven. - Standaard wordt een UTF-8-BOM geschreven. - - Als het invoerbestand in UTF-16 is, en de optie "-u" is gegeven, dan - wordt een UTF-16-BOM geschreven. - - Gebruik deze optie nooit als de codering van het uitvoerbestand niet - UTF-8 of UTF-16 is. Zie ook de sectie UNICODE. - - -n, --newfile INVOERBESTAND UITVOERBESTAND ... - Nieuw-bestand-modus. Het bestand INVOERBESTAND converteren en naar - bestand UITVOERBESTAND schrijven. Bestandsnamen moeten opgegeven - worden in paren. Jokertekens moeten *niet*gebruikt worden, anders - *verlies* je de bestanden. - - De gebruiker die de conversie start in nieuw-bestand (gepaarde) - modus wordt de eigenaar van het geconverteerde bestand. De - lees/schrijf-toegangsrechten van het nieuwe bestand worden de - toegangsrechten van het originele bestand minus de umask(1) van de - gebruiker die de conversie draait. - - -o, --oldfile BESTAND ... - Oud-bestand-modus. Het bestand BESTAND converteren en overschrijven. - Dit is de standaard modus. Jokertekens kunnen gebruikt worden. - - In oud-bestand (vervangende) modus krijgt het geconverteerde bestand - dezelfde eigenaar, groep en lees/schrijf-rechten als het originele - bestand. Ook wanneer het bestand wordt omgezet door een andere - gebruiker die schrijfrechten heeft op het bestand (b.v. gebruiker - root). De omzetting wordt afgebroken wanneer het niet mogelijk is de - originele waardes te behouden. Verandering van eigenaar kan - betekenen dat de originele eigenaar het bestand niet meer kan lezen. - Verandering van groep zou een veiligheidsrisico kunnen zijn, het - bestand zou leesbaar kunnen worden voor personen voor wie het niet - bestemd is. Behoud van eigenaar, groep en lees/schrijf-rechten wordt - alleen ondersteund op Unix. - - -q, --quiet - Stille werking. Alle waarschuwingen onderdrukken. De aflsuitwaarde - is nul, behalve wanneer verkeerde opties worden gegeven. - - -r, --remove-bom - Een Byte-Order-Mark (BOM) verwijderen. Er wordt geen BOM naar het - uitvoerbestand geschreven. Dit is het standaardgedrag bij conversie - naar Unix. Zie ook optie "-b". - - -s, --safe - Binaire bestanden overslaan (standaard). - - -u, --keep-utf16 - De originele UTF-16-codering van het invoerbestand behouden. Het - uitvoerbestand wordt in dezelfde UTF-16-codering (little endian of - big endian) geschreven als het invoerbestand. Dit voorkomt conversie - naar UTF-8. Er wordt ook een corresponderende UTF-16-BOM geschreven. - Deze optie kan uitgeschakeld worden met de optie "-ascii". - - -ul, --assume-utf16le - Veronderstellen dat de indeling van het invoerbestand UTF-16LE is. - - Wanneer het invoerbestand een Byte-Order-Mark (BOM) bevat, dan gaat - deze BOM vóór deze optie. - - Wanneer een verkeerde aanname is gemaakt (het invoerbestand was geen - UTF-16LE) en de conversie verliep met succes, dan krijgt u een - UTF-8-bestand met verkeerde tekst. De verkeerde conversie kan - ongedaan worden gemaakt door met iconv(1) het UTF-8-uitvoerbestand - terug om te zetten naar UTF-16LE. Dit zal het originele bestand - terug brengen. - - De aanname van UTF-16LE werkt als een *conversiemodus*. Door de - standaardmodus *ascii* in te schakelen wordt de - UTF-16LE-veronderstelling uitgeschakeld. - - -ub, --assume-utf16be - Veronderstellen dat de indeling van het invoerbestand UTF-16BE is. - - Deze optie werkt hetzelfde als optie "-ul". - - -v, --verbose - Extra meldingen weergeven. Er wordt extra informatie getoond over - Byte-Order-Marks en het aantal geconverteerde regeleindes. - - -F, --follow-symlink - Symbolische koppelingen volgen en de doelen converteren. - - -R, --replace-symlink - Symbolische koppelingen vervangen door geconverteerde bestanden (de - originele doelbestanden blijven ongewijzigd). - - -S, --skip-symlink - Symbolische koppelingen en doelen ongewijzigd laten (standaard). - - -V, --version - Versie-informatie tonen. - -MAC-MODUS - In normale modus worden DOS-regeleindes naar Unix omgezet en vice versa. - Mac-regeleindes worden niet omgezet. - - In Mac-modus worden Mac-regeleindes naar Unix omgezet en vice versa. - DOS-regeleindes blijven ongewijzigd. - - Om in Mac-modus te draaien kunt u de opdrachtregeloptie "-c mac" - gebruiken, of de opdrachten "mac2unix" of "unix2mac". - -CONVERSIEMODI - ascii - In modus "ascii" worden alleen regeleindes omgezet. Dit is de - standaardmodus. - - Hoewel de naam van deze modus ASCII is, wat een 7-bits standaard is, - is de werkelijke modus 8-bits. Gebruik altijd deze modus wanneer u - Unicode UTF-8-bestanden omzet. - - 7bit - Alle 8-bits niet-ASCII lettertekens (met waardes van 128 t/m 255) - worden omgezet naar een 7-bits spatie. - - iso Tekens worden omgezet tussen een DOS-tekenset (codetabel) en de - ISO-tekenset ISO-8859-1 (Latin-1) op Unix. DOS-tekens zonder een - ISO-8859-1-equivalent, waarvoor dus geen omzetting mogelijk is, - worden omgezet in een punt. Hetzelfde geldt voor ISO-8859-1-tekens - zonder DOS-tegenhanger. - - Wanneer alleen optie "-iso" gebruikt wordt, zal dos2unix proberen de - actieve codetabel te gebruiken. Als dat niet mogelijk is wordt - codetabel CP437 gebruikt, die vooral in de VS gebruikt wordt. Om een - bepaalde codetabel te forceren, kunt u de opties -850 - (West-Europees), -860 (Portugees), -863 (Canadees Frans) of -865 - (Scandinavisch) gebruiken. Windows-codetabel CP1252 (West-Europees) - wordt ook ondersteund met optie -1252. Gebruik voor andere - codetabellen dos2unix in combinatie met iconv(1). Iconv kan omzetten - tussen een lange lijst tekensetcoderingen. - - Gebruik ISO-conversie nooit op Unicode-tekstbestanden. Het zal - UTF-8-gecodeerde bestanden beschadigen. - - Enkele voorbeelden: - - Omzetten van de standaard DOS-codetabel naar Unix Latin-1: - - dos2unix -iso -n in.txt uit.txt - - Omzetten van DOS CP850 naar Unix Latin-1: - - dos2unix -850 -n in.txt uit.txt - - Omzetten van Windows CP1252 naar Unix Latin-1: - - dos2unix -1252 -n in.txt uit.txt - - Omzetten van Windows CP1252 naar Unix UTF-8 (Unicode): - - iconv -f CP1252 -t UTF-8 in.txt | dos2unix > uit.txt - - Omzetten van Unix Latin-1 naar de standaard DOS-codetabel: - - unix2dos -iso -n in.txt uit.txt - - Omzetten van Unix Latin-1 naar DOS CP850: - - unix2dos -850 -n in.txt uit.txt - - Omzetten van Unix Latin-1 naar Windows CP1252: - - unix2dos -1252 -n in.txt uit.txt - - Omzetten van Unix UTF-8 (Unicode) naar Windows CP1252: - - unix2dos < in.txt | iconv -f UTF-8 -t CP1252 > uit.txt - - Zie ook en - . - -UNICODE - Coderingen - Er bestaan verschillende Unicode-coderingen. Op Unix en Linux zijn - Unicode-bestanden typisch gecodeerd in UTF-8. Op Windows kunnen - Unicode-tekstbestanden gecodeerd zijn in UTF-8, UTF-16 of UTF-16 big - endian, maar ze zijn meestal gecodeerd in UTF-16. - - Conversie - Unicode-tekstbestanden kunnen DOS-, Unix- of Mac-regeleindes hebben, net - als reguliere tekstbestanden. - - Alle versies van dos2unix en unix2dos kunnen UTF-8-gecodeerde bestanden - omzetten, want UTF-8 is ontworpen op compatibiliteit met ASCII. - - Dos2unix en unix2dos met Unicode UTF-16-ondersteuning kunnen little en - big endian UTF-16-gecodeerde tekstbestanden lezen. Om er achter te komen - of dos2unix gebouwd is met UTF-16- ondersteuning, typt u "dos2unix -V". - - Op Unix/Linux worden UTF-16-bestanden geconverteerd naar de codering van - de ingestelde taalregio. Gebruik de opdracht locale(1) om te zien wat de - ingestelde codering is. Wanneer conversie niet mogelijk is, treedt er - een fout op en wordt het bestand overgeslagen. - - Op Windows worden UTF-16-bestanden standaard naar UTF-8 geconverteerd. - UTF-8-tekstbestanden worden alom goed ondersteund, zowel op Windows als - Unix/Linux. - - De UTF-16- en UTF-8-coderingen zijn volledig compatibel, er gaat bij het - converteren niets verloren. Als er tijdens de conversie van UTF-16 naar - UTF-8 een fout optreedt, bijvoorbeeld omdat het UTF-16-invoerbestand een - fout bevat, dan wordt het bestand overgeslagen. - - Wanneer "-u" gebruikt wordt, wordt het uitvoerbestand in dezelfde - UTF-16-codering geschreven als het invoerbestand. Optie "-u" voorkomt - conversie naar UTF-8. - - Dos2unix en unix2dos hebben geen optie om van UTF-8 naar UTF-16 te - converteren. - - ISO- en 7-bits-conversie werken niet op UTF-16-bestanden. - - Byte-Order-Mark - Op Windows bevatten Unicode-tekstbestanden gewoonlijk een - Byte-Order-Mark (BOM), omdat veel Windows-programma's (inclusief - Kladblok) standaard een BOM toevoegen. Zie ook - . - - Op Unix hebben Unicode-tekstbestanden meestal geen BOM. Er wordt - aangenomen dat de codering van tekstbestanden gelijk is aan de - tekencodering van de ingestelde taalregio. - - Dos2unix kan alleen detecteren of een bestand in UTF-16-codering is als - het bestand een BOM bevat. Wanneer een UTF-16-bestand geen BOM heeft, - ziet dos2unix het bestand als een binair bestand. - - Gebruik optie "-ul" of "-ub" om een UTF-16-bestand zonder BOM om te - zetten. - - Dos2unix schrijft standaard geen BOM in het uitvoerbestand. Met optie - "-b" schrijft dos2unix een BOM wanneer het invoerbestand een BOM bevat. - - Unix2dos schrijft standaard een BOM in het uitvoerbestand wanneer het - invoerbestand een BOM bevat. Gebruik optie "-r" om de BOM te - verwijderen. - - Dos2unix en unix2dos schrijven altijd een BOM wanneer optie "-m" - gebruikt wordt. - - Unicode-voorbeelden - Omzetten van Windows UTF-16 (met BOM) naar Unix UTF-8: - - dos2unix -n in.txt uit.txt - - Omzetten van Windows UTF-16LE (zonder BOM) naar Unix UTF-8: - - dos2unix -ul -n in.txt uit.txt - - Omzetten van Unix UTF-8 naar Windows UTF-8 met BOM: - - unix2dos -m -n in.txt uit.txt - - Omzetten van Unix UTF-8 naar Windows UTF-16: - - unix2dos < in.txt | iconv -f UTF-8 -t UTF-16 > uit.txt - -GB18030 - GB18030 is een standaard van de Chinese overheid. Een subset van de - GB18030-standaard is officieel verplicht voor alle softwareproducten die - in China verkocht worden. Zie ook - . - - GB18030 is volledig compatibel met Unicode, en kan als een - Unicodetransformatie beschouwd worden. Net als UTF-8 is GB18030 - compatibel met ASCII. GB18030 is ook compatibel met Windows-codetabel - 936 (ook wel GBK genoemd). - - Op Unix/Linux worden UTF-16-bestanden alleen naar GB18030 geconverteerd - wanneer de taalregio op China ingesteld is en de codering op GB18030. - Bijvoorbeeld, met de Britse taalregio-instelling "en_GB.GB18030" zal - conversie van UTF-16 naar GB18030 niet werken, maar met de Chinese - instelling "zh_CN.GB18030" wel. - - Op Windows dient u de optie "-gb" te gebruiken om UTF-16-bestanden naar - GB18030 te converteren. - - GB18030-bestanden kunnen een Byte-Order-Mark bevatten, net als - Unicode-bestanden. - -VOORBEELDEN - Invoer lezen van standaardinvoer en uitvoer schrijven naar - standaarduitvoer: - - dos2unix - dos2unix -l -c mac - - Omzetten en vervangen van a.txt; omzetten en vervangen van b.txt: - - dos2unix a.txt b.txt - dos2unix -o a.txt b.txt - - Omzetten en vervangen van a.txt in ascii-conversiemodus: - - dos2unix a.txt - - Omzetten en vervangen van a.txt in ascii-conversiemodus; omzetten en - vervangen van b.txt in 7-bits conversiemodus: - - dos2unix a.txt -c 7bit b.txt - dos2unix -c ascii a.txt -c 7bit b.txt - dos2unix -ascii a.txt -7 b.txt - - Omzetten van a.txt van Mac- naar Unix-indeling: - - dos2unix -c mac a.txt - mac2unix a.txt - - Omzetten van a.txt van Unix- naar Mac-indeling: - - unix2dos -c mac a.txt - unix2mac a.txt - - Omzetten en vervangen van a.txt met behoud van origineel tijdsstempel: - - dos2unix -k a.txt - dos2unix -k -o a.txt - - Omzetten van a.txt en resultaat naar e.txt schrijven: - - dos2unix -n a.txt e.txt - - Omzetten van a.txt en naar e.txt schrijven, met tijdsstempel van e.txt - gelijk aan die van a.txt: - - dos2unix -k -n a.txt e.txt - - Omzetten en vervangen van a.txt; omzetten van b.txt en naar e.txt - schrijven: - - dos2unix a.txt -n b.txt e.txt - dos2unix -o a.txt -n b.txt e.txt - - Omzetten van c.txt en naar e.txt schrijven; omzetten en vervangen van - a.txt; omzetten en vervangen van b.txt; omzetten van d.txt en naar f.txt - schrijven. - - dos2unix -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt - -RECURSIEVE CONVERSIE - Gebruik dos2unix in combinatie met de opdrachten find(1) en xargs(1) om - tekstbestanden in een mappenboom recursief om te zetten. Bijvoorbeeld om - alle .txt-bestanden in de mappenboom onder de huidige map te - converteren, typt u: - - find . -name *.txt |xargs dos2unix - -LOKALISATIE - LANG - De primaire taal wordt geselecteerd via de omgevingsvariabele LANG. - De variabele LANG bestaat uit verschillende onderdelen. Het eerste - deel is in kleine letters de taalcode. Het tweede deel is optioneel - en is de landcode in hoofdletters, voorafgegaan door een liggend - streepje. Er is ook een optioneel derde deel: de tekencodering, - voorafgegaan door een punt. Enkele voorbeelden voor een POSIX-shell: - - export LANG=nl Nederlands - export LANG=nl_NL Nederlands, Nederland - export LANG=nl_BE Nederlands, België - export LANG=es_ES Spaans, Spanje - export LANG=es_MX Spaans, Mexico - export LANG=en_US.iso88591 Engels, VS, Latin-1-codering - export LANG=en_GB.UTF-8 Engels, GB, UTF-8-codering - - Voor een complete lijst van taal- en landcodes zie de - gettext-handleiding: - - - Op Unix-systemen kunt u de opdracht locale(1) gebruiken om - specifieke taalregio-informatie te verkrijgen. - - LANGUAGE - Met de omgevingsvariabele LANGUAGE kunt u een prioriteitenlijst - specificeren van talen, gescheiden door dubbele punten. Dos2unix - geeft voorrang aan LANGUAGE boven LANG. Bijvoorbeeld, eerst - Nederlands en dan Duits: "LANGUAGE=nl:de". U moet eerst lokalisatie - in werking stellen, door het instellen van LANG (of LC_ALL) op een - waarde ongelijk aan "C", voordat u een talen-prioriteitenlijst kunt - gebruiken via de variabele LANGUAGE. Zie ook de gettext-handleiding: - - - Als u een taal kiest die niet beschikbaar is, worden de standaard - Engelse berichten gebruikt. - - DOS2UNIX_LOCALEDIR - Met de omgevingsvariabele DOS2UNIX_LOCALEDIR kan de LOCALEDIR die - ingesteld werd tijdens compilatie worden overstemd. LOCALEDIR wordt - gebruikt om de taalbestanden te vinden. De GNU standaardwaarde is - "/usr/local/share/locale". De optie --version laat de gebruikte - LOCALEDIR zien. - - Voorbeeld (POSIX-shell): - - export DOS2UNIX_LOCALEDIR=$HOME/share/locale - -AFSLUITWAARDE - Bij succes wordt nul teruggegeven. Wanneer een systeemfout optreedt - wordt het laatste systeemfoutnummer teruggegeven. Bij andere fouten - wordt 1 teruggegeven. - - De afsluitwaarde is altijd nul in de stillewerkingsmodus, behalve - wanneer verkeerde opties worden gegeven. - -STANDAARDEN - - - - - - - - -AUTEURS - Benjamin Lin - , Bernd Johannes Wuebben - (mac2unix-modus) - , Christian Wurll (toevoegen van - extra regeleindes) - , Erwin Waterlander - - (beheerder) - - Projectpagina: - - SourceForge-pagina: - -ZIE OOK - file(1) find(1) iconv(1) locale(1) xargs(1) - diff --git a/Tools/dos2unix/share/doc/dos2unix-7.2/pl/dos2unix.htm b/Tools/dos2unix/share/doc/dos2unix-7.2/pl/dos2unix.htm deleted file mode 100644 index ea5c866..0000000 --- a/Tools/dos2unix/share/doc/dos2unix-7.2/pl/dos2unix.htm +++ /dev/null @@ -1,654 +0,0 @@ - - - - -dos2unix 7.2 - konwerter formatu plików tekstowych między systemami DOS/Mac a Uniksem - - - - - - - - - - -

NAZWA

- -

dos2unix - konwerter formatu plików tekstowych między systemami DOS/Mac a Uniksem

- -

SKŁADNIA

- -
    dos2unix [opcje] [PLIK ...] [-n PLIK_WEJ PLIK_WYJ ...]
-    unix2dos [opcje] [PLIK ...] [-n PLIK_WEJ PLIK_WYJ ...]
- -

OPIS

- -

Pakiet Dos2unix zawiera narzędzia dos2unix oraz unix2dos do konwersji zwykłych plików tekstowych między formatami używanymi w systemach DOS lub Mac a formatem uniksowym.

- -

W plikach tekstowych systemu DOS/Windows oznaczenie końca linii to połączenie dwóch znaków: powrotu karetki (CR) i przesunięcia linii (LF). W uniksowych plikach tekstowych koniec linii to pojedynczy znak LF. W plikach tekstowych systemu Mac sprzed Mac OS X koniec linii był pojedynczym znakiem CR. Obecnie Mac OS wykorzystuje uniksowe końce linii (LF).

- -

Oprócz oznaczeń końców linii Dos2unix potrafi konwertować także kodowanie plików. Kilko stron kodowych DOS-a może być przekonwertowanych do uniksowego Latin-1, a windowsowy Unicode (UTF-16) do powszechniejszego pod Uniksem kodowania Unicode UTF-8.

- -

Pliki binarne są pomijane automatycznie, chyba że konwersja zostanie wymuszona.

- -

Pliki inne niż zwykłe, np. katalogi lub FIFO, są pomijane automatycznie.

- -

Dowiązania symboliczne i ich cele są domyślnie pozostawiane bez zmian. Dowiązania symboliczne mogą być opcjonalnie zastępowane, albo wyjście może być zapisywane do celu dowiązania. Zapis do celu dowiązania symbolicznego nie jest obsługiwane pod Windows.

- -

Dos2unix powstał na podstawie narzędzia dos2unix z systemu SunOS/Solaris. Jest jedna istotna różnica w stosunku do oryginalnej wersji z SunOS-a/Solarisa: ta wersja domyślnie wykonuje konwersję w miejscu (tryb starego pliku), podczas gdy oryginalna obsługiwała tylko konwersję parami (tryb nowego pliku) - p. także opcje -o i -n.

- -

OPCJE

- -
- -
--
-
- -

Potraktowanie wszystkich kolejnych opcji jako nazw plików. Tej opcji należy użyć, aby przekonwertować pliki, których nazwy zaczynają się od minusa. Przykładowo, aby przekonwertować plik o nazwie "-foo", można użyć polecenia:

- -
    dos2unix -- -foo
- -

Lub w trybie nowego pliku:

- -
    dos2unix -n -- -foo out.txt
- -
-
-ascii
-
- -

Konwersja tylko znaków końca linii. Jest to domyślny tryb konwersji.

- -
-
-iso
-
- -

Konwersja między zestawami znaków DOS i ISO-8859-1. Więcej w sekcji TRYBY KONWERSJI.

- -
-
-1252
-
- -

Użycie strony kodowej Windows 1252 (zachodnioeuropejskiej).

- -
-
-437
-
- -

Użycie strony kodowej DOS 437 (US). Jest to domyślna strona kodowa używana przy konwersji ISO.

- -
-
-850
-
- -

Użycie strony kodowej DOS 850 (zachodnioeuropejskiej).

- -
-
-860
-
- -

Użycie strony kodowej DOS 860 (portugalskiej).

- -
-
-863
-
- -

Użycie strony kodowej DOS 863 (kanadyjskiej francuskiej).

- -
-
-865
-
- -

Użycie strony kodowej DOS 865 (nordyckiej).

- -
-
-7
-
- -

Konwersja znaków 8-bitowych do przestrzeni 7-bitowej.

- -
-
-b, --keep-bom
-
- -

Zachowanie znaku BOM (Byte Order Makr). Jeżeli plik wejściowy zawiera BOM, powoduje zapisanie go w pliku wyjściowym. Jest to domyślne zachowanie przy konwersji na DOS-owe końce linii. P. także opcja -r.

- -
-
-c, --convmode TRYB_KONW
-
- -

Ustawienie trybu konwersji. TRYB_KONW to jeden z: ascii, 7bit, iso, mac, przy czym domyślny jest ascii.

- -
-
-f, --force
-
- -

Wymuszenie konwersji plików binarnych.

- -
-
-gb, --gb18030
-
- -

Pod Windows pliki w UTF-16 są domyślnie konwertowane do UTF-8, niezależnie od ustawienia lokalizacji. Ta opcja pozwala przekonwertować pliki w UTF-16 do GB18030. Opcja jest dostępna tylko pod Windows, więcej w sekcji dotyczącej GB18030.

- -
-
-h, --help
-
- -

Wyświetlenie opisu i zakończenie.

- -
-
-i[FLAGI], --info[=FLAGI] PLIK ...
-
- -

Wyświetlenie informacji o pliku. Konwersja nie jest wykonywana.

- -

Wypisywane są następujące informacje, w tej kolejności: liczba DOS-owych końców linii, liczba uniksowych końców linii, liczba macowych końców linii, znacznik BOM, tekstowy lub binarny, nazwa pliku.

- -

Przykładowe wyjście:

- -
     6       0       0  no_bom    text    dos.txt
-     0       6       0  no_bom    text    unix.txt
-     0       0       6  no_bom    text    mac.txt
-     6       6       6  no_bom    text    mixed.txt
-    50       0       0  UTF-16LE  text    utf16le.txt
-     0      50       0  no_bom    text    utf8unix.txt
-    50       0       0  UTF-8     text    utf8dos.txt
-     2     418     219  no_bom    binary  dos2unix.exe
- -

Opcjonalnie można ustawić dodatkowe flagi, aby zmienić wyjście. Można dodać jedną lub więcej flag.

- -
- -
d
-
- -

Wypisanie liczby DOS-owych końców linii.

- -
-
u
-
- -

Wypisanie liczby uniksowych końców linii.

- -
-
m
-
- -

Wypisanie liczby macowych końców linii.

- -
-
b
-
- -

Wypisanie znacznika BOM.

- -
-
t
-
- -

Wypisanie, czy plik jest tekstowy, czy binarny.

- -
-
c
-
- -

Wypisanie tylko plików, które zostałyby przekonwertowane.

- -

Z flagą c dos2unix wypisze tylko pliki zawierające DOS-owe końce linii, a unix2dos wypisze tylko nazwy plików zawierających uniksowe końce linii.

- -
-
- -

Przykłady:

- -

Pokazanie informacji o wszystkich plikach *.txt:

- -
    dos2unix -i *.txt
- -

Pokazanie tylko liczby DOS-owych i uniksowych końców linii:

- -
    dos2unix -idu *.txt
- -

Pokazanie tylko znacznika BOM:

- -
    dos2unix --info=b *.txt
- -

Wypisanie listy plików zawierających DOS-owe końce linii:

- -
    dos2unix -ic *.txt
- -

Wypisanie listy plików zawierających uniksowe końce linii:

- -
    unix2dos -ic *.txt
- -
-
-k, --keepdate
-
- -

Zachowanie znacznika czasu pliku wyjściowego takiego samego, jak pliku wejściowego.

- -
-
-L, --license
-
- -

Wyświetlenie licencji programu.

- -
-
-l, --newline
-
- -

Dodanie dodatkowego znaku końca linii.

- -

dos2unix: tylko DOS-owe znaki końca linii są zamieniane na dwa uniksowe. W trybie Mac tylko macowe znaki końca linii są zamieniane na dwa uniksowe.

- -

unix2dos: tylko uniksowe znaki końca linii są zamieniane na dwa DOS-owe. W trybie Mac uniksowe znaki końca linii są zamieniane na dwa macowe.

- -
-
-m, --add-bom
-
- -

Zapisanie znacznika BOM (Byte Order Mark) w pliku wyjściowym. Domyślnie zapisywany jest BOM UTF-8.

- -

Jeśli plik wejściowy jest w kodowaniu UTF-16 i użyto opcji -u, zostanie zapisany BOM UTF-16.

- -

Nigdy nie należy używać tej opcji, jeśli kodowanie wyjściowe jest inne niż UTF-8 lub UTF-16. Więcej w sekcji UNICODE.

- -
-
-n, --newfile PLIK_WEJ PLIK_WYJ ...
-
- -

Tryb nowego pliku. Konwersja PLIKU_WEJ z zapisem wyjścia do PLIKU_WYJ. Nazwy plików muszą być podane parami, a masek nie należy używać, gdyż spowoduje to utratę plików.

- -

Osoba uruchamiająca konwersję w trybie nowego pliku (par) będzie właścicielem przekonwertowanego pliku. Prawa odczytu/zapisu nowego pliku będą pochodziły z praw pliku oryginalnego po odjęciu umask(1) osoby uruchamiającej konwersję.

- -
-
-o, --oldfile PLIK ...
-
- -

Tryb starego pliku. Konwersja PLIKU i nadpisanie go wyjściem. Program działa domyślnie w tym trybie. Można używać masek.

- -

W trybie starego pliku (w miejscu) przekonwertowany plik otrzymuje tego samego właściciela, grupę oraz prawa odczytu/zapisu, jak plik oryginalny - także wtedy, gdy plik jest konwertowany przez innego użytkownika, mającego prawo zapisu do pliku (np. przez użytkownika root). Konwersja zostanie przerwana, jeśli nie będzie możliwe zachowanie oryginalnych wartości. Zmiana właściciela mogłaby oznaczać, że pierwotny właściciel nie może już odczytać pliku. Zmiana grupy mogłaby być zagrożeniem bezpieczeństwa, plik mógłby być czytelny dla nie zamierzonych osób. Zachowanie właściciela, grupy i praw odczytu/zapisu jest obsługiwane tylko na Uniksie.

- -
-
-q, --quiet
-
- -

Tryb cichy. Pominięcie wszystkich ostrzeżeń i komunikatów. Zwracanym kodem jest zero, chyba że podano błędne opcje linii poleceń.

- -
-
-r, --remove-bom
-
- -

Usunięcie znaków BOM (Byte Order Mark). Bez zapisywania BOM do pliku wyjściowego. Jest to domyślne zachowanie przy konwersji na uniksowe końce linii. P. także opcja -b.

- -
-
-s, --safe
-
- -

Pominięcie plików binarnych (domyślne).

- -
-
-u, --keep-utf16
-
- -

Zachowanie oryginalnego kodowania pliku wejściowego UTF-16. Plik wyjściowy zostanie zapisany w tym samym kodowaniu UTF-16 (little lub big endian), co plik wejściowy. Zapobiega to przekształceniu do UTF-8. Do pliku zostanie zapisany odpowiedni znacznik BOM UTF-16. Tę opcję można wyłączyć opcją -ascii.

- -
-
-ul, --assume-utf16le
-
- -

Przyjęcie, że format pliku wejściowego to UTF-16LE.

- -

Jeśli w pliku wejściowym jest znacznik BOM (Byte Order Mark), ma on priorytet nad tą opcją.

- -

Jeśli przyjęto błędne założenie (plik wejściowy nie jest w formacie UTF-16LE), a konwersja się uda, wynikiem będzie plik wyjściowy UTF-8 ze złym tekstem. Konwersję tę można odwrócić przy użyciu polecenia iconv(1) do konwersji wyjścia UTF-8 z powrotem do UTF-16LE. Przywróci to plik oryginalny.

- -

Przyjęcie UTF-16LE działa jako tryb konwersji. Przy przełączeniu na domyślny tryb ascii przyjęcie UTF-16LE jest wyłączane.

- -
-
-ub, --assume-utf16be
-
- -

Przyjęcie, że format pliku wejściowego to UTF-16BE.

- -

Ta opcja działa analogicznie do -ul.

- -
-
-v, --verbose
-
- -

Wyświetlanie szczegółowych komunikatów. Wyświetlane śa dodatkowe informacje o znacznikach BOM (Byte Order Mark) oraz liczbie przekonwertowanych końców linii.

- -
- -
- -

Podążanie za dowiązaniami symbolicznymi i konwertowanie ich celów

- -
- -
- -

Zastępowanie dowiązań symbolicznych przekonwertowanymi plikami (oryginalne pliki docelowe pozostają bez zmian).

- -
- -
- -

Pozostawienie dowiązań symbolicznych i celów bez zmian (domyślne).

- -
-
-V, --version
-
- -

Wyświetlenie informacji o wersji i zakończenie.

- -
-
- -

TRYB MAC

- -

W zwykłym trybie znaki końca linii są konwertowane z DOS-a do Uniksa i odwrotnie. Znaki końca linii systemu Mac nie są konwertowane.

- -

W trybie Mac znaki końca linii są konwertowane z formatu Maca do Uniksa i odwrotnie. Znaki końca linii systemu DOS nie są zmieniane.

- -

Aby uruchomić program w trybie Mac, należy użyć opcji linii poleceń -c mac albo użyć poleceń mac2unix lub unix2mac.

- -

TRYBY KONWERSJI

- -
- -
ascii
-
- -

W trybie ascii konwertowane są tylko końce linii. Jest to domyślny tryb konwersji.

- -

Mimo że nazwa tego trybu to ASCII, które jest standardem 7-bitowym, jest to tryb 8-bitowy. Należy zawsze używać tego trybu przy konwersji plików Unicode UTF-8.

- -
-
7bit
-
- -

W tym trybie wszystkie znaki 8-bitowe spoza ASCII (o wartościach od 128 do 255) są konwertowane do przestrzeni 7-bitowej.

- -
-
iso
-
- -

W tym trybie znaki są konwertowane między zestawem znaków DOS (stroną kodową) a zestawem znaków ISO-8859-1 (Latin-1) używanym na Uniksie. Znaki DOS-owe nie mające odpowiednika w ISO-8859-1, których nie da się przekonwertować, są zamieniane na kropkę. To samo dotyczy znaków ISO-8859-1 bez odpowiednika w DOS-ie.

- -

Jeśli używana jest tylko opcja -iso, dos2unix próbuje wykryć aktywną stronę kodową. Jeśli nie jest to możliwe, dos2unix używa domyślnej strony kodowej CP437, stosowanej głównie w USA. Aby wymusić określoną stronę kodową, należy użyć opcji -437 (US), -850 (zachodnioeuropejska), -860 (portugalska), -863 (kanadyjska francuska) lub -865 (nordycka). Ponadto obsługiwana jest strona kodowa Windows CP1252 (zachodnioeuropejska) przy użyciu opcji -1252. W przypadku innych stron kodowych można użyć narzędzia dos2unix wraz z iconv(1). Iconv potrafi konwertować między wieloma kodowaniami znaków.

- -

Nigdy nie należy używać konwersji ISO na plikach tekstowych w Unicode. Uszkodziłaby pliki kodowane UTF-8.

- -

Kilka przykładów:

- -

Konwersja z domyślnej strony kodowej DOS do uniksowego Latin-1:

- -
    dos2unix -iso -n in.txt out.txt
- -

Konwersja ze strony kodowej DOS CP850 do uniksowego Latin-1:

- -
    dos2unix -850 -n in.txt out.txt
- -

Konwersja ze strony kodowej Windows CP1252 do uniksowego Latin-1:

- -
    dos2unix -1252 -n in.txt out.txt
- -

Konwersja ze strony kodowej Windows CP1252 do uniksowego UTF-8 (Unicode):

- -
    iconv -f CP1252 -t UTF-8 in.txt | dos2unix > out.txt
- -

Konwersa z uniksowego Latin-1 do domyślnej strony kodowej DOS:

- -
    unix2dos -iso -n in.txt out.txt
- -

Konwersja z uniksowego Latin-1 do strony kodowej DOS CP850:

- -
    unix2dos -850 -n in.txt out.txt
- -

Konwersja z uniksowego Latin-1 do strony kodowej Windows CP1252:

- -
    unix2dos -1252 -n in.txt out.txt
- -

Konwersja z uniksowego UTF-8 (Unicode) do strony kodowej Windows CP1252:

- -
    unix2dos < in.txt | iconv -f UTF-8 -t CP1252 > out.txt
- -

Więcej pod adresem http://czyborra.com/charsets/codepages.html oraz http://czyborra.com/charsets/iso8859.html.

- -
-
- -

UNICODE

- -

Kodowania

- -

Istnieją różne kodowania Unicode. Pod Uniksem i Linuksem pliki Unicode są zwykle kodowane z użyciem UTF-8. Pod Windows pliki tekstowe Unicode mogą być kodowane w UTF-8, UTF-16, UTF-16 big-endian, ale przeważnie są kodowane w UTF-16.

- -

Konwersje

- -

Pliki tekstowe Unicode mogą mieć znaki końca linii systemu DOS, Unix lub Mac, podobnie jak zwykłe pliki tekstowe.

- -

Wszystkie wersje dos2unix i unix2dos potrafią konwertować pliki kodowane UTF-8, ponieważ UTF-8 jest wstecznie zgodne z ASCII.

- -

Dos2unix i unix2dos z obsługą Unicode UTF-16 potrafią odczytywać pliki tekstowe kodowane UTF-16 little- oraz big-endian. Aby sprawdzić, czy dos2unix został zbudowany z obsługą UTF-16, należy napisać dos2unix -V.

- -

Pod Uniksem/Linuksem pliki w kodowaniu UTF-16 są konwertowane do kodowania znaków ustawionej lokalizacji. Kodowanie znaków dla lokalizacji można sprawdzić poleceniem locale(1). Jeśli konwersja nie jest możliwa, wystąpi błąd, a plik zostanie pominięty.

- -

Pod Windows pliki UTF-16 są domyślnie konwertowane do UTF-8. Pliki tekstkowe w kodowaniu UTF-8 są dobrze obsługiwane zarówno pod Windows, jak i Uniksem/Linuksem.

- -

Kodowania UTF-16 i UTF-8 są w pełni zgodne, konwersja nie spowoduje utraty żadnej części tekstu. W przypadku wystąpienia błędu konwersji, na przykład w przypadku błędu w pliku wejściowym UTF-16, plik zostanie pominięty.

- -

W przypadku użycia opcji -u, plik wejściowy zostanie zapisany w tym samym kodowaniu UTF-16, co plik wejściowy. Opcja -u zapobiega konwersji do UTF-8.

- -

Dos2unix oraz unix2dos nie mają opcji pozwalającej na konwersję plików UTF-8 do UTF-16.

- -

Tryby konwersji ISO i 7-bit nie działają na plikach UTF-16.

- -

Znacznik BOM

- -

W systemie Windows pliki tekstowe zwykle zawierają znacznik BOM (Byte Order Mark), ponieważ wiele programów dla Windows (w tym Notepad) dodaje domyślnie znaczniki BOM. Więcej informacji można znaleźć pod adresem http://pl.wikipedia.org/wiki/BOM_(informatyka).

- -

Pod Uniksem pliki Unicode zwykle nie mają znacznika BOM. Pliki tekstowe są traktowane jako kodowane zgodnie z kodowaniem znaków ustawionej lokalizacji.

- -

Dos2unix potrafi wykryć tylko, czy plik jest w formacie UTF-16, jeśli zawiera znacznik BOM. Jeśli plik UTF-16 nie ma tego znacznika, dos2unix potraktuje plik jako binarny.

- -

Do konwersji pliku UTF-16 bez znacznika BOM można użyć opcji -ul lub -ub.

- -

Dos2unix nie zapisuje domyślnie znaku BOM w pliku wyjściowym. Z opcją -b Dos2unix zapisuje BOM, jeśli plik wejściowy zawiera BOM.

- -

Unix2dos domyślnie zapisuje znaczniki BOM w pliku wyjściowym, jeśli plik wejściowy ma BOM. Aby usunąć BOM, można użyć opcji -r.

- -

Dos2unix oraz unix2dos zawsze zapisują znaczniki BOM, jeśli użyta zostanie opcja -m.

- -

Przykłady Unicode

- -

Konwersja pliku UTF-16 (z BOM) z formatu Windows do uniksowego UTF-8:

- -
    dos2unix -n in.txt out.txt
- -

Konwersja pliku UTF-16LE (bez BOM) z formatu Windows do uniksowego UTF-8:

- -
    dos2unix -ul -n in.txt out.txt
- -

Konwersja z uniksowego UTF-8 do UTF-8 z BOM dla Windows:

- -
    unix2dos -m -n in.txt out.txt
- -

Konwersja z uniksowego UTF-8 do UTF-16 dla Windows:

- -
    unix2dos < in.txt | iconv -f UTF-8 -t UTF-16 > out.txt
- -

GB18030

- -

GB18030 to standard urzędowy w Chinach. Obowiązkowy podzbiór standardu GB18030 jest oficjalnym wymaganiem każdego oprogramowania sprzedawanego w Chinach. Więcej pod adresem http://en.wikipedia.org/wiki/GB_18030.

- -

GB18030 jest w pełni zgodny z Unicode i może być uważany za format transformacji unikodu. Podobnie jak UTF-8, GB18030 jest zgodny z ASCII. Jest także zgodny ze stroną kodową Windows 936, znaną też jako GBK.

- -

Pod Uniksem/Linuksem pliki UTF-16 są konwertowane do GB18030, jeśli kodowanie dla lokalizacji jest ustawione na GB18030. Uwaga: będzie to działać tylko dla lokalizacji chińskiej. W przypadku np. ustawienia lokalizacji angielskiej/brytyjskiej en_GB.GB18030 konwersja UTF-16 do GB18030 nie będzie działać, a dla lokalizacji chińskiej zh_CN.GB18030 będzie.

- -

Pod Windows w celu konwersji plików UTF-16 do GB18030 należy użyć opcji -gb.

- -

Pliki w kodowaniu GB18030 mogą mieć znacznik BOM, podobnie jak pliki w Unicode.

- -

PRZYKŁADY

- -

Odczyt ze standardowego wejścia i zapis na standardowe wyjście:

- -
    dos2unix
-    dos2unix -l -c mac
- -

Konwersja i zastąpienie a.txt; konwersja i zastąpienie b.txt:

- -
    dos2unix a.txt b.txt
-    dos2unix -o a.txt b.txt
- -

Konwersja i zastąpienie a.txt w trybie ascii:

- -
    dos2unix a.txt
- -

Konwersja i zastąpienie a.txt w trybie ascii; konwersja i zastąpienie b.txt w trybie 7-bitowym:

- -
    dos2unix a.txt -c 7bit b.txt
-    dos2unix -c ascii a.txt -c 7bit b.txt
-    dos2unix -ascii a.txt -7 b.txt
- -

Konwersja a.txt z formatu Mac do formatu uniksowego:

- -
    dos2unix -c mac a.txt
-    mac2unix a.txt
- -

Konwersja a.txt z formatu uniksowego do formatu Mac:

- -
    unix2dos -c mac a.txt
-    unix2mac a.txt
- -

Konwersja i zastąpienie a.txt z zachowaniem oryginalnego znacznika czasu:

- -
    dos2unix -k a.txt
-    dos2unix -k -o a.txt
- -

Konwersja a.txt i zapis do e.txt:

- -
    dos2unix -n a.txt e.txt
- -

Konwersja a.txt i zapis do e.txt z zachowaniem znacznika czasu e.txt takiego, jak a.txt:

- -
    dos2unix -k -n a.txt e.txt
- -

Konwersja i zastąpienie a.txt; konwersja b.txt i zapis do e.txt:

- -
    dos2unix a.txt -n b.txt e.txt
-    dos2unix -o a.txt -n b.txt e.txt
- -

Konwersja c.txt i zapis do e.txt; konwersja i zastąpienie a.txt; konwersja i zastąpienie b.txt; konwersja d.txt i zapis do f.txt:

- -
    dos2unix -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt
- -

KONWERSJA REKURENCYJNA

- -

Można użyć dos2unix w połączeniu z poleceniami find(1) i xargs(1) do rekurencyjnej konwersji plików tekstowych w strukturze drzewa katalogów. Na przykład, aby przekonwertować wszystkie pliki .txt w drzewie katalogów poniżej katalogu bieżącego, należy napisać:

- -
    find . -name *.txt |xargs dos2unix
- -

LOKALIZACJA

- -
- -
LANG
-
- -

Główny język wybiera się zmienną środowiskową LANG. Zmienna LANG składa się z kilku części. Pierwsza część to małe litery oznaczające kod języka. Druga część jest opcjonalna i zawiera kod kraju pisany wielkimi literami, poprzedzony podkreśleniem. Jest także opcjonalna trzecia część: kodowanie znaków, poprzedzone kropką. Kilka przykładów dla powłok zgodnych ze standardem POSIX:

- -
    export LANG=nl               holenderski
-    export LANG=nl_NL            holenderski, Holandia
-    export LANG=nl_BE            holenderski, Belgia
-    export LANG=es_ES            hiszpański, Hiszpania
-    export LANG=es_MX            hiszpański, Meksyk
-    export LANG=en_US.iso88591   angielski, USA, kodowanie Latin-1
-    export LANG=en_GB.UTF-8      angielski, Wlk. Brytania, kodowanie UTF-8
- -

Pełną listę kodów języków i krajów można znaleźć w podręczniku do gettexta: http://www.gnu.org/software/gettext/manual/html_node/Usual-Language-Codes.html

- -

W systemach uniksowych do uzyskania informacji dotyczących lokalizacji można użyć polecenia locale(1).

- -
-
LANGUAGE
-
- -

Przy użyciu zmiennej środowiskowej LANGUAGE można określić listę języków wg priorytetu, oddzielonych dwukropkami. Dos2unix przyjmuje pierwszeństwo zmiennej LANGUAGE nad LANG. Na przykład, najpierw holenderski, następnie niemiecki: LANGUAGE=nl:de. Aby skorzystać z listy wg priorytetów ze zmiennej LANGUAGE, trzeba najpierw włączyć lokalizację przez ustawienie zmiennej LANG (lub LC_ALL) na wartość inną niż "C". Więcej informacji znajduje się w podręczniku do gettexta: http://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html

- -

W przypadku wybrania niedostępnego języka, otrzymamy standardowe, angielskie komunikaty.

- -
-
DOS2UNIX_LOCALEDIR
-
- -

Przy użyciu zmiennej środowiskowej DOS2UNIX_LOCALEDIR, można nadpisać ustawienie LOCALEDIR z czasu kompilacji. LOCALEDIR to katalog używany do znalezienia plików lokalizacji. Domyślną wartością dla GNU jest /usr/local/share/locale. Opcja --version wyświetla używaną wartość LOCALEDIR.

- -

Przykład (dla powłoki POSIX):

- -
    export DOS2UNIX_LOCALEDIR=$HOME/share/locale
- -
-
- -

WARTOŚĆ ZWRACANA

- -

W przypadku powodzenia zwracane jest zero. Jeśli wystąpi błąd systemowy, zwracany jest ostatni błąd systemowy. W przypadku innych błędów zwracane jest 1.

- -

Wartość zwracana w trybie cichym to zawsze zero, z wyjątkiem sytuacji podania błędnych opcji linii poleceń.

- -

STANDARDY

- -

http://pl.wikipedia.org/wiki/Plik_tekstowy

- -

http://en.wikipedia.org/wiki/Carriage_return

- -

http://pl.wikipedia.org/wiki/End-of-line

- -

http://pl.wikipedia.org/wiki/Unicode

- -

AUTORZY

- -

Benjamin Lin <blin@socs.uts.edu.au>; Bernd Johannes Wuebben (tryb mac2unix) <wuebben@kde.org>; Christian Wurll (dodawanie dodatkowej nowej linii) <wurll@ira.uka.de>; Erwin Waterlander <waterlan@xs4all.nl> (prowadzący)

- -

Strona projektu: http://waterlan.home.xs4all.nl/dos2unix.html

- -

Strona SourceForge: http://sourceforge.net/projects/dos2unix/

- -

ZOBACZ TAKŻE

- -

file(1) find(1) iconv(1) locale(1) xargs(1)

- - - - - - - diff --git a/Tools/dos2unix/share/doc/dos2unix-7.2/pl/dos2unix.txt b/Tools/dos2unix/share/doc/dos2unix-7.2/pl/dos2unix.txt deleted file mode 100644 index 77c49ed..0000000 --- a/Tools/dos2unix/share/doc/dos2unix-7.2/pl/dos2unix.txt +++ /dev/null @@ -1,609 +0,0 @@ -NAZWA - dos2unix - konwerter formatu plików tekstowych między systemami DOS/Mac - a Uniksem - -SKŁADNIA - dos2unix [opcje] [PLIK ...] [-n PLIK_WEJ PLIK_WYJ ...] - unix2dos [opcje] [PLIK ...] [-n PLIK_WEJ PLIK_WYJ ...] - -OPIS - Pakiet Dos2unix zawiera narzędzia "dos2unix" oraz "unix2dos" do - konwersji zwykłych plików tekstowych między formatami używanymi w - systemach DOS lub Mac a formatem uniksowym. - - W plikach tekstowych systemu DOS/Windows oznaczenie końca linii to - połączenie dwóch znaków: powrotu karetki (CR) i przesunięcia linii (LF). - W uniksowych plikach tekstowych koniec linii to pojedynczy znak LF. W - plikach tekstowych systemu Mac sprzed Mac OS X koniec linii był - pojedynczym znakiem CR. Obecnie Mac OS wykorzystuje uniksowe końce linii - (LF). - - Oprócz oznaczeń końców linii Dos2unix potrafi konwertować także - kodowanie plików. Kilko stron kodowych DOS-a może być przekonwertowanych - do uniksowego Latin-1, a windowsowy Unicode (UTF-16) do - powszechniejszego pod Uniksem kodowania Unicode UTF-8. - - Pliki binarne są pomijane automatycznie, chyba że konwersja zostanie - wymuszona. - - Pliki inne niż zwykłe, np. katalogi lub FIFO, są pomijane automatycznie. - - Dowiązania symboliczne i ich cele są domyślnie pozostawiane bez zmian. - Dowiązania symboliczne mogą być opcjonalnie zastępowane, albo wyjście - może być zapisywane do celu dowiązania. Zapis do celu dowiązania - symbolicznego nie jest obsługiwane pod Windows. - - Dos2unix powstał na podstawie narzędzia dos2unix z systemu - SunOS/Solaris. Jest jedna istotna różnica w stosunku do oryginalnej - wersji z SunOS-a/Solarisa: ta wersja domyślnie wykonuje konwersję w - miejscu (tryb starego pliku), podczas gdy oryginalna obsługiwała tylko - konwersję parami (tryb nowego pliku) - p. także opcje "-o" i "-n". - -OPCJE - -- Potraktowanie wszystkich kolejnych opcji jako nazw plików. Tej opcji - należy użyć, aby przekonwertować pliki, których nazwy zaczynają się - od minusa. Przykładowo, aby przekonwertować plik o nazwie "-foo", - można użyć polecenia: - - dos2unix -- -foo - - Lub w trybie nowego pliku: - - dos2unix -n -- -foo out.txt - - -ascii - Konwersja tylko znaków końca linii. Jest to domyślny tryb konwersji. - - -iso - Konwersja między zestawami znaków DOS i ISO-8859-1. Więcej w sekcji - TRYBY KONWERSJI. - - -1252 - Użycie strony kodowej Windows 1252 (zachodnioeuropejskiej). - - -437 - Użycie strony kodowej DOS 437 (US). Jest to domyślna strona kodowa - używana przy konwersji ISO. - - -850 - Użycie strony kodowej DOS 850 (zachodnioeuropejskiej). - - -860 - Użycie strony kodowej DOS 860 (portugalskiej). - - -863 - Użycie strony kodowej DOS 863 (kanadyjskiej francuskiej). - - -865 - Użycie strony kodowej DOS 865 (nordyckiej). - - -7 Konwersja znaków 8-bitowych do przestrzeni 7-bitowej. - - -b, --keep-bom - Zachowanie znaku BOM (Byte Order Makr). Jeżeli plik wejściowy - zawiera BOM, powoduje zapisanie go w pliku wyjściowym. Jest to - domyślne zachowanie przy konwersji na DOS-owe końce linii. P. także - opcja "-r". - - -c, --convmode TRYB_KONW - Ustawienie trybu konwersji. TRYB_KONW to jeden z: *ascii*, *7bit*, - *iso*, *mac*, przy czym domyślny jest ascii. - - -f, --force - Wymuszenie konwersji plików binarnych. - - -gb, --gb18030 - Pod Windows pliki w UTF-16 są domyślnie konwertowane do UTF-8, - niezależnie od ustawienia lokalizacji. Ta opcja pozwala - przekonwertować pliki w UTF-16 do GB18030. Opcja jest dostępna tylko - pod Windows, więcej w sekcji dotyczącej GB18030. - - -h, --help - Wyświetlenie opisu i zakończenie. - - -i[FLAGI], --info[=FLAGI] PLIK ... - Wyświetlenie informacji o pliku. Konwersja nie jest wykonywana. - - Wypisywane są następujące informacje, w tej kolejności: liczba - DOS-owych końców linii, liczba uniksowych końców linii, liczba - macowych końców linii, znacznik BOM, tekstowy lub binarny, nazwa - pliku. - - Przykładowe wyjście: - - 6 0 0 no_bom text dos.txt - 0 6 0 no_bom text unix.txt - 0 0 6 no_bom text mac.txt - 6 6 6 no_bom text mixed.txt - 50 0 0 UTF-16LE text utf16le.txt - 0 50 0 no_bom text utf8unix.txt - 50 0 0 UTF-8 text utf8dos.txt - 2 418 219 no_bom binary dos2unix.exe - - Opcjonalnie można ustawić dodatkowe flagi, aby zmienić wyjście. - Można dodać jedną lub więcej flag. - - d Wypisanie liczby DOS-owych końców linii. - - u Wypisanie liczby uniksowych końców linii. - - m Wypisanie liczby macowych końców linii. - - b Wypisanie znacznika BOM. - - t Wypisanie, czy plik jest tekstowy, czy binarny. - - c Wypisanie tylko plików, które zostałyby przekonwertowane. - - Z flagą "c" dos2unix wypisze tylko pliki zawierające DOS-owe - końce linii, a unix2dos wypisze tylko nazwy plików zawierających - uniksowe końce linii. - - Przykłady: - - Pokazanie informacji o wszystkich plikach *.txt: - - dos2unix -i *.txt - - Pokazanie tylko liczby DOS-owych i uniksowych końców linii: - - dos2unix -idu *.txt - - Pokazanie tylko znacznika BOM: - - dos2unix --info=b *.txt - - Wypisanie listy plików zawierających DOS-owe końce linii: - - dos2unix -ic *.txt - - Wypisanie listy plików zawierających uniksowe końce linii: - - unix2dos -ic *.txt - - -k, --keepdate - Zachowanie znacznika czasu pliku wyjściowego takiego samego, jak - pliku wejściowego. - - -L, --license - Wyświetlenie licencji programu. - - -l, --newline - Dodanie dodatkowego znaku końca linii. - - dos2unix: tylko DOS-owe znaki końca linii są zamieniane na dwa - uniksowe. W trybie Mac tylko macowe znaki końca linii są zamieniane - na dwa uniksowe. - - unix2dos: tylko uniksowe znaki końca linii są zamieniane na dwa - DOS-owe. W trybie Mac uniksowe znaki końca linii są zamieniane na - dwa macowe. - - -m, --add-bom - Zapisanie znacznika BOM (Byte Order Mark) w pliku wyjściowym. - Domyślnie zapisywany jest BOM UTF-8. - - Jeśli plik wejściowy jest w kodowaniu UTF-16 i użyto opcji "-u", - zostanie zapisany BOM UTF-16. - - Nigdy nie należy używać tej opcji, jeśli kodowanie wyjściowe jest - inne niż UTF-8 lub UTF-16. Więcej w sekcji UNICODE. - - -n, --newfile PLIK_WEJ PLIK_WYJ ... - Tryb nowego pliku. Konwersja PLIKU_WEJ z zapisem wyjścia do - PLIKU_WYJ. Nazwy plików muszą być podane parami, a masek *nie* - należy używać, gdyż *spowoduje* to utratę plików. - - Osoba uruchamiająca konwersję w trybie nowego pliku (par) będzie - właścicielem przekonwertowanego pliku. Prawa odczytu/zapisu nowego - pliku będą pochodziły z praw pliku oryginalnego po odjęciu umask(1) - osoby uruchamiającej konwersję. - - -o, --oldfile PLIK ... - Tryb starego pliku. Konwersja PLIKU i nadpisanie go wyjściem. - Program działa domyślnie w tym trybie. Można używać masek. - - W trybie starego pliku (w miejscu) przekonwertowany plik otrzymuje - tego samego właściciela, grupę oraz prawa odczytu/zapisu, jak plik - oryginalny - także wtedy, gdy plik jest konwertowany przez innego - użytkownika, mającego prawo zapisu do pliku (np. przez użytkownika - root). Konwersja zostanie przerwana, jeśli nie będzie możliwe - zachowanie oryginalnych wartości. Zmiana właściciela mogłaby - oznaczać, że pierwotny właściciel nie może już odczytać pliku. - Zmiana grupy mogłaby być zagrożeniem bezpieczeństwa, plik mógłby być - czytelny dla nie zamierzonych osób. Zachowanie właściciela, grupy i - praw odczytu/zapisu jest obsługiwane tylko na Uniksie. - - -q, --quiet - Tryb cichy. Pominięcie wszystkich ostrzeżeń i komunikatów. Zwracanym - kodem jest zero, chyba że podano błędne opcje linii poleceń. - - -r, --remove-bom - Usunięcie znaków BOM (Byte Order Mark). Bez zapisywania BOM do pliku - wyjściowego. Jest to domyślne zachowanie przy konwersji na uniksowe - końce linii. P. także opcja "-b". - - -s, --safe - Pominięcie plików binarnych (domyślne). - - -u, --keep-utf16 - Zachowanie oryginalnego kodowania pliku wejściowego UTF-16. Plik - wyjściowy zostanie zapisany w tym samym kodowaniu UTF-16 (little lub - big endian), co plik wejściowy. Zapobiega to przekształceniu do - UTF-8. Do pliku zostanie zapisany odpowiedni znacznik BOM UTF-16. Tę - opcję można wyłączyć opcją "-ascii". - - -ul, --assume-utf16le - Przyjęcie, że format pliku wejściowego to UTF-16LE. - - Jeśli w pliku wejściowym jest znacznik BOM (Byte Order Mark), ma on - priorytet nad tą opcją. - - Jeśli przyjęto błędne założenie (plik wejściowy nie jest w formacie - UTF-16LE), a konwersja się uda, wynikiem będzie plik wyjściowy UTF-8 - ze złym tekstem. Konwersję tę można odwrócić przy użyciu polecenia - iconv(1) do konwersji wyjścia UTF-8 z powrotem do UTF-16LE. - Przywróci to plik oryginalny. - - Przyjęcie UTF-16LE działa jako *tryb konwersji*. Przy przełączeniu - na domyślny tryb *ascii* przyjęcie UTF-16LE jest wyłączane. - - -ub, --assume-utf16be - Przyjęcie, że format pliku wejściowego to UTF-16BE. - - Ta opcja działa analogicznie do "-ul". - - -v, --verbose - Wyświetlanie szczegółowych komunikatów. Wyświetlane śa dodatkowe - informacje o znacznikach BOM (Byte Order Mark) oraz liczbie - przekonwertowanych końców linii. - - -F, --follow-symlink - Podążanie za dowiązaniami symbolicznymi i konwertowanie ich celów - - -R, --replace-symlink - Zastępowanie dowiązań symbolicznych przekonwertowanymi plikami - (oryginalne pliki docelowe pozostają bez zmian). - - -S, --skip-symlink - Pozostawienie dowiązań symbolicznych i celów bez zmian (domyślne). - - -V, --version - Wyświetlenie informacji o wersji i zakończenie. - -TRYB MAC - W zwykłym trybie znaki końca linii są konwertowane z DOS-a do Uniksa i - odwrotnie. Znaki końca linii systemu Mac nie są konwertowane. - - W trybie Mac znaki końca linii są konwertowane z formatu Maca do Uniksa - i odwrotnie. Znaki końca linii systemu DOS nie są zmieniane. - - Aby uruchomić program w trybie Mac, należy użyć opcji linii poleceń "-c - mac" albo użyć poleceń "mac2unix" lub "unix2mac". - -TRYBY KONWERSJI - ascii - W trybie "ascii" konwertowane są tylko końce linii. Jest to domyślny - tryb konwersji. - - Mimo że nazwa tego trybu to ASCII, które jest standardem 7-bitowym, - jest to tryb 8-bitowy. Należy zawsze używać tego trybu przy - konwersji plików Unicode UTF-8. - - 7bit - W tym trybie wszystkie znaki 8-bitowe spoza ASCII (o wartościach od - 128 do 255) są konwertowane do przestrzeni 7-bitowej. - - iso W tym trybie znaki są konwertowane między zestawem znaków DOS - (stroną kodową) a zestawem znaków ISO-8859-1 (Latin-1) używanym na - Uniksie. Znaki DOS-owe nie mające odpowiednika w ISO-8859-1, których - nie da się przekonwertować, są zamieniane na kropkę. To samo dotyczy - znaków ISO-8859-1 bez odpowiednika w DOS-ie. - - Jeśli używana jest tylko opcja "-iso", dos2unix próbuje wykryć - aktywną stronę kodową. Jeśli nie jest to możliwe, dos2unix używa - domyślnej strony kodowej CP437, stosowanej głównie w USA. Aby - wymusić określoną stronę kodową, należy użyć opcji -437 (US), -850 - (zachodnioeuropejska), -860 (portugalska), -863 (kanadyjska - francuska) lub -865 (nordycka). Ponadto obsługiwana jest strona - kodowa Windows CP1252 (zachodnioeuropejska) przy użyciu opcji -1252. - W przypadku innych stron kodowych można użyć narzędzia dos2unix wraz - z iconv(1). Iconv potrafi konwertować między wieloma kodowaniami - znaków. - - Nigdy nie należy używać konwersji ISO na plikach tekstowych w - Unicode. Uszkodziłaby pliki kodowane UTF-8. - - Kilka przykładów: - - Konwersja z domyślnej strony kodowej DOS do uniksowego Latin-1: - - dos2unix -iso -n in.txt out.txt - - Konwersja ze strony kodowej DOS CP850 do uniksowego Latin-1: - - dos2unix -850 -n in.txt out.txt - - Konwersja ze strony kodowej Windows CP1252 do uniksowego Latin-1: - - dos2unix -1252 -n in.txt out.txt - - Konwersja ze strony kodowej Windows CP1252 do uniksowego UTF-8 - (Unicode): - - iconv -f CP1252 -t UTF-8 in.txt | dos2unix > out.txt - - Konwersa z uniksowego Latin-1 do domyślnej strony kodowej DOS: - - unix2dos -iso -n in.txt out.txt - - Konwersja z uniksowego Latin-1 do strony kodowej DOS CP850: - - unix2dos -850 -n in.txt out.txt - - Konwersja z uniksowego Latin-1 do strony kodowej Windows CP1252: - - unix2dos -1252 -n in.txt out.txt - - Konwersja z uniksowego UTF-8 (Unicode) do strony kodowej Windows - CP1252: - - unix2dos < in.txt | iconv -f UTF-8 -t CP1252 > out.txt - - Więcej pod adresem - oraz . - -UNICODE - Kodowania - Istnieją różne kodowania Unicode. Pod Uniksem i Linuksem pliki Unicode - są zwykle kodowane z użyciem UTF-8. Pod Windows pliki tekstowe Unicode - mogą być kodowane w UTF-8, UTF-16, UTF-16 big-endian, ale przeważnie są - kodowane w UTF-16. - - Konwersje - Pliki tekstowe Unicode mogą mieć znaki końca linii systemu DOS, Unix lub - Mac, podobnie jak zwykłe pliki tekstowe. - - Wszystkie wersje dos2unix i unix2dos potrafią konwertować pliki kodowane - UTF-8, ponieważ UTF-8 jest wstecznie zgodne z ASCII. - - Dos2unix i unix2dos z obsługą Unicode UTF-16 potrafią odczytywać pliki - tekstowe kodowane UTF-16 little- oraz big-endian. Aby sprawdzić, czy - dos2unix został zbudowany z obsługą UTF-16, należy napisać "dos2unix - -V". - - Pod Uniksem/Linuksem pliki w kodowaniu UTF-16 są konwertowane do - kodowania znaków ustawionej lokalizacji. Kodowanie znaków dla - lokalizacji można sprawdzić poleceniem locale(1). Jeśli konwersja nie - jest możliwa, wystąpi błąd, a plik zostanie pominięty. - - Pod Windows pliki UTF-16 są domyślnie konwertowane do UTF-8. Pliki - tekstkowe w kodowaniu UTF-8 są dobrze obsługiwane zarówno pod Windows, - jak i Uniksem/Linuksem. - - Kodowania UTF-16 i UTF-8 są w pełni zgodne, konwersja nie spowoduje - utraty żadnej części tekstu. W przypadku wystąpienia błędu konwersji, na - przykład w przypadku błędu w pliku wejściowym UTF-16, plik zostanie - pominięty. - - W przypadku użycia opcji "-u", plik wejściowy zostanie zapisany w tym - samym kodowaniu UTF-16, co plik wejściowy. Opcja "-u" zapobiega - konwersji do UTF-8. - - Dos2unix oraz unix2dos nie mają opcji pozwalającej na konwersję plików - UTF-8 do UTF-16. - - Tryby konwersji ISO i 7-bit nie działają na plikach UTF-16. - - Znacznik BOM - W systemie Windows pliki tekstowe zwykle zawierają znacznik BOM (Byte - Order Mark), ponieważ wiele programów dla Windows (w tym Notepad) dodaje - domyślnie znaczniki BOM. Więcej informacji można znaleźć pod adresem - . - - Pod Uniksem pliki Unicode zwykle nie mają znacznika BOM. Pliki tekstowe - są traktowane jako kodowane zgodnie z kodowaniem znaków ustawionej - lokalizacji. - - Dos2unix potrafi wykryć tylko, czy plik jest w formacie UTF-16, jeśli - zawiera znacznik BOM. Jeśli plik UTF-16 nie ma tego znacznika, dos2unix - potraktuje plik jako binarny. - - Do konwersji pliku UTF-16 bez znacznika BOM można użyć opcji "-ul" lub - "-ub". - - Dos2unix nie zapisuje domyślnie znaku BOM w pliku wyjściowym. Z opcją - "-b" Dos2unix zapisuje BOM, jeśli plik wejściowy zawiera BOM. - - Unix2dos domyślnie zapisuje znaczniki BOM w pliku wyjściowym, jeśli plik - wejściowy ma BOM. Aby usunąć BOM, można użyć opcji "-r". - - Dos2unix oraz unix2dos zawsze zapisują znaczniki BOM, jeśli użyta - zostanie opcja "-m". - - Przykłady Unicode - Konwersja pliku UTF-16 (z BOM) z formatu Windows do uniksowego UTF-8: - - dos2unix -n in.txt out.txt - - Konwersja pliku UTF-16LE (bez BOM) z formatu Windows do uniksowego - UTF-8: - - dos2unix -ul -n in.txt out.txt - - Konwersja z uniksowego UTF-8 do UTF-8 z BOM dla Windows: - - unix2dos -m -n in.txt out.txt - - Konwersja z uniksowego UTF-8 do UTF-16 dla Windows: - - unix2dos < in.txt | iconv -f UTF-8 -t UTF-16 > out.txt - -GB18030 - GB18030 to standard urzędowy w Chinach. Obowiązkowy podzbiór standardu - GB18030 jest oficjalnym wymaganiem każdego oprogramowania sprzedawanego - w Chinach. Więcej pod adresem . - - GB18030 jest w pełni zgodny z Unicode i może być uważany za format - transformacji unikodu. Podobnie jak UTF-8, GB18030 jest zgodny z ASCII. - Jest także zgodny ze stroną kodową Windows 936, znaną też jako GBK. - - Pod Uniksem/Linuksem pliki UTF-16 są konwertowane do GB18030, jeśli - kodowanie dla lokalizacji jest ustawione na GB18030. Uwaga: będzie to - działać tylko dla lokalizacji chińskiej. W przypadku np. ustawienia - lokalizacji angielskiej/brytyjskiej "en_GB.GB18030" konwersja UTF-16 do - GB18030 nie będzie działać, a dla lokalizacji chińskiej "zh_CN.GB18030" - będzie. - - Pod Windows w celu konwersji plików UTF-16 do GB18030 należy użyć opcji - "-gb". - - Pliki w kodowaniu GB18030 mogą mieć znacznik BOM, podobnie jak pliki w - Unicode. - -PRZYKŁADY - Odczyt ze standardowego wejścia i zapis na standardowe wyjście: - - dos2unix - dos2unix -l -c mac - - Konwersja i zastąpienie a.txt; konwersja i zastąpienie b.txt: - - dos2unix a.txt b.txt - dos2unix -o a.txt b.txt - - Konwersja i zastąpienie a.txt w trybie ascii: - - dos2unix a.txt - - Konwersja i zastąpienie a.txt w trybie ascii; konwersja i zastąpienie - b.txt w trybie 7-bitowym: - - dos2unix a.txt -c 7bit b.txt - dos2unix -c ascii a.txt -c 7bit b.txt - dos2unix -ascii a.txt -7 b.txt - - Konwersja a.txt z formatu Mac do formatu uniksowego: - - dos2unix -c mac a.txt - mac2unix a.txt - - Konwersja a.txt z formatu uniksowego do formatu Mac: - - unix2dos -c mac a.txt - unix2mac a.txt - - Konwersja i zastąpienie a.txt z zachowaniem oryginalnego znacznika - czasu: - - dos2unix -k a.txt - dos2unix -k -o a.txt - - Konwersja a.txt i zapis do e.txt: - - dos2unix -n a.txt e.txt - - Konwersja a.txt i zapis do e.txt z zachowaniem znacznika czasu e.txt - takiego, jak a.txt: - - dos2unix -k -n a.txt e.txt - - Konwersja i zastąpienie a.txt; konwersja b.txt i zapis do e.txt: - - dos2unix a.txt -n b.txt e.txt - dos2unix -o a.txt -n b.txt e.txt - - Konwersja c.txt i zapis do e.txt; konwersja i zastąpienie a.txt; - konwersja i zastąpienie b.txt; konwersja d.txt i zapis do f.txt: - - dos2unix -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt - -KONWERSJA REKURENCYJNA - Można użyć dos2unix w połączeniu z poleceniami find(1) i xargs(1) do - rekurencyjnej konwersji plików tekstowych w strukturze drzewa katalogów. - Na przykład, aby przekonwertować wszystkie pliki .txt w drzewie - katalogów poniżej katalogu bieżącego, należy napisać: - - find . -name *.txt |xargs dos2unix - -LOKALIZACJA - LANG - Główny język wybiera się zmienną środowiskową LANG. Zmienna LANG - składa się z kilku części. Pierwsza część to małe litery oznaczające - kod języka. Druga część jest opcjonalna i zawiera kod kraju pisany - wielkimi literami, poprzedzony podkreśleniem. Jest także opcjonalna - trzecia część: kodowanie znaków, poprzedzone kropką. Kilka - przykładów dla powłok zgodnych ze standardem POSIX: - - export LANG=nl holenderski - export LANG=nl_NL holenderski, Holandia - export LANG=nl_BE holenderski, Belgia - export LANG=es_ES hiszpański, Hiszpania - export LANG=es_MX hiszpański, Meksyk - export LANG=en_US.iso88591 angielski, USA, kodowanie Latin-1 - export LANG=en_GB.UTF-8 angielski, Wlk. Brytania, kodowanie UTF-8 - - Pełną listę kodów języków i krajów można znaleźć w podręczniku do - gettexta: - - - W systemach uniksowych do uzyskania informacji dotyczących - lokalizacji można użyć polecenia locale(1). - - LANGUAGE - Przy użyciu zmiennej środowiskowej LANGUAGE można określić listę - języków wg priorytetu, oddzielonych dwukropkami. Dos2unix przyjmuje - pierwszeństwo zmiennej LANGUAGE nad LANG. Na przykład, najpierw - holenderski, następnie niemiecki: "LANGUAGE=nl:de". Aby skorzystać z - listy wg priorytetów ze zmiennej LANGUAGE, trzeba najpierw włączyć - lokalizację przez ustawienie zmiennej LANG (lub LC_ALL) na wartość - inną niż "C". Więcej informacji znajduje się w podręczniku do - gettexta: - - - W przypadku wybrania niedostępnego języka, otrzymamy standardowe, - angielskie komunikaty. - - DOS2UNIX_LOCALEDIR - Przy użyciu zmiennej środowiskowej DOS2UNIX_LOCALEDIR, można - nadpisać ustawienie LOCALEDIR z czasu kompilacji. LOCALEDIR to - katalog używany do znalezienia plików lokalizacji. Domyślną - wartością dla GNU jest "/usr/local/share/locale". Opcja --version - wyświetla używaną wartość LOCALEDIR. - - Przykład (dla powłoki POSIX): - - export DOS2UNIX_LOCALEDIR=$HOME/share/locale - -WARTOŚĆ ZWRACANA - W przypadku powodzenia zwracane jest zero. Jeśli wystąpi błąd systemowy, - zwracany jest ostatni błąd systemowy. W przypadku innych błędów zwracane - jest 1. - - Wartość zwracana w trybie cichym to zawsze zero, z wyjątkiem sytuacji - podania błędnych opcji linii poleceń. - -STANDARDY - - - - - - - - -AUTORZY - Benjamin Lin ; Bernd Johannes Wuebben (tryb - mac2unix) ; Christian Wurll (dodawanie dodatkowej nowej - linii) ; Erwin Waterlander - (prowadzący) - - Strona projektu: - - Strona SourceForge: - -ZOBACZ TAKŻE - file(1) find(1) iconv(1) locale(1) xargs(1) - diff --git a/Tools/dos2unix/share/doc/dos2unix-7.2/pt_BR/dos2unix.htm b/Tools/dos2unix/share/doc/dos2unix-7.2/pt_BR/dos2unix.htm deleted file mode 100644 index 1326338..0000000 --- a/Tools/dos2unix/share/doc/dos2unix-7.2/pt_BR/dos2unix.htm +++ /dev/null @@ -1,654 +0,0 @@ - - - - -dos2unix 7.2 - Conversor de formato de arquivo texto de DOS/Mac para Unix e vice-versa - - - - - - - - - - -

NOME

- -

dos2unix - Conversor de formato de arquivo texto de DOS/Mac para Unix e vice-versa

- -

SINOPSE

- -
    dos2unix [opções] [ARQUIVO ...] [-n ARQENT ARQSAÍDA ...]
-    unix2dos [opções] [ARQUIVO ...] [-n ARQENT ARQSAÍDA ...]
- -

DESCRIÇÃO

- -

O pacote Dos2unix inclui utilitários de dos2unix e unix2dos para converter arquivos texto nos formatos DOS ou Mac para formato Unix e vice-versa.

- -

Em arquivos texto DOS/Windows uma quebra de linha, também conhecida como nova linha, é uma combinação de dois caracteres: um Carriage Return (CR) seguido por um Line Feed (LF). Em arquivos texto do Unix uma quebra de linha é um único caractere: o Line Feed (LF). Em arquivos texto do Mac, anteriores ao Mac OS X, uma quebra de linha era um único caractere Carriage Return (CR). Hoje em dia, Mac OS usa quebras de linha no estilo do Unix (LF).

- -

Além das quebras de linhas, Dos2unix também pode converter as codificações de arquivos. Algumas poucas páginas podem ser convertidos para Latin-1 para Unix. E arquivos Unicode do Windows (UTF-16) podem ser convertidos para arquivos Unicode do Unix (UTF-8).

- -

Arquivos binários são ignorados automaticamente, a menos que a conversão seja forçada.

- -

Arquivos não regulares, tais como diretórios e FIFOs, são ignorados automaticamente.

- -

Ligações simbólicas e seus alvos são por padrão mantidas intocáveis. Ligações simbólicas podem opcionalmente ser substituídas, ou a saída pode ser escrita para o alvo das ligações simbólicas. Não há suporte às ligações simbólicas do Windows.

- -

Dos2unix foi modelado seguindo dos2unix do SunOS/Solaris. Há uma diferença importante em relação à versão original do SunOS/Solaris. Essa versão faz conversão no-lugar (modo arquivo antigo) por padrão, enquanto a versão original do SunOS/Solaris fornecia suporte apenas a conversão pareada (modo de novo arquivo). Veja também as opções -o e -n.

- -

OPÇÕES

- -
- -
--
-
- -

Trata as opções seguintes como nomes de arquivos. Use essa opção se você quiser converter arquivos cujos nomes iniciam com um traço. Por exemplo, para converter um arquivo chamado "foo", você pode usar este comando:

- -
    dos2unix -- -foo
- -

Ou em modo de novo arquivo:

- -
    dos2unix -n -- -foo saída.txt
- -
-
-ascii
-
- -

Converte apenas as quebras de linhas. Esse é o modo de conversão padrão.

- -
-
-iso
-
- -

Conversão entre conjunto de caractere do DOS e ISO-8859-1. Veja também a seção MODOS DE CONVERSÃO.

- -
-
-1252
-
- -

Usa a página de código 1252 do Windows (Europa ocidental).

- -
-
-437
-
- -

Usa a página de código 437 do DOS (EUA). Essa é a página de código padrão usada para conversão ISO.

- -
-
-850
-
- -

Usa a página de código 850 do DOS (Europa ocidental).

- -
-
-860
-
- -

Usa a página de código 860 do DOS (Português).

- -
-
-863
-
- -

Usa a página de código 863 do DOS (Francês do Canadá).

- -
-
-865
-
- -

Usa a página de código 865 do DOS (Nórdico).

- -
-
-7
-
- -

Converte caracteres de 8 bit para espaço de 7 bit.

- -
-
-b, --keep-bom
-
- -

Mantém marca de ordem de bytes (BOM). Quando o arquivo de entrada possuir um BOM, escreve um BOM no arquivo de saída. Esse é o comportamento padrão ao converter para quebras de linha do DOS. Veja também a opção -r.

- -
-
-c, --convmode MODOCONV
-
- -

Define o modo de conversão, sendo MODOCONV um dentre: ascii, 7bit, iso, mac com ascii sendo o padrão.

- -
-
-f, --force
-
- -

Força a conversão de arquivos binários.

- -
-
-gb, --gb18030
-
- -

No Windows, arquivos UTF-16 são convertidos, por padrão, para UTF-8, independentemente da localização definida. Use esta opção para converter arquivos UTF-16 para GB18030. Essa opção está disponível apenas no Windows. Veja também a seção GB18030.

- -
-
-h, --help
-
- -

Exibe ajuda e sai.

- -
-
-i[OPÇÕES], --info[=OPÇÕES] ARQUIVO ...
-
- -

Exibe informação do arquivo. Nenhuma conversão é feita.

- -

A seguinte informação é exibida, nesta ordem: número de quebras de linha do DOS, número de quebras de linha do Unix, número de quebras de linha do Mac, marca de ordem de byte, "text" ou "binário", nome de arquivo.

- -

Saída de exemplo:

- -
     6       0       0  no_bom    text    dos.txt
-     0       6       0  no_bom    text    unix.txt
-     0       0       6  no_bom    text    mac.txt
-     6       6       6  no_bom    text    mixed.txt
-    50       0       0  UTF-16LE  text    utf16le.txt
-     0      50       0  no_bom    text    utf8unix.txt
-    50       0       0  UTF-8     text    utf8dos.txt
-     2     418     219  no_bom    binary  dos2unix.exe
- -

Opcionalmente, opções extra podem ser definidas para alterar a saída. Uma ou mais opções podem ser adicionadas.

- -
- -
d
-
- -

Exibe o número de quebras de linhas do DOS.

- -
-
u
-
- -

Exibe o número de quebras de linhas do Unix.

- -
-
m
-
- -

Exibe o número de quebras de linhas do Mac.

- -
-
b
-
- -

Exibe a marca de ordem de byte.

- -
-
t
-
- -

Exibe se arquivo é texto ou binário.

- -
-
c
-
- -

Exib apenas os arquivos que seriam convertidos.

- -

Com a opção c, dos2unix vai exibir apenas os arquivos que contêm quebras de linha do DOS, unix2dos vai exibir apenas os nomes de arquivos que contêm quebras de linha do Unix.

- -
-
- -

Exemplos:

- -

Mostra informação sobre todos os arquivos *.txt:

- -
    dos2unix -i *.txt
- -

Mostra apenas o número de quebras de linha DOS e Unix:

- -
    dos2unix -idu *.txt
- -

Mostra apenas a marca de ordem de byte:

- -
    dos2unix --info=b *.txt
- -

Lista os arquivos que possuem quebras de linha do DOS:

- -
    dos2unix -ic *.txt
- -

Lista os arquivos que possuem quebras de linha do Unix:

- -
    unix2dos -ic *.txt
- -
-
-k, --keepdate
-
- -

Mantém a marca da data do arquivo de saída igual ao do arquivo de entrada.

- -
-
-L, --license
-
- -

Exibe a licença do programa.

- -
-
-l, --newline
-
- -

Adiciona nova linha adicional.

- -

dos2unix: Apenas quebras de linha do DOS são alteradas para duas quebras de linha do Unix. No modo Mac, apenas quebras de linha do Mac são alterados para duas quebras de linha do Unix.

- -

unix2dos: Apenas quebras de linha do Unix são alteradas para duas quebras de linha do DOS. No modo Mac, quebras de linha do Unix são alteradas para duas quebras de linha do Mac.

- -
-
-m, --add-bom
-
- -

Escreve uma marca de ordem de byte (BOM) no arquivo de saída. Por padrão, um BOM UTF-8 é escrito.

- -

Quando o arquivo de entrada é UTF-16, e a opção -u é usada, um BOM UTF-16 será escrito.

- -

Nunca use essa opção quando a codificação de saída é outra além de UTF-8 ou UTF-16. Veja também a seção UNICODE.

- -
-
-n, --newfile ARQENT ARQSAÍDA ...
-
- -

Modo de novo arquivo. Converte o arquivo ARQENT e escreve a saída para o arquivo ARQSAÍDA. Os nomes de arquivos devem ser fornecidos em pares e nome coringa não deveriam ser usados ou você vai perder seus arquivos.

- -

A pessoa que começa a conversão em modo novo arquivo (pareado) será o dono do arquivo convertido. As permissões de leitura/escrita do novo arquivo serão as permissões do arquivo original menos a umask(1) da pessoa que executa a conversão.

- -
-
-o, --oldfile ARQUIVO ...
-
- -

Modo arquivo antigo. Converte o arquivo ARQUIVO e o sobrescreve com a saída. O programa, por padrão, executa neste modo. Nomes coringas podem ser usados.

- -

No modo de arquivo antigo (no-lugar) o arquivo convertido recebe no mesmo dono, grupo e permissões de leitura/escrita que o arquivo original. Também, quando o arquivo é convertido por outro usuário que tenha permissões de escrita no arquivo (ex.: usuário root). A conversão será abortada quando não for possível preservar os valores originais. Alteração do dono pode significar que o dono original não é mais capaz de ler o arquivo. Alteração do grupo pode ser um risco para a segurança, pois o arquivo pode ficar legível para pessoas cujo acesso não é desejado. Preservação do dono, grupo e permissões de leitura/escrita tem suporte apenas no Unix.

- -
-
-q, --quiet
-
- -

Modo quieto. Suprime todos os avios e mensagens. O valor retornado é zero. Exceto quando opções de linha de comando erradas forem usadas.

- -
-
-r, --remove-bom
-
- -

remove marca de ordem de bytes (BOM). Não escreve um BOM no arquivo de saída. Esse é o comportamento padrão ao converter para quebras de linha Unix. Veja também a opção -b.

- -
-
-s, --safe
-
- -

Ignora arquivo binários (padrão).

- -
-
-u, --keep-utf16
-
- -

Mantém a codificação UTF-16 original do arquivo de entrada. O arquivo de saída será escrito na mesma codificação UTF-16, em little ou big endian, como o arquivo de entrada. Isso evita transformação para UTF-8. Como consequência, um BOM UTF-16 será escrito. Essa opção pode ser desabilitada com a opção -ascii.

- -
-
-ul, --assume-utf16le
-
- -

Presume que o formato de arquivo de entrada é UTF-16LE.

- -

Quando há uma marca de ordem de byte no arquivo de entrada, esta tem prioridade sobre essa opção.

- -

Quando você fizer uma presunção equivocada (o arquivo de entrada não estava no formato UTF-16LE) e a conversão funcionar, você terá um arquivo de saída UTF-8 com texto errado. Você pode desfazer a conversão errada com iconv(1) pela conversão do arquivo de saída UTF-8 de volta para UTF-16LE. Isso vai trazer de volta o arquivo para o original.

- -

A presunção de UTF-16LE funciona como um modo de conversão. Ao alternara o modo ascii padrão, a presunção de UTF-16LE é desativada.

- -
-
-ub, --assume-utf16be
-
- -

Presume que o formato de arquivo de entrada é UTF-16BE.

- -

Essa opção funciona o mesmo que a opção -ul.

- -
-
-v, --verbose
-
- -

Exibe mensagens detalhadas. Informação extra é exibida sobre marcas de ordem de byte e a quantidade de quebras de linha convertidas.

- -
- -
- -

Segue ligações simbólicas e converte os alvos.

- -
- -
- -

Substitui ligações simbólicas com arquivos convertidos (arquivos alvo originais permanecem inalterados).

- -
- -
- -

Mentém ligações simbólicas e alvos inalterados (padrão).

- -
-
-V, --version
-
- -

Exibe informação da versão e sai.

- -
-
- -

MODO MAC

- -

No modo normal, as quebras de linhas são convertidas de DOS para Unix e vice-versa. Quebras de linha do Mac não são convertidas.

- -

No modo Mac, quebras de linha são convertidas de Mac para Unix e vice-versa. Quebras de linha do DOS não são alteradas.

- -

Para executar no modo Mac, use a opção de linha de comando -c mac ou use os comandos mac2unix ou unix2mac.

- -

MODOS DE CONVERSÃO

- -
- -
ascii
-
- -

No modo ascii, apenas as quebras de linha são convertidas. Esse é o modo de conversão padrão.

- -

Apesar do nome deste modo ser ASCII, o qual é um padrão de 7 bit, o modo é em verdade 8 bit. Sempre use este modo quando quiser converter arquivos Unicode UTF-8.

- -
-
7bit
-
- -

Neste modo todos os caracteres não-ASCII de 8 bit (com valores entre 128 e 255) são convertidos para um espaço de 7 bit.

- -
-
iso
-
- -

Caracteres são convertidos entre um conjunto de caracteres do DOS (página de código) e conjunto de caracteres ISO-8859-1 (Latin-1) no Unix. Caracteres de DOS sem um equivalente ISO-8859-1, para os quais a conversão não é possível, são convertidos para um ponto. O mesmo vale para caracteres ISO-8859-1 sem a contraparte DOS.

- -

Quando apenas a opção -iso for usada, dos2unix vai tentar determinar a página de código ativa. Quando isso não for possível, dos2unix vai usar a página de código padrão CP437, a qual é usada principalmente nos EUA. Para forçar uma página de código específica, use as opções -437 (EUA), -850 (Europeu oriental), -860 (Português), -863 (Franco-canadense) ou -865 (Nórdico). Também há suporte à página de código do Windows CP1252 (Europeu ocidental) com a opção -1252. Para outras páginas de código, use dos2unix em combinação cm iconv(1). Iconv pode converter entre uma lista grande de codificações de caracteres.

- -

Nunca use conversão ISO em arquivos textos Unicode. Isso vai corromper os arquivos codificados em UTF-8.

- -

Alguns exemplos:

- -

Conversão da página de código padrão do DOS para Latin-1 do Unix:

- -
    dos2unix -iso -n entrada.txt saída.txt
- -

Conversão da CP850 do DOS para Latin-1 do Unix:

- -
    dos2unix -850 -n entrada.txt saída.txt
- -

Conversão da CP1252 do Windows para Latin-1 do Unix:

- -
    dos2unix -1252 -n entrada.txt saída.txt
- -

Conversão da CP1252 do Windows para UTF-8 (Unicode) do Unix:

- -
    iconv -f CP1252 -t UTF-8 entrada.txt | dos2unix > saída.txt
- -

Conversão de Latin-1 do Unix para página de código padrão do DOS:

- -
    unix2dos -iso -n entrada.txt saída.txt
- -

Conversão do Latin-1 do Unix para CP850 do DOS:

- -
    unix2dos -850 -n entrada.txt saída.txt
- -

Conversão do Latin-1 do unix para CP1252 do Windows:

- -
    unix2dos -1252 -n entrada.txt saída.txt
- -

Conversão do UTF-8 (Unicode) do Unix para CP1252 do Windows:

- -
    unix2dos < entrada.txt | iconv -f UTF-8 -t CP1252 > saída.txt
- -

Veja também http://czyborra.com/charsets/codepages.html e http://czyborra.com/charsets/iso8859.html.

- -
-
- -

UNICODE

- -

Codificações

- -

Exitem codificações Unicode diferentes. No Unix e no Linux, arquivos Unicode são geralmente codificados em UTF-8. No Windows, arquivos texto Unicode podem ser codificados em UTF-8, UTF-16 ou UTF-16 big endian, mas na maioria das vezes são codificados no formato UTF-16.

- -

Conversão

- -

Arquivos texto em Unicode pode ter quebras de linha DOS, Unix ou Mac, como arquivos texto comuns.

- -

Todas as versões do dos2unix e unix2dos podem converter arquivos codificados em UTF-8 porque UTF-8 foi projetado para ter compatibilidade reversa com ASCII.

- -

Dos2unix e unix2dos com suporte a Unicode UTF-16 podem ler arquivos texto codificados em little e big endian UTF-16. Para ver se dos2unix foi compilado com suporte a UTF-16, digite dos2unix -V.

- -

No Unix/Linux, arquivos codificados em UTF-16 são convertidos para a codificação de caracteres do localização. Use o comando locale(1) para descobrir qual é a codificação de caracteres da localização. Quando a conversão não for possível, ocorrerá um erro e o arquivo será ignorado.

- -

No Windows, arquivos UTF-16 são convertidos, por padrão, para UTF-8. Arquivos texto formatados em UTF-8 possuem ótimo suporte em ambos Windows e Unix/Linux.

- -

Codificações UTF-16 e UTF-8 são completamente compatíveis, não havendo qualquer perda de texto na conversão. Quando um erro de conversão UTF-16 para UTF-8 ocorre, por exemplo quando o arquivo de entrada UTF-16 contém um erro, o arquivo será ignorado.

- -

Quando a opção -u é usada, o arquivo de saída será escrito na mesma codificação UTF-16 que o arquivo de saída. A opção -u evita conversão para UTF-8.

- -

Dos2unix e unix2dos não possuem opção para converter arquivos UTF-8 ára UTF-16.

- -

Modo de conversão ISO e 7-bit não funciona em arquivos UTF-16.

- -

Marca de ordem de byte

- -

No Windows, arquivos Unicode normalmente têm uma Marca de Ordem de Byte (BOM), porque muitos programas (incluindo o Bloco de Notas) adiciona BOMs por padrão. Veja também http://en.wikipedia.org/wiki/Byte_order_mark.

- -

No Unix, arquivos Unicode normalmente não têm BOM. Presume-se que arquivos texto são codificados na codificação de caracteres da localização.

- -

Dos2unix pode detectar apenas se um arquivo está no formato UTF-16 se o arquivo tiver BOM. Quando um arquivo UTF-16 não tiver BOM, dos2unix vai ver se o arquivo é um arquivo binário.

- -

Use a opção -ul ou -ub para converter um arquivo UTF-16 sem BOM.

- -

Dos2unix escreve por padrão nenhum BOM no arquivo de saída. Com a opção -b, o Dos2unix escreve um BOM quando o arquivo de entrada possuir BOM.

- -

Unix2dos escreve por padrão um BOM no arquivo de saída quando o arquivo de entrada tem BOM. Use a opção -m para remover BOM.

- -

Dos2unix e unix2dos sempre escrevem BOM quando a opção -m é usada.

- -

Exemplos de Unicode

- -

Conversão de UTF-16 do Windows (com BOM) para UTF-8 do Unix:

- -
    dos2unix -n entrada.txt saída.txt
- -

Conversão de UTF-16LE do Windows (sem BOM) para UTF-8 do Unix:

- -
    dos2unix -ul -n entrada.txt saída.txt
- -

Conversão de UTF-8 Unix para UTF-8 do Windows com BOM:

- -
    unix2dos -m -n entrada.txt saída.txt
- -

Conversão de UTF-8 do Unix para UTF-16 do Windows:

- -
    unix2dos < entrada.txt | iconv -f UTF-8 -t UTF-16 > saída.txt
- -

GB18030

- -

GB18030 é um padrão governamental chinês. Um subconjunto obrigatório do padrão GB18030 é exigido oficialmente para todos os produtos de software vendidos na China. Veja também http://en.wikipedia.org/wiki/GB_18030.

- -

GB18030 é completamente compatível com Unicode e pode ser considerado um formato de transformação de unicode. Assim como UTF-8, GB18030 é compatível com ASCII. GB18030 também é compatível com a página de código 936 do Windows, também conhecida como GBK.

- -

No Unix/Linux, arquivos UTF-16 são convertidos para GB18030 quando a codificação da localização é definida para GB18030. Note que isso vai funcionar apenas se a localização estiver definida para China. Por exemplo, em uma configuração de localização inglesa (Britânia) a conversão en_GB.GB18030 de UTF-16 para GB18030 não vai funcionar, mas em uma configuração de localização zh_CN.GB18030 chinesa vai funcionar.

- -

No Windows, você precisa usar a opção -gb para converter arquivos UTF-16 para GB18030.

- -

Arquivos codificados em GB18030 possuem uma marca de ordem de bytes, como arquivos Unicode.

- -

EXEMPLOS

- -

Lê a entrada da "stdin" e escreve a saída para "stdout":

- -
    dos2unix
-    dos2unix -l -c mac
- -

Converte e substitui a.txt. Converte e substitui b.txt:

- -
    dos2unix a.txt b.txt
-    dos2unix -o a.txt b.txt
- -

Converte e substitui a.txt no modo de conversão ascii:

- -
    dos2unix a.txt
- -

Converte e substitui a.txt no modo de conversão ascii. Converte e substitui b.txt no modo de conversão 7bit:

- -
    dos2unix a.txt -c 7bit b.txt
-    dos2unix -c ascii a.txt -c 7bit b.txt
-    dos2unix -ascii a.txt -7 b.txt
- -

Converte a.txt do formato do Mac para Unix:

- -
    dos2unix -c mac a.txt
-    mac2unix a.txt
- -

Converte a.txt do formato do Unix para Mac:

- -
    unix2dos -c mac a.txt
-    unix2mac a.txt
- -

Converte e substitui a.txt enquanto mantém a marca de data original:

- -
    dos2unix -k a.txt
-    dos2unix -k -o a.txt
- -

Converte a.txt e escreve para e.txt:

- -
    dos2unix -n a.txt e.txt
- -

Converte a.txt e escreve para e.txt, mantém a marca de data de e.txt igual a a.txt:

- -
    dos2unix -k -n a.txt e.txt
- -

Converte e substitui a.txt. Converte b.txt e escreve para e.txt:

- -
    dos2unix a.txt -n b.txt e.txt
-    dos2unix -o a.txt -n b.txt e.txt
- -

Converte c.txt e escreve para e.txt. Converte e substitui a.txt. Converte e substitui b.txt. Converte d.txt e escreve para f.txt:

- -
    dos2unix -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt
- -

Conversão recursiva

- -

Use dos2unix em combinação com os comandos find(1) e xargs(1) para converter recursivamente arquivos texto em uma estrutura de árvore de diretórios. Por exemplo, para converter todos os arquivos .txt na árvore de diretórios sob o diretório atual, digite:

- -
    find . -name *.txt |xargs dos2unix
- -

LOCALIZAÇÃO

- -
- -
LANG
-
- -

O idioma primário é selecionado com a variável de ambiente LANG. A variável LANG consiste em várias partes. A primeira parte está em letras pequenas no código do idioma. A segunda parte é opcional e é o código do país em letras maiúsculo, precedido de um ponto. Alguns exemplos para shells do tipo padrão POSIX:

- -
    export LANG=nl               Holandês
-    export LANG=nl_NL            Holandês, Holanda
-    export LANG=nl_BE            Holandês, Bélgica
-    export LANG=es_ES            Espanhol, Espanha
-    export LANG=es_MX            Espanhol, México
-    export LANG=en_US.iso88591   Inglês, EUA, codificação Latin-1
-    export LANG=en_GB.UTF-8      Inglês, Reino Unido, codificação UTF-8
- -

Para a lista completa de códigos de idioma e país, veja o manual do gettext: http://www.gnu.org/software/gettext/manual/html_node/Usual-Language-Codes.html

- -

Nos sistemas Unix, você pode usar o comando locale(1) para obter informação específica da localização.

- -
-
LANGUAGE
-
- -

Com a variável de ambiente LANGUAGE, você pode especificar uma lista de prioridades de idiomas, separada por vírgulas. Dos2unix fornece preferência à LANGUAGE sobre LANG. Por exemplo, primeiro holandês e, então, alemão: LANGUAGE=nl:de. Você primeiro tem que habilitar localização, definindo LANG (ou LC_ALL) para um valor diferente de "C", antes que você possa usar uma lista de prioridade de idioma por meio da variável LANGUAGE. Veja também o manual do gettext: http://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html

- -

Se você selecionou um idioma que não está disponível, você vai terá as mensagens em inglês (padrão).

- -
-
DOS2UNIX_LOCALEDIR
-
- -

Com a variável de ambiente DOS2UNIX_LOCALEDIR, o LOCALEDIR definido durante a compilação pode ser sobrescrito. LOCALEDIR é usada para localizar os arquivos de idioma. O valor padrão do GNU é /usr/local/share/locale. A opção --version vai exibir o LOCALEDIR que é usado.

- -

Exemplo (shell POSIX):

- -
    export DOS2UNIX_LOCALEDIR=$HOME/share/locale
- -
-
- -

VALOR RETORNADO

- -

No sucesso, zero é retornado. Quando um erro de sistema ocorre, o último erro de sistema será retornado. Para outros erros, 1 é retornado.

- -

O valor retornado é sempre zero no modo quieto, exceto quando opções de linha de comando erradas são usadas.

- -

PADRÕES

- -

http://en.wikipedia.org/wiki/Text_file

- -

http://en.wikipedia.org/wiki/Carriage_return

- -

http://en.wikipedia.org/wiki/Newline

- -

http://en.wikipedia.org/wiki/Unicode

- -

AUTORES

- -

Benjamin Lin - <blin@socs.uts.edu.au> Bernd Johannes Wuebben (modo mac2unix) - <wuebben@kde.org>, Christian Wurll (adiciona nova linha extra) - <wurll@ira.uka.de>, Erwin Waterlander - <waterlan@xs4all.nl> (mantenedor)

- -

Página do projeto: http://waterlan.home.xs4all.nl/dos2unix.html

- -

Página do SourceForge: http://sourceforge.net/projects/dos2unix/

- -

Veja também

- -

file(1) find(1) iconv(1) locale(1) xargs(1)

- - - - - - - diff --git a/Tools/dos2unix/share/doc/dos2unix-7.2/pt_BR/dos2unix.txt b/Tools/dos2unix/share/doc/dos2unix-7.2/pt_BR/dos2unix.txt deleted file mode 100644 index 1b67379..0000000 --- a/Tools/dos2unix/share/doc/dos2unix-7.2/pt_BR/dos2unix.txt +++ /dev/null @@ -1,608 +0,0 @@ -NOME - dos2unix - Conversor de formato de arquivo texto de DOS/Mac para Unix e - vice-versa - -SINOPSE - dos2unix [opções] [ARQUIVO ...] [-n ARQENT ARQSAÍDA ...] - unix2dos [opções] [ARQUIVO ...] [-n ARQENT ARQSAÍDA ...] - -DESCRIÇÃO - O pacote Dos2unix inclui utilitários de "dos2unix" e "unix2dos" para - converter arquivos texto nos formatos DOS ou Mac para formato Unix e - vice-versa. - - Em arquivos texto DOS/Windows uma quebra de linha, também conhecida como - nova linha, é uma combinação de dois caracteres: um Carriage Return (CR) - seguido por um Line Feed (LF). Em arquivos texto do Unix uma quebra de - linha é um único caractere: o Line Feed (LF). Em arquivos texto do Mac, - anteriores ao Mac OS X, uma quebra de linha era um único caractere - Carriage Return (CR). Hoje em dia, Mac OS usa quebras de linha no estilo - do Unix (LF). - - Além das quebras de linhas, Dos2unix também pode converter as - codificações de arquivos. Algumas poucas páginas podem ser convertidos - para Latin-1 para Unix. E arquivos Unicode do Windows (UTF-16) podem ser - convertidos para arquivos Unicode do Unix (UTF-8). - - Arquivos binários são ignorados automaticamente, a menos que a conversão - seja forçada. - - Arquivos não regulares, tais como diretórios e FIFOs, são ignorados - automaticamente. - - Ligações simbólicas e seus alvos são por padrão mantidas intocáveis. - Ligações simbólicas podem opcionalmente ser substituídas, ou a saída - pode ser escrita para o alvo das ligações simbólicas. Não há suporte às - ligações simbólicas do Windows. - - Dos2unix foi modelado seguindo dos2unix do SunOS/Solaris. Há uma - diferença importante em relação à versão original do SunOS/Solaris. Essa - versão faz conversão no-lugar (modo arquivo antigo) por padrão, enquanto - a versão original do SunOS/Solaris fornecia suporte apenas a conversão - pareada (modo de novo arquivo). Veja também as opções "-o" e "-n". - -OPÇÕES - -- Trata as opções seguintes como nomes de arquivos. Use essa opção se - você quiser converter arquivos cujos nomes iniciam com um traço. Por - exemplo, para converter um arquivo chamado "foo", você pode usar - este comando: - - dos2unix -- -foo - - Ou em modo de novo arquivo: - - dos2unix -n -- -foo saída.txt - - -ascii - Converte apenas as quebras de linhas. Esse é o modo de conversão - padrão. - - -iso - Conversão entre conjunto de caractere do DOS e ISO-8859-1. Veja - também a seção MODOS DE CONVERSÃO. - - -1252 - Usa a página de código 1252 do Windows (Europa ocidental). - - -437 - Usa a página de código 437 do DOS (EUA). Essa é a página de código - padrão usada para conversão ISO. - - -850 - Usa a página de código 850 do DOS (Europa ocidental). - - -860 - Usa a página de código 860 do DOS (Português). - - -863 - Usa a página de código 863 do DOS (Francês do Canadá). - - -865 - Usa a página de código 865 do DOS (Nórdico). - - -7 Converte caracteres de 8 bit para espaço de 7 bit. - - -b, --keep-bom - Mantém marca de ordem de bytes (BOM). Quando o arquivo de entrada - possuir um BOM, escreve um BOM no arquivo de saída. Esse é o - comportamento padrão ao converter para quebras de linha do DOS. Veja - também a opção "-r". - - -c, --convmode MODOCONV - Define o modo de conversão, sendo MODOCONV um dentre: *ascii*, - *7bit*, *iso*, *mac* com ascii sendo o padrão. - - -f, --force - Força a conversão de arquivos binários. - - -gb, --gb18030 - No Windows, arquivos UTF-16 são convertidos, por padrão, para UTF-8, - independentemente da localização definida. Use esta opção para - converter arquivos UTF-16 para GB18030. Essa opção está disponível - apenas no Windows. Veja também a seção GB18030. - - -h, --help - Exibe ajuda e sai. - - -i[OPÇÕES], --info[=OPÇÕES] ARQUIVO ... - Exibe informação do arquivo. Nenhuma conversão é feita. - - A seguinte informação é exibida, nesta ordem: número de quebras de - linha do DOS, número de quebras de linha do Unix, número de quebras - de linha do Mac, marca de ordem de byte, "text" ou "binário", nome - de arquivo. - - Saída de exemplo: - - 6 0 0 no_bom text dos.txt - 0 6 0 no_bom text unix.txt - 0 0 6 no_bom text mac.txt - 6 6 6 no_bom text mixed.txt - 50 0 0 UTF-16LE text utf16le.txt - 0 50 0 no_bom text utf8unix.txt - 50 0 0 UTF-8 text utf8dos.txt - 2 418 219 no_bom binary dos2unix.exe - - Opcionalmente, opções extra podem ser definidas para alterar a - saída. Uma ou mais opções podem ser adicionadas. - - d Exibe o número de quebras de linhas do DOS. - - u Exibe o número de quebras de linhas do Unix. - - m Exibe o número de quebras de linhas do Mac. - - b Exibe a marca de ordem de byte. - - t Exibe se arquivo é texto ou binário. - - c Exib apenas os arquivos que seriam convertidos. - - Com a opção "c", dos2unix vai exibir apenas os arquivos que - contêm quebras de linha do DOS, unix2dos vai exibir apenas os - nomes de arquivos que contêm quebras de linha do Unix. - - Exemplos: - - Mostra informação sobre todos os arquivos *.txt: - - dos2unix -i *.txt - - Mostra apenas o número de quebras de linha DOS e Unix: - - dos2unix -idu *.txt - - Mostra apenas a marca de ordem de byte: - - dos2unix --info=b *.txt - - Lista os arquivos que possuem quebras de linha do DOS: - - dos2unix -ic *.txt - - Lista os arquivos que possuem quebras de linha do Unix: - - unix2dos -ic *.txt - - -k, --keepdate - Mantém a marca da data do arquivo de saída igual ao do arquivo de - entrada. - - -L, --license - Exibe a licença do programa. - - -l, --newline - Adiciona nova linha adicional. - - dos2unix: Apenas quebras de linha do DOS são alteradas para duas - quebras de linha do Unix. No modo Mac, apenas quebras de linha do - Mac são alterados para duas quebras de linha do Unix. - - unix2dos: Apenas quebras de linha do Unix são alteradas para duas - quebras de linha do DOS. No modo Mac, quebras de linha do Unix são - alteradas para duas quebras de linha do Mac. - - -m, --add-bom - Escreve uma marca de ordem de byte (BOM) no arquivo de saída. Por - padrão, um BOM UTF-8 é escrito. - - Quando o arquivo de entrada é UTF-16, e a opção "-u" é usada, um BOM - UTF-16 será escrito. - - Nunca use essa opção quando a codificação de saída é outra além de - UTF-8 ou UTF-16. Veja também a seção UNICODE. - - -n, --newfile ARQENT ARQSAÍDA ... - Modo de novo arquivo. Converte o arquivo ARQENT e escreve a saída - para o arquivo ARQSAÍDA. Os nomes de arquivos devem ser fornecidos - em pares e nome coringa *não* deveriam ser usados ou você *vai* - perder seus arquivos. - - A pessoa que começa a conversão em modo novo arquivo (pareado) será - o dono do arquivo convertido. As permissões de leitura/escrita do - novo arquivo serão as permissões do arquivo original menos a - umask(1) da pessoa que executa a conversão. - - -o, --oldfile ARQUIVO ... - Modo arquivo antigo. Converte o arquivo ARQUIVO e o sobrescreve com - a saída. O programa, por padrão, executa neste modo. Nomes coringas - podem ser usados. - - No modo de arquivo antigo (no-lugar) o arquivo convertido recebe no - mesmo dono, grupo e permissões de leitura/escrita que o arquivo - original. Também, quando o arquivo é convertido por outro usuário - que tenha permissões de escrita no arquivo (ex.: usuário root). A - conversão será abortada quando não for possível preservar os valores - originais. Alteração do dono pode significar que o dono original não - é mais capaz de ler o arquivo. Alteração do grupo pode ser um risco - para a segurança, pois o arquivo pode ficar legível para pessoas - cujo acesso não é desejado. Preservação do dono, grupo e permissões - de leitura/escrita tem suporte apenas no Unix. - - -q, --quiet - Modo quieto. Suprime todos os avios e mensagens. O valor retornado é - zero. Exceto quando opções de linha de comando erradas forem usadas. - - -r, --remove-bom - remove marca de ordem de bytes (BOM). Não escreve um BOM no arquivo - de saída. Esse é o comportamento padrão ao converter para quebras de - linha Unix. Veja também a opção "-b". - - -s, --safe - Ignora arquivo binários (padrão). - - -u, --keep-utf16 - Mantém a codificação UTF-16 original do arquivo de entrada. O - arquivo de saída será escrito na mesma codificação UTF-16, em little - ou big endian, como o arquivo de entrada. Isso evita transformação - para UTF-8. Como consequência, um BOM UTF-16 será escrito. Essa - opção pode ser desabilitada com a opção "-ascii". - - -ul, --assume-utf16le - Presume que o formato de arquivo de entrada é UTF-16LE. - - Quando há uma marca de ordem de byte no arquivo de entrada, esta tem - prioridade sobre essa opção. - - Quando você fizer uma presunção equivocada (o arquivo de entrada não - estava no formato UTF-16LE) e a conversão funcionar, você terá um - arquivo de saída UTF-8 com texto errado. Você pode desfazer a - conversão errada com iconv(1) pela conversão do arquivo de saída - UTF-8 de volta para UTF-16LE. Isso vai trazer de volta o arquivo - para o original. - - A presunção de UTF-16LE funciona como um *modo de conversão*. Ao - alternara o modo *ascii* padrão, a presunção de UTF-16LE é - desativada. - - -ub, --assume-utf16be - Presume que o formato de arquivo de entrada é UTF-16BE. - - Essa opção funciona o mesmo que a opção "-ul". - - -v, --verbose - Exibe mensagens detalhadas. Informação extra é exibida sobre marcas - de ordem de byte e a quantidade de quebras de linha convertidas. - - -F, --follow-symlink - Segue ligações simbólicas e converte os alvos. - - -R, --replace-symlink - Substitui ligações simbólicas com arquivos convertidos (arquivos - alvo originais permanecem inalterados). - - -S, --skip-symlink - Mentém ligações simbólicas e alvos inalterados (padrão). - - -V, --version - Exibe informação da versão e sai. - -MODO MAC - No modo normal, as quebras de linhas são convertidas de DOS para Unix e - vice-versa. Quebras de linha do Mac não são convertidas. - - No modo Mac, quebras de linha são convertidas de Mac para Unix e - vice-versa. Quebras de linha do DOS não são alteradas. - - Para executar no modo Mac, use a opção de linha de comando "-c mac" ou - use os comandos "mac2unix" ou "unix2mac". - -MODOS DE CONVERSÃO - ascii - No modo "ascii", apenas as quebras de linha são convertidas. Esse é - o modo de conversão padrão. - - Apesar do nome deste modo ser ASCII, o qual é um padrão de 7 bit, o - modo é em verdade 8 bit. Sempre use este modo quando quiser - converter arquivos Unicode UTF-8. - - 7bit - Neste modo todos os caracteres não-ASCII de 8 bit (com valores entre - 128 e 255) são convertidos para um espaço de 7 bit. - - iso Caracteres são convertidos entre um conjunto de caracteres do DOS - (página de código) e conjunto de caracteres ISO-8859-1 (Latin-1) no - Unix. Caracteres de DOS sem um equivalente ISO-8859-1, para os quais - a conversão não é possível, são convertidos para um ponto. O mesmo - vale para caracteres ISO-8859-1 sem a contraparte DOS. - - Quando apenas a opção "-iso" for usada, dos2unix vai tentar - determinar a página de código ativa. Quando isso não for possível, - dos2unix vai usar a página de código padrão CP437, a qual é usada - principalmente nos EUA. Para forçar uma página de código específica, - use as opções -437 (EUA), -850 (Europeu oriental), -860 (Português), - -863 (Franco-canadense) ou -865 (Nórdico). Também há suporte à - página de código do Windows CP1252 (Europeu ocidental) com a opção - -1252. Para outras páginas de código, use dos2unix em combinação cm - iconv(1). Iconv pode converter entre uma lista grande de - codificações de caracteres. - - Nunca use conversão ISO em arquivos textos Unicode. Isso vai - corromper os arquivos codificados em UTF-8. - - Alguns exemplos: - - Conversão da página de código padrão do DOS para Latin-1 do Unix: - - dos2unix -iso -n entrada.txt saída.txt - - Conversão da CP850 do DOS para Latin-1 do Unix: - - dos2unix -850 -n entrada.txt saída.txt - - Conversão da CP1252 do Windows para Latin-1 do Unix: - - dos2unix -1252 -n entrada.txt saída.txt - - Conversão da CP1252 do Windows para UTF-8 (Unicode) do Unix: - - iconv -f CP1252 -t UTF-8 entrada.txt | dos2unix > saída.txt - - Conversão de Latin-1 do Unix para página de código padrão do DOS: - - unix2dos -iso -n entrada.txt saída.txt - - Conversão do Latin-1 do Unix para CP850 do DOS: - - unix2dos -850 -n entrada.txt saída.txt - - Conversão do Latin-1 do unix para CP1252 do Windows: - - unix2dos -1252 -n entrada.txt saída.txt - - Conversão do UTF-8 (Unicode) do Unix para CP1252 do Windows: - - unix2dos < entrada.txt | iconv -f UTF-8 -t CP1252 > saída.txt - - Veja também e - . - -UNICODE - Codificações - Exitem codificações Unicode diferentes. No Unix e no Linux, arquivos - Unicode são geralmente codificados em UTF-8. No Windows, arquivos texto - Unicode podem ser codificados em UTF-8, UTF-16 ou UTF-16 big endian, mas - na maioria das vezes são codificados no formato UTF-16. - - Conversão - Arquivos texto em Unicode pode ter quebras de linha DOS, Unix ou Mac, - como arquivos texto comuns. - - Todas as versões do dos2unix e unix2dos podem converter arquivos - codificados em UTF-8 porque UTF-8 foi projetado para ter compatibilidade - reversa com ASCII. - - Dos2unix e unix2dos com suporte a Unicode UTF-16 podem ler arquivos - texto codificados em little e big endian UTF-16. Para ver se dos2unix - foi compilado com suporte a UTF-16, digite "dos2unix -V". - - No Unix/Linux, arquivos codificados em UTF-16 são convertidos para a - codificação de caracteres do localização. Use o comando locale(1) para - descobrir qual é a codificação de caracteres da localização. Quando a - conversão não for possível, ocorrerá um erro e o arquivo será ignorado. - - No Windows, arquivos UTF-16 são convertidos, por padrão, para UTF-8. - Arquivos texto formatados em UTF-8 possuem ótimo suporte em ambos - Windows e Unix/Linux. - - Codificações UTF-16 e UTF-8 são completamente compatíveis, não havendo - qualquer perda de texto na conversão. Quando um erro de conversão UTF-16 - para UTF-8 ocorre, por exemplo quando o arquivo de entrada UTF-16 contém - um erro, o arquivo será ignorado. - - Quando a opção "-u" é usada, o arquivo de saída será escrito na mesma - codificação UTF-16 que o arquivo de saída. A opção "-u" evita conversão - para UTF-8. - - Dos2unix e unix2dos não possuem opção para converter arquivos UTF-8 ára - UTF-16. - - Modo de conversão ISO e 7-bit não funciona em arquivos UTF-16. - - Marca de ordem de byte - No Windows, arquivos Unicode normalmente têm uma Marca de Ordem de Byte - (BOM), porque muitos programas (incluindo o Bloco de Notas) adiciona - BOMs por padrão. Veja também - . - - No Unix, arquivos Unicode normalmente não têm BOM. Presume-se que - arquivos texto são codificados na codificação de caracteres da - localização. - - Dos2unix pode detectar apenas se um arquivo está no formato UTF-16 se o - arquivo tiver BOM. Quando um arquivo UTF-16 não tiver BOM, dos2unix vai - ver se o arquivo é um arquivo binário. - - Use a opção "-ul" ou "-ub" para converter um arquivo UTF-16 sem BOM. - - Dos2unix escreve por padrão nenhum BOM no arquivo de saída. Com a opção - "-b", o Dos2unix escreve um BOM quando o arquivo de entrada possuir BOM. - - Unix2dos escreve por padrão um BOM no arquivo de saída quando o arquivo - de entrada tem BOM. Use a opção "-m" para remover BOM. - - Dos2unix e unix2dos sempre escrevem BOM quando a opção "-m" é usada. - - Exemplos de Unicode - Conversão de UTF-16 do Windows (com BOM) para UTF-8 do Unix: - - dos2unix -n entrada.txt saída.txt - - Conversão de UTF-16LE do Windows (sem BOM) para UTF-8 do Unix: - - dos2unix -ul -n entrada.txt saída.txt - - Conversão de UTF-8 Unix para UTF-8 do Windows com BOM: - - unix2dos -m -n entrada.txt saída.txt - - Conversão de UTF-8 do Unix para UTF-16 do Windows: - - unix2dos < entrada.txt | iconv -f UTF-8 -t UTF-16 > saída.txt - -GB18030 - GB18030 é um padrão governamental chinês. Um subconjunto obrigatório do - padrão GB18030 é exigido oficialmente para todos os produtos de software - vendidos na China. Veja também . - - GB18030 é completamente compatível com Unicode e pode ser considerado um - formato de transformação de unicode. Assim como UTF-8, GB18030 é - compatível com ASCII. GB18030 também é compatível com a página de código - 936 do Windows, também conhecida como GBK. - - No Unix/Linux, arquivos UTF-16 são convertidos para GB18030 quando a - codificação da localização é definida para GB18030. Note que isso vai - funcionar apenas se a localização estiver definida para China. Por - exemplo, em uma configuração de localização inglesa (Britânia) a - conversão "en_GB.GB18030" de UTF-16 para GB18030 não vai funcionar, mas - em uma configuração de localização "zh_CN.GB18030" chinesa vai - funcionar. - - No Windows, você precisa usar a opção "-gb" para converter arquivos - UTF-16 para GB18030. - - Arquivos codificados em GB18030 possuem uma marca de ordem de bytes, - como arquivos Unicode. - -EXEMPLOS - Lê a entrada da "stdin" e escreve a saída para "stdout": - - dos2unix - dos2unix -l -c mac - - Converte e substitui a.txt. Converte e substitui b.txt: - - dos2unix a.txt b.txt - dos2unix -o a.txt b.txt - - Converte e substitui a.txt no modo de conversão ascii: - - dos2unix a.txt - - Converte e substitui a.txt no modo de conversão ascii. Converte e - substitui b.txt no modo de conversão 7bit: - - dos2unix a.txt -c 7bit b.txt - dos2unix -c ascii a.txt -c 7bit b.txt - dos2unix -ascii a.txt -7 b.txt - - Converte a.txt do formato do Mac para Unix: - - dos2unix -c mac a.txt - mac2unix a.txt - - Converte a.txt do formato do Unix para Mac: - - unix2dos -c mac a.txt - unix2mac a.txt - - Converte e substitui a.txt enquanto mantém a marca de data original: - - dos2unix -k a.txt - dos2unix -k -o a.txt - - Converte a.txt e escreve para e.txt: - - dos2unix -n a.txt e.txt - - Converte a.txt e escreve para e.txt, mantém a marca de data de e.txt - igual a a.txt: - - dos2unix -k -n a.txt e.txt - - Converte e substitui a.txt. Converte b.txt e escreve para e.txt: - - dos2unix a.txt -n b.txt e.txt - dos2unix -o a.txt -n b.txt e.txt - - Converte c.txt e escreve para e.txt. Converte e substitui a.txt. - Converte e substitui b.txt. Converte d.txt e escreve para f.txt: - - dos2unix -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt - -Conversão recursiva - Use dos2unix em combinação com os comandos find(1) e xargs(1) para - converter recursivamente arquivos texto em uma estrutura de árvore de - diretórios. Por exemplo, para converter todos os arquivos .txt na árvore - de diretórios sob o diretório atual, digite: - - find . -name *.txt |xargs dos2unix - -LOCALIZAÇÃO - LANG - O idioma primário é selecionado com a variável de ambiente LANG. A - variável LANG consiste em várias partes. A primeira parte está em - letras pequenas no código do idioma. A segunda parte é opcional e é - o código do país em letras maiúsculo, precedido de um ponto. Alguns - exemplos para shells do tipo padrão POSIX: - - export LANG=nl Holandês - export LANG=nl_NL Holandês, Holanda - export LANG=nl_BE Holandês, Bélgica - export LANG=es_ES Espanhol, Espanha - export LANG=es_MX Espanhol, México - export LANG=en_US.iso88591 Inglês, EUA, codificação Latin-1 - export LANG=en_GB.UTF-8 Inglês, Reino Unido, codificação UTF-8 - - Para a lista completa de códigos de idioma e país, veja o manual do - gettext: - - - Nos sistemas Unix, você pode usar o comando locale(1) para obter - informação específica da localização. - - LANGUAGE - Com a variável de ambiente LANGUAGE, você pode especificar uma lista - de prioridades de idiomas, separada por vírgulas. Dos2unix fornece - preferência à LANGUAGE sobre LANG. Por exemplo, primeiro holandês e, - então, alemão: "LANGUAGE=nl:de". Você primeiro tem que habilitar - localização, definindo LANG (ou LC_ALL) para um valor diferente de - "C", antes que você possa usar uma lista de prioridade de idioma por - meio da variável LANGUAGE. Veja também o manual do gettext: - - - Se você selecionou um idioma que não está disponível, você vai terá - as mensagens em inglês (padrão). - - DOS2UNIX_LOCALEDIR - Com a variável de ambiente DOS2UNIX_LOCALEDIR, o LOCALEDIR definido - durante a compilação pode ser sobrescrito. LOCALEDIR é usada para - localizar os arquivos de idioma. O valor padrão do GNU é - "/usr/local/share/locale". A opção --version vai exibir o LOCALEDIR - que é usado. - - Exemplo (shell POSIX): - - export DOS2UNIX_LOCALEDIR=$HOME/share/locale - -VALOR RETORNADO - No sucesso, zero é retornado. Quando um erro de sistema ocorre, o último - erro de sistema será retornado. Para outros erros, 1 é retornado. - - O valor retornado é sempre zero no modo quieto, exceto quando opções de - linha de comando erradas são usadas. - -PADRÕES - - - - - - - - -AUTORES - Benjamin Lin - Bernd Johannes Wuebben (modo - mac2unix) - , Christian Wurll (adiciona nova linha - extra) - , Erwin Waterlander - - (mantenedor) - - Página do projeto: - - Página do SourceForge: - -Veja também - file(1) find(1) iconv(1) locale(1) xargs(1) - diff --git a/Tools/dos2unix/share/doc/dos2unix-7.2/uk/dos2unix.htm b/Tools/dos2unix/share/doc/dos2unix-7.2/uk/dos2unix.htm deleted file mode 100644 index 1799452..0000000 --- a/Tools/dos2unix/share/doc/dos2unix-7.2/uk/dos2unix.htm +++ /dev/null @@ -1,654 +0,0 @@ - - - - -dos2unix 7.2 - програма для перетворення даних у текстовому форматі DOS/Mac у формат Unix, і навпаки - - - - - - - - - - -

НАЗВА

- -

dos2unix - програма для перетворення даних у текстовому форматі DOS/Mac у формат Unix, і навпаки

- -

КОРОТКИЙ ОПИС

- -
    dos2unix [параметри] [ФАЙЛ ...] [-n ВХІДНИЙ_ФАЙЛ ВИХІДНИЙ_ФАЙЛ ...]
-    unix2dos [параметри] [ФАЙЛ ...] [-n ВХІДНИЙ_ФАЙЛ ВИХІДНИЙ_ФАЙЛ ...]
- -

ОПИС

- -

До складу пакунка Dos2unix включено програми dos2unix та unix2dos, призначені для перетворення звичайних текстових даних у форматі DOS або Mac на дані у форматі Unix, і навпаки.

- -

У текстових файлах DOS/Windows розрив рядка або перехід на новий рядок здійснюється за допомогою комбінації двох символів: повернення каретки (CR) і переведення рядка (LF). У текстових файлах Unix за перехід на новий рядок відповідає один символ: переведення рядка (LF). У текстових файлах Mac, до Mac OS X, за розрив рядка відповідав один символ: повернення каретки (CR). У сучасних версіях Mac OS використовується типовий для Unix розрив рядка (LF).

- -

Окрім символів розриву рядка, програма Dos2unix здатна виконувати перетворення кодування файлів. Можна перетворити дані у декількох кодуваннях DOS на файли у кодуванні Latin-1 Unix. Також можна перетворити дані у файлах Windows Unicode (UTF-16) на дані у кодуванні Unix Unicode (UTF-8).

- -

Під час перетворення програма пропускатиме двійкові файли, якщо ви не накажете їй виконати перетворення таких файлів безпосередньо.

- -

Програма автоматично пропускатиме файли, які не є звичайними файлами, зокрема каталоги та канали FIFO.

- -

Типово, програма не вноситиме змін до символічних посилань та об’єктів посилань. Якщо потрібно, програма може замінити символічні посилання або записати перетворені дані до файла-призначення символічного посилання. У Windows запису до об’єкта символічного посилання не передбачено.

- -

Програму dos2unix було створено за зразком програми dos2unix для SunOS/Solaris. Втім, існує одна важлива відмінність від оригінальної версії для SunOS/Solaris. Ця версія типово виконує заміну файлів під час перетворення (старий режим обробки файлів), а у оригінальній версії для SunOS/Solaris передбачено підтримку лише парного перетворення (новий режим обробки файлів). Див. також параметри -o та -n.

- -

ПАРАМЕТРИ

- -
- -
--
-
- -

Вважати усі наступні параметри назвами файлів. Цим параметром слід користуватися, якщо вам потрібно виконати перетворення файлів, чиї назви містять дефіси. Наприклад, щоб виконати перетворення файла «-foo», скористайтеся такою командою:

- -
    dos2unix -- -foo
- -

Або у новому режимі файлів:

- -
    dos2unix -n -- -foo out.txt
- -
-
-ascii
-
- -

Виконати лише перетворення символів розриву рядків. Типовий режим перетворення.

- -
-
-iso
-
- -

Виконати перетворення з кодування DOS на кодування ISO-8859-1. Див. розділ щодо режимів перетворення.

- -
-
-1252
-
- -

Використати кодову таблицю 1252 Windows (західноєвропейські мови).

- -
-
-437
-
- -

Використовувати кодову сторінку DOS 437 (США). Це типова кодова сторінка для перетворення ISO.

- -
-
-850
-
- -

Використовувати кодову сторінку DOS 850 (західноєвропейські мови).

- -
-
-860
-
- -

Використовувати сторінку DOS 860 (португальська).

- -
-
-863
-
- -

Використовувати сторінку DOS 863 (канадська французька).

- -
-
-865
-
- -

Використовувати сторінку DOS 865 (скандинавські мови).

- -
-
-7
-
- -

Перетворювати 8-бітові символи на 7-бітові.

- -
-
-b, --keep-bom
-
- -

Зберегти позначку порядку байтів (BOM). Якщо у файлі вхідних даних є BOM, записати BOM до файла результатів. Це типова поведінка під час перетворення у формат із символами розриву рядків DOS. Див. також параметр -r.

- -
-
-c, --convmode РЕЖИМ
-
- -

Встановити режим перетворення. Значенням аргументу РЕЖИМ може бути один з таких рядків: ascii, 7bit, iso, mac. Типовим є режим ascii.

- -
-
-f, --force
-
- -

Примусове перетворення двійкових файлів.

- -
-
-gb, --gb18030
-
- -

У Windows файли в UTF-16 типово перетворюються на файли в UTF-8, незалежно від встановленої локалі. За допомогою цього параметра ви можете наказати програмі перетворювати файли в UTF-16 на файли у GB18030. Цим параметром можна скористатися лише у Windows. Див. також розділ, присвячений GB18030.

- -
-
-h, --help
-
- -

Показати довідкові дані і завершити роботу.

- -
-
-i[ПРАПОРЦІ], --info[=ПРАПОРЦІ] ФАЙЛ ...
-
- -

Вивести дані щодо файла. Не виконувати перетворення.

- -

Буде виведено такі дані, у вказаному порядку: кількість розривів рядків у форматі DOS, кількість розривів рядків у форматі Unix, кількість розривів рядків у форматі Mac, позначка порядку байтів, текстовим чи бінарним є файл та назву файла.

- -

Приклад результатів:

- -
     6       0       0  no_bom    text    dos.txt
-     0       6       0  no_bom    text    unix.txt
-     0       0       6  no_bom    text    mac.txt
-     6       6       6  no_bom    text    mixed.txt
-    50       0       0  UTF-16LE  text    utf16le.txt
-     0      50       0  no_bom    text    utf8unix.txt
-    50       0       0  UTF-8     text    utf8dos.txt
-     2     418     219  no_bom    binary  dos2unix.exe
- -

Крім того, можна вказати додаткові прапорці для внесення змін у виведені дані. Можна використовувати один або декілька таких прапорців.

- -
- -
d
-
- -

Вивести кількість символів розривів рядка DOS.

- -
-
u
-
- -

Вивести кількість символів розривів рядка Unix.

- -
-
m
-
- -

Вивести кількість символів розривів рядка Mac.

- -
-
b
-
- -

Вивести позначку порядку байтів.

- -
-
t
-
- -

Вивести дані щодо того, є файл текстовим чи бінарним.

- -
-
c
-
- -

Вивести дані лише тих файлів, які було б перетворено.

- -

Із прапорцем c dos2unix виведе лише назви файлів, у яких містяться розриви рядків DOS. unix2dos виведе лише назви файлів, у яких містяться розриви рядків Unix.

- -
-
- -

Приклади:

- -

Вивести дані щодо усіх файлів *.txt:

- -
    dos2unix -i *.txt
- -

Вивести кількість розривів рядків у форматі DOS і розривів рядків у форматі Unix:

- -
    dos2unix -idu *.txt
- -

Вивести лише позначку порядку байтів:

- -
    dos2unix --info=b *.txt
- -

Вивести список файлів, у яких є символи розриву рядків DOS:

- -
    dos2unix -ic *.txt
- -

Вивести список файлів, у яких використано символи розриву рядків Unix:

- -
    unix2dos -ic *.txt
- -
-
-k, --keepdate
-
- -

Зберегти часову позначку файла вхідних даних у файлі результатів перетворення.

- -
-
-L, --license
-
- -

Вивести умови ліцензування програми.

- -
-
-l, --newline
-
- -

Вставити додатковий символ розриву рядка.

- -

dos2unix: перетворення на два символи розриву рядків Unix відбуватиметься лише для комбінацій розриву рядків DOS. У режимі Mac виконуватиметься перетворення на два розриви рядків Unix лише символів розриву рядків Mac.

- -

unix2dos: перетворення на дві комбінації розриву рядків DOS відбуватиметься лише для символів розриву рядків DOS. У режимі Mac виконуватиметься перетворення на два розриви рядків Mac лише символів розриву рядків Unix.

- -
-
-m, --add-bom
-
- -

Записати до файла результатів позначку порядку байтів (BOM). Типово буде записано позначку порядку байтів UTF-8.

- -

Якщо дані початкового файла закодовано у UTF-16 і використано параметр -u, буде дописано позначку порядку байтів UTF-16.

- -

Не використовуйте цей параметр для кодувань результатів, відмінних від UTF-8 або UTF-16. Див. також розділ щодо UNICODE.

- -
-
-n, --newfile ВХІДНИЙ_ФАЙЛ ВИХІДНИЙ_ФАЙЛ ...
-
- -

Новий режим обробки файлів. Перетворити дані з файла ВХІДНИЙ_ФАЙЛ і записати результати до файла ВИХІДНИЙ_ФАЙЛ. Назви файлів слід вказувати парами, не слід використовувати шаблони заміни, інакше вміст файлів буде втрачено.

- -

Власником перетвореного файла буде призначено користувача, яким було розпочато перетворення у режимі нового файла (парному режимі). Права доступу на читання або запис нового файла буде визначено на основі прав доступу до початкового файла мінус umask(1) для користувача, яким було розпочато перетворення.

- -
-
-o, --oldfile ФАЙЛ ...
-
- -

Застарілий режим обробки. Виконати перетворення файла ФАЙЛ і перезаписати його вміст. Типово, програма працює у цьому режимі. Можна використовувати шаблони заміни.

- -

У застарілому режимі (режимі заміщення) перетворений файл належатиме тому самому власнику і групі і матиме ті самі права доступу на читання або запис, що і початковий файл. Крім того, якщо перетворення файла виконується іншим користувачем, який має права доступу на запис до файла (наприклад користувачем root), перетворення буде перервано, якщо зберегти початкові значення не вдасться. Зміна власника може означати неможливість читання файла для його початкового власника. Зміна групи може призвести до проблем із безпекою, оскільки файл може стати доступним для читання користувачам, які не повинні мати такі права доступу. Можливість збереження прав власності та прав доступу до файла передбачено лише у Unix.

- -
-
-q, --quiet
-
- -

Режим без виведення повідомлень. Програма не виводитиме жодних попереджень або повідомлень про помилки. Повернутим значенням завжди буде нуль, якщо вказано правильні параметри командного рядка.

- -
-
-r, --remove-bom
-
- -

Вилучити позначку порядку байтів (BOM). Не записувати BOM до файла результатів. Це типова поведінка під час перетворення файлів з форматом розриву рядків Unix. Див. також параметр -b.

- -
-
-s, --safe
-
- -

Пропускати двійкові файли (типово).

- -
-
-u, --keep-utf16
-
- -

Зберегти початкове кодування UTF-16. Файл результатів буде записано у тому самому кодуванні UTF-16, із прямим або зворотним порядком байтів, що і початковий файл. Таким чином можна запобігти перетворенню даних у кодування UTF-8. До файла буде записано відповідну позначку порядку байтів UTF-16. Вимкнути цей параметр можна за допомогою параметра -ascii.

- -
-
-ul, --assume-utf16le
-
- -

Припускати, що кодуванням вхідних файлів є UTF-16LE.

- -

Якщо у початковому файлі є позначка порядку байтів (BOM), її буде використано у файлі-результаті, незалежно від використання цього параметра.

- -

Якщо вами було зроблено помилкове припущення щодо формату файла (файл вхідних даних насправді не є файлом у форматі UTF-16LE), і дані вдасться успішно перетворити, ви отримаєте файл у кодуванні UTF-8 з помилковим вмістом. Скасувати таке помилкове перетворення можна за допомогою зворотного перетворення iconv(1) з даних у форматі UTF-8 на дані у форматі UTF-16LE. Таким чином ви повернетеся до початкового кодування даних у файлі.

- -

Припущення щодо форматування UTF-16LE працює як визначення режиму перетворення. Перемиканням на типовий режим ascii можна вимкнути припущення щодо форматування UTF-16LE.

- -
-
-ub, --assume-utf16be
-
- -

Припускати, що вхідним форматом є UTF-16BE.

- -

Цей параметр працює у спосіб, тотожний до параметра -ul.

- -
-
-v, --verbose
-
- -

Виводити докладні повідомлення. Буде показано додаткові дані щодо позначок порядку байтів та кількості перетворених символів розриву рядків.

- -
- -
- -

Переходити за символічними посиланням і перетворювати файли, на які вони вказують.

- -
- -
- -

Замінити символічні посилання перетвореними файлами (початкові файли, на які вони вказують, змінено не буде).

- -
- -
- -

Не змінювати символічні посилання та файли, на які вони посилаються (типово).

- -
-
-V, --version
-
- -

Вивести дані щодо версії і завершити роботу.

- -
-
- -

РЕЖИМ MAC

- -

У звичайному режимі розриви рядків DOS перетворюються на розриви рядків Unix, і навпаки. Розриви рядків Mac перетворенню не підлягають.

- -

У режимі Mac розриви рядків Mac перетворюються на розриви рядків Unix, і навпаки. Розриви рядків DOS перетворенню не підлягають.

- -

Щоб запустити програму у режимі перетворення Mac, скористайтеся параметром командного рядка -c mac або програмами mac2unix та unix2mac.

- -

РЕЖИМИ ПЕРЕТВОРЕННЯ

- -
- -
ascii
-
- -

У режимі ascii виконуватиметься лише перетворення символів розриву рядків. Цей режим є типовим режимом перетворення.

- -

Хоча цей режим і називається режимом ASCII (стандарту 7-бітового кодування), насправді кодування символів у ньому є 8-бітовим. Завжди користуйтеся цим режимом для перетворення файлів у кодуванні UTF-8 (Unicode).

- -
-
7bit
-
- -

У цьому режимі усі 8-бітові символи, які не є частиною ASCII, (з номерами від 128 до 255) буде перетворено на відповідні 7-бітові символи.

- -
-
iso
-
- -

Перетворення символів буде виконано з кодування (кодової сторінки) DOS до кодування ISO-8859-1 (Latin-1) у Unix. Символи DOS, які не мають еквівалентів у ISO-8859-1 і перетворення яких неможливе, буде перетворено на символ крапки. Те саме стосується символів ISO-8859-1, які не мають еквівалентів у DOS.

- -

Якщо буде використано лише параметр -iso, програма dos2unix спробує визначити активне кодування. Якщо це виявиться неможливим, dos2unix використає типове кодування CP437, яке здебільшого використовується у США. Щоб примусово визначити кодування, скористайтеся параметром -437 (США), -850 (західноєвропейські мови), -860 (португальська), -863 (канадська французька) або -865 (скандинавські мови). Використати кодування Windows CP1252 (західноєвропейські мови) можна за допомогою параметра -1252. Для інших кодувань використовуйте поєднання dos2unix з iconv(1). Програма iconv здатна виконувати перетворення даних у доволі широкому спектрі кодувань символів.

- -

Ніколи не користуйтеся перетворенням ISO для текстових файлів у форматі Unicode. Використання подібного перетворення призведе до ушкодження вмісту файлів у кодуванні UTF-8.

- -

Декілька прикладів:

- -

Перетворити дані у типовому кодуванні DOS на дані у кодуванні Latin-1 Unix:

- -
    dos2unix -iso -n in.txt out.txt
- -

Перетворити дані у кодуванні DOS CP850 на дані у кодуванні Latin-1 Unix:

- -
    dos2unix -850 -n in.txt out.txt
- -

Перетворити дані у кодуванні CP1252 Windows на дані у кодуванні Latin-1 Unix:

- -
    dos2unix -1252 -n in.txt out.txt
- -

Перетворити дані у кодуванні CP252 Windows на дані у кодуванні UTF-8 Unix (Unicode):

- -
    iconv -f CP1252 -t UTF-8 in.txt | dos2unix > out.txt
- -

Перетворити дані у кодуванні Latin-1 Unix на дані у типовому кодуванні DOS:

- -
    unix2dos -iso -n in.txt out.txt
- -

Перетворити дані у кодуванні Latin-1 Unix на дані у кодуванні DOS CP850:

- -
    unix2dos -850 -n in.txt out.txt
- -

Перетворити дані у кодуванні Latin-1 Unix на дані у кодуванні Windows CP1252:

- -
    unix2dos -1252 -n in.txt out.txt
- -

Перетворити дані у кодуванні UTF-8 Unix (Unicode) на дані у кодуванні Windows CP1252:

- -
    unix2dos < in.txt | iconv -f UTF-8 -t CP1252 > out.txt
- -

Див. також http://czyborra.com/charsets/codepages.html та http://czyborra.com/charsets/iso8859.html.

- -
-
- -

UNICODE

- -

Кодування

- -

Існує декілька різних кодувань Unicode. У Unix та Linux у файлах Unicode здебільшого використовується кодування UTF-8. У Windows для текстових файлів Unicode може бути використано кодування UTF-8, UTF-16 або UTF-16 зі зворотним порядком байтів. Втім, здебільшого, використовується формат UTF-16.

- -

Перетворення

- -

У текстових файлах Unicode, як і у звичайних текстових файлах, може бути використано розриви рядків DOS, Unix або Mac.

- -

Усі версії dos2unix та unix2dos здатні виконувати перетворення у кодуванні UTF-8, оскільки UTF-8 було розроблено так, що зворотну сумісність з ASCII збережено.

- -

Програми dos2unix та unix2dos, зібрані з підтримкою Unicode UTF-16, можуть читати текстові файли у кодуванні UTF-16 з прямим та зворотним порядком байтів. Щоб дізнатися про те, чи було dos2unix зібрано з підтримкою UTF-16, віддайте команду dos2unix -V.

- -

У Unix/Linux файли у кодуванні UTF-16 перетворюються на файли у кодуванні локалі. Для визначення поточного кодування символів локалі скористайтеся командою locale(1). Якщо перетворення виявиться неможливим, програма повідомить про помилку перетворення і пропустить відповідний файл.

- -

У Windows файли UTF-16 типово буде перетворено на файли UTF-8. Обидва типи систем, Windows та Unix/Linux, мають непогані можливості з підтримки файлів у форматуванні UTF-8.

- -

Кодування UTF-16 та UTF-8 є повністю сумісними. Під час перетворення не буде втрачено жодної інформації. Якщо під час перетворення даних у кодуванні UTF-16 на дані у кодуванні UTF-8 трапиться помилка, наприклад, якщо у вхідному файлі UTF-16 міститиметься якась помилка, файл буде пропущено.

- -

Якщо використано параметр -u, файл результатів буде записано у тому самому кодуванні UTF-16, що і початковий файл. Використання параметра Option -u запобігає перетворенню даних у кодування UTF-8.

- -

У dos2unix та unix2dos не передбачено параметра для перетворення даних у кодуванні UTF-8 на дані у кодуванні UTF-16.

- -

Режим перетворення ISO та 7-бітовий режим не працюють для файлів UTF-16.

- -

Позначка порядку байтів

- -

У Windows до текстових файлів у кодуванні Unicode типово дописується позначка порядку байтів (BOM), оскільки багато програм Windows (зокрема Notepad) додають таку позначку автоматично. Див. також http://en.wikipedia.org/wiki/Byte_order_mark.

- -

У Unix файли у кодуванні Unicode типово не містять позначки порядку байтів. Вважається, що кодуванням текстових файлів є те кодування, яке визначається поточною локаллю.

- -

Програма dos2unix може визначити, чи є кодуванням файла UTF-16, лише якщо у файлі міститься позначка порядку байтів. Якщо у файлі, де використано кодування UTF-16, немає такої позначки, dos2unix вважатиме такий файл двійковим (бінарним).

- -

Для перетворення файлів UTF-16 без позначки порядку байтів скористайтеся параметром -ul або -ub.

- -

Типово dos2unix не записує до файлів результатів перетворення позначки порядку байтів (BOM). Якщо використано параметр -b, dos2unix запише до файла результатів BOM, якщо BOM була у файлі початкових даних.

- -

Типово unix2dos записує позначку порядку байтів (BOM) до файла результатів, якщо BOM є у початковому файлі. Скористайтеся параметром -r, щоб вилучити BOM.

- -

Dos2unix та unix2dos завжди записують до файла результатів позначку порядку байтів (BOM), якщо використано параметр -m.

- -

Приклади для Unicode

- -

Перетворити дані з Windows UTF-16 (з позначкою порядку байтів (BOM)) у формат Unix UTF-8:

- -
    dos2unix -n in.txt out.txt
- -

Перетворити дані у форматі Windows UTF-16LE (без BOM) на дані у форматі UTF-8 Unix:

- -
    dos2unix -ul -n in.txt out.txt
- -

Перетворити дані у кодуванні UTF-8 Unix на дані у кодуванні Windows UTF-8 без BOM:

- -
    unix2dos -m -n in.txt out.txt
- -

Перетворити дані у кодуванні UTF-8 Unix на дані у кодуванні Windows UTF-16:

- -
    unix2dos < in.txt | iconv -f UTF-8 -t UTF-16 > out.txt
- -

GB18030

- -

GB18030 є китайським урядовим стандартом. Підтримка обов’язкової підмножини стандарту GB18030 є неодмінною вимогою до будь-яких програмних продуктів, які продаються у Китаї. Див. також http://en.wikipedia.org/wiki/GB_18030.

- -

Кодування GB18030 є повністю сумісним із Unicode. Його можна розглядати як формат перетворення unicode. Подібно до UTF-8, GB18030 є сумісним із ASCII. GB18030 також є сумісним із кодовою сторінкою Windows 936, яку ще називають GBK.

- -

У Unix/Linux файли UTF-16 буде перетворено до кодування GB18030, якщо кодуванням локалі є GB18030. Зауважте, що це спрацює, лише якщо встановлено значення країни КНР. Наприклад, у англійській локалі для Великоританії із встановленою локаллю en_GB.GB18030 перетворення UTF-16 на GB18030 не працюватиме, а у китайській локалі zh_CN.GB18030 все працюватиме як слід.

- -

У Windows для перетворення файлів UTF-16 на файли GB18030 слід вказати параметр -gb.

- -

У файлах у кодуванні GB18030 може міститися позначка порядку байтів, так само, як у файлах у кодуванні Unicode.

- -

ПРИКЛАДИ

- -

Прочитати вхідні дані зі стандартного джерела (stdin) і записати результат до стандартного виведення (stdout):

- -
    dos2unix
-    dos2unix -l -c mac
- -

Перетворити дані у a.txt і замістити цей файл. Перетворити дані у b.txt і замістити цей файл:

- -
    dos2unix a.txt b.txt
-    dos2unix -o a.txt b.txt
- -

Перетворити дані у a.txt і замістити файл у режимі перетворення ascii:

- -
    dos2unix a.txt
- -

Перетворити дані у a.txt і замістити файл у режимі перетворення ascii. Перетворити дані у b.txt і замістити цей файл у режимі 7-бітового перетворення:

- -
    dos2unix a.txt -c 7bit b.txt
-    dos2unix -c ascii a.txt -c 7bit b.txt
-    dos2unix -ascii a.txt -7 b.txt
- -

Перетворити файл a.txt з формату Mac на формат Unix:

- -
    dos2unix -c mac a.txt
-    mac2unix a.txt
- -

Перетворити файл a.txt з формату Unix на формат Mac:

- -
    unix2dos -c mac a.txt
-    unix2mac a.txt
- -

Перетворити дані у a.txt, замістити цей файл і зберегти часову позначку початкового файла:

- -
    dos2unix -k a.txt
-    dos2unix -k -o a.txt
- -

Перетворити дані у файлі a.txt і записати результати до файла e.txt:

- -
    dos2unix -n a.txt e.txt
- -

Перетворити дані у файлі a.txt і записати результати до файла e.txt. Скопіювати часову позначку файла a.txt для файла e.txt:

- -
    dos2unix -k -n a.txt e.txt
- -

Перетворити дані у a.txt і замістити цей файл. Перетворити дані у b.txt і записати результат до e.txt:

- -
    dos2unix a.txt -n b.txt e.txt
-    dos2unix -o a.txt -n b.txt e.txt
- -

Перетворити дані у c.txt і записати результати до e.txt. Перетворити дані у a.txt і замістити ними цей файл. Перетворити дані у b.txt і замістити ними цей файл. Перетворити дані у d.txt і записати результати до f.txt:

- -
    dos2unix -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt
- -

РЕКУРСИВНЕ ПЕРЕТВОРЕННЯ

- -

Для рекурсивного перетворення текстових файлів у ієрархії каталогів слід використовувати dos2unix у поєднанні з програмами find(1) та xargs(1). Наприклад, щоб виконати перетворення усіх файлів .txt у структурі підкаталогів поточного каталогу, віддайте таку команду:

- -
    find . -name *.txt |xargs dos2unix
- -

ЛОКАЛІЗАЦІЯ

- -
- -
LANG
-
- -

Основна мова визначається за допомогою змінної середовища LANG. Значення змінної LANG складається з декількох частин. Перша частина записується малими літерами і визначає код мови. Друга частина є необов’язковою, визначає код країни і записується прописними літерами, відокремлюється від першої частини символом підкреслювання. Передбачено також необов’язкову третю частину: кодування. Ця частина відокремлюється від другої частини крапкою. Ось декілька прикладів для командних оболонок стандартного типу POSIX:

- -
    export LANG=uk               українська
-    export LANG=uk_UA            українська, Україна
-    export LANG=ru_UA            російська, Україна
-    export LANG=es_ES            іспанська, Іспанія
-    export LANG=es_MX            іспанська, Мексика
-    export LANG=en_US.iso88591   англійська, США, кодування Latin-1
-    export LANG=en_GB.UTF-8      англійська, Великобританія, кодування UTF-8
- -

Повний список мов та кодів країн наведено у підручнику з gettext: http://www.gnu.org/software/gettext/manual/html_node/Usual-Language-Codes.html

- -

У системах Unix для отримання даних щодо локалі можна скористатися командою locale(1).

- -
-
LANGUAGE
-
- -

За допомогою змінної середовища LANGUAGE ви можете вказати список пріоритеності мов. Записи у списку слід відокремлювати двокрапками. Програма dos2unix надає перевагу LANGUAGE над LANG. Наприклад, перша голландська, далі німецька: LANGUAGE=nl:de. Спочатку вам слід увімкнути локалізацію, встановивши для змінної LANG (або LC_ALL) значення, відмінне від «C». Далі ви зможете використовувати список пріоритетності мов за допомогою змінної LANGUAGE. Додаткові відомості можна знайти у підручнику з gettext: http://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html

- -

Якщо вами буде вибрано мову, перекладу якою немає, буде показано стандартні повідомлення англійською мовою.

- -
-
DOS2UNIX_LOCALEDIR
-
- -

Змінну LOCALEDIR, встановлену під час збирання програми, можна змінити за допомогою змінної середовища DOS2UNIX_LOCALEDIR. LOCALEDIR використовується для пошуку файлів перекладів. Типовим значенням у системах GNU є /usr/local/share/locale. Переглянути поточне значення змінної LOCALEDIR можна переглянути за допомогою параметра --version.

- -

Приклад (командна оболонка POSIX):

- -
    export DOS2UNIX_LOCALEDIR=$HOME/share/locale
- -
-
- -

ПОВЕРНУТЕ ЗНАЧЕННЯ

- -

Якщо завдання вдасться успішно виконати, програма поверне нульовий код виходу. Якщо станеться системна помилка, буде повернуто код цієї помилки. Якщо станеться якась інша помилка, буде повернуто код 1.

- -

У режимі без повідомлень повернутим значенням завжди буде нуль, якщо вказано правильні параметри командного рядка.

- -

СТАНДАРТИ

- -

http://en.wikipedia.org/wiki/Text_file

- -

http://uk.wikipedia.org/wiki/Carriage_return

- -

http://uk.wikipedia.org/wiki/Newline

- -

http://uk.wikipedia.org/wiki/Unicode

- -

АВТОРИ

- -

Benjamin Lin - <blin@socs.uts.edu.au>, Bernd Johannes Wuebben (режим mac2unix) - <wuebben@kde.org>, Christian Wurll (додатковий новий рядок) - <wurll@ira.uka.de>, Erwin Waterlander - <waterlan@xs4all.nl> (супровідник)

- -

Сторінка проекту: http://waterlan.home.xs4all.nl/dos2unix.html

- -

Сторінка на SourceForge: http://sourceforge.net/projects/dos2unix/

- -

ТАКОЖ ПЕРЕГЛЯНЬТЕ

- -

file(1) find(1) iconv(1) locale(1) xargs(1)

- - - - - - - diff --git a/Tools/dos2unix/share/doc/dos2unix-7.2/uk/dos2unix.txt b/Tools/dos2unix/share/doc/dos2unix-7.2/uk/dos2unix.txt deleted file mode 100644 index 2b91690..0000000 --- a/Tools/dos2unix/share/doc/dos2unix-7.2/uk/dos2unix.txt +++ /dev/null @@ -1,666 +0,0 @@ -НАЗВА - dos2unix - програма для перетворення даних у текстовому форматі DOS/Mac - у формат Unix, і навпаки - -КОРОТКИЙ ОПИС - dos2unix [параметри] [ФАЙЛ ...] [-n ВХІДНИЙ_ФАЙЛ ВИХІДНИЙ_ФАЙЛ ...] - unix2dos [параметри] [ФАЙЛ ...] [-n ВХІДНИЙ_ФАЙЛ ВИХІДНИЙ_ФАЙЛ ...] - -ОПИС - До складу пакунка Dos2unix включено програми "dos2unix" та "unix2dos", - призначені для перетворення звичайних текстових даних у форматі DOS або - Mac на дані у форматі Unix, і навпаки. - - У текстових файлах DOS/Windows розрив рядка або перехід на новий рядок - здійснюється за допомогою комбінації двох символів: повернення каретки - (CR) і переведення рядка (LF). У текстових файлах Unix за перехід на - новий рядок відповідає один символ: переведення рядка (LF). У текстових - файлах Mac, до Mac OS X, за розрив рядка відповідав один символ: - повернення каретки (CR). У сучасних версіях Mac OS використовується - типовий для Unix розрив рядка (LF). - - Окрім символів розриву рядка, програма Dos2unix здатна виконувати - перетворення кодування файлів. Можна перетворити дані у декількох - кодуваннях DOS на файли у кодуванні Latin-1 Unix. Також можна - перетворити дані у файлах Windows Unicode (UTF-16) на дані у кодуванні - Unix Unicode (UTF-8). - - Під час перетворення програма пропускатиме двійкові файли, якщо ви не - накажете їй виконати перетворення таких файлів безпосередньо. - - Програма автоматично пропускатиме файли, які не є звичайними файлами, - зокрема каталоги та канали FIFO. - - Типово, програма не вноситиме змін до символічних посилань та об’єктів - посилань. Якщо потрібно, програма може замінити символічні посилання або - записати перетворені дані до файла-призначення символічного посилання. У - Windows запису до об’єкта символічного посилання не передбачено. - - Програму dos2unix було створено за зразком програми dos2unix для - SunOS/Solaris. Втім, існує одна важлива відмінність від оригінальної - версії для SunOS/Solaris. Ця версія типово виконує заміну файлів під час - перетворення (старий режим обробки файлів), а у оригінальній версії для - SunOS/Solaris передбачено підтримку лише парного перетворення (новий - режим обробки файлів). Див. також параметри "-o" та "-n". - -ПАРАМЕТРИ - -- Вважати усі наступні параметри назвами файлів. Цим параметром слід - користуватися, якщо вам потрібно виконати перетворення файлів, чиї - назви містять дефіси. Наприклад, щоб виконати перетворення файла - «-foo», скористайтеся такою командою: - - dos2unix -- -foo - - Або у новому режимі файлів: - - dos2unix -n -- -foo out.txt - - -ascii - Виконати лише перетворення символів розриву рядків. Типовий режим - перетворення. - - -iso - Виконати перетворення з кодування DOS на кодування ISO-8859-1. Див. - розділ щодо режимів перетворення. - - -1252 - Використати кодову таблицю 1252 Windows (західноєвропейські мови). - - -437 - Використовувати кодову сторінку DOS 437 (США). Це типова кодова - сторінка для перетворення ISO. - - -850 - Використовувати кодову сторінку DOS 850 (західноєвропейські мови). - - -860 - Використовувати сторінку DOS 860 (португальська). - - -863 - Використовувати сторінку DOS 863 (канадська французька). - - -865 - Використовувати сторінку DOS 865 (скандинавські мови). - - -7 Перетворювати 8-бітові символи на 7-бітові. - - -b, --keep-bom - Зберегти позначку порядку байтів (BOM). Якщо у файлі вхідних даних є - BOM, записати BOM до файла результатів. Це типова поведінка під час - перетворення у формат із символами розриву рядків DOS. Див. також - параметр "-r". - - -c, --convmode РЕЖИМ - Встановити режим перетворення. Значенням аргументу РЕЖИМ може бути - один з таких рядків: *ascii*, *7bit*, *iso*, *mac*. Типовим є режим - ascii. - - -f, --force - Примусове перетворення двійкових файлів. - - -gb, --gb18030 - У Windows файли в UTF-16 типово перетворюються на файли в UTF-8, - незалежно від встановленої локалі. За допомогою цього параметра ви - можете наказати програмі перетворювати файли в UTF-16 на файли у - GB18030. Цим параметром можна скористатися лише у Windows. Див. - також розділ, присвячений GB18030. - - -h, --help - Показати довідкові дані і завершити роботу. - - -i[ПРАПОРЦІ], --info[=ПРАПОРЦІ] ФАЙЛ ... - Вивести дані щодо файла. Не виконувати перетворення. - - Буде виведено такі дані, у вказаному порядку: кількість розривів - рядків у форматі DOS, кількість розривів рядків у форматі Unix, - кількість розривів рядків у форматі Mac, позначка порядку байтів, - текстовим чи бінарним є файл та назву файла. - - Приклад результатів: - - 6 0 0 no_bom text dos.txt - 0 6 0 no_bom text unix.txt - 0 0 6 no_bom text mac.txt - 6 6 6 no_bom text mixed.txt - 50 0 0 UTF-16LE text utf16le.txt - 0 50 0 no_bom text utf8unix.txt - 50 0 0 UTF-8 text utf8dos.txt - 2 418 219 no_bom binary dos2unix.exe - - Крім того, можна вказати додаткові прапорці для внесення змін у - виведені дані. Можна використовувати один або декілька таких - прапорців. - - d Вивести кількість символів розривів рядка DOS. - - u Вивести кількість символів розривів рядка Unix. - - m Вивести кількість символів розривів рядка Mac. - - b Вивести позначку порядку байтів. - - t Вивести дані щодо того, є файл текстовим чи бінарним. - - c Вивести дані лише тих файлів, які було б перетворено. - - Із прапорцем "c" dos2unix виведе лише назви файлів, у яких - містяться розриви рядків DOS. unix2dos виведе лише назви файлів, - у яких містяться розриви рядків Unix. - - Приклади: - - Вивести дані щодо усіх файлів *.txt: - - dos2unix -i *.txt - - Вивести кількість розривів рядків у форматі DOS і розривів рядків у - форматі Unix: - - dos2unix -idu *.txt - - Вивести лише позначку порядку байтів: - - dos2unix --info=b *.txt - - Вивести список файлів, у яких є символи розриву рядків DOS: - - dos2unix -ic *.txt - - Вивести список файлів, у яких використано символи розриву рядків - Unix: - - unix2dos -ic *.txt - - -k, --keepdate - Зберегти часову позначку файла вхідних даних у файлі результатів - перетворення. - - -L, --license - Вивести умови ліцензування програми. - - -l, --newline - Вставити додатковий символ розриву рядка. - - dos2unix: перетворення на два символи розриву рядків Unix - відбуватиметься лише для комбінацій розриву рядків DOS. У режимі Mac - виконуватиметься перетворення на два розриви рядків Unix лише - символів розриву рядків Mac. - - unix2dos: перетворення на дві комбінації розриву рядків DOS - відбуватиметься лише для символів розриву рядків DOS. У режимі Mac - виконуватиметься перетворення на два розриви рядків Mac лише - символів розриву рядків Unix. - - -m, --add-bom - Записати до файла результатів позначку порядку байтів (BOM). Типово - буде записано позначку порядку байтів UTF-8. - - Якщо дані початкового файла закодовано у UTF-16 і використано - параметр "-u", буде дописано позначку порядку байтів UTF-16. - - Не використовуйте цей параметр для кодувань результатів, відмінних - від UTF-8 або UTF-16. Див. також розділ щодо UNICODE. - - -n, --newfile ВХІДНИЙ_ФАЙЛ ВИХІДНИЙ_ФАЙЛ ... - Новий режим обробки файлів. Перетворити дані з файла ВХІДНИЙ_ФАЙЛ і - записати результати до файла ВИХІДНИЙ_ФАЙЛ. Назви файлів слід - вказувати парами, *не слід* використовувати шаблони заміни, інакше - вміст файлів *буде втрачено*. - - Власником перетвореного файла буде призначено користувача, яким було - розпочато перетворення у режимі нового файла (парному режимі). Права - доступу на читання або запис нового файла буде визначено на основі - прав доступу до початкового файла мінус umask(1) для користувача, - яким було розпочато перетворення. - - -o, --oldfile ФАЙЛ ... - Застарілий режим обробки. Виконати перетворення файла ФАЙЛ і - перезаписати його вміст. Типово, програма працює у цьому режимі. - Можна використовувати шаблони заміни. - - У застарілому режимі (режимі заміщення) перетворений файл належатиме - тому самому власнику і групі і матиме ті самі права доступу на - читання або запис, що і початковий файл. Крім того, якщо - перетворення файла виконується іншим користувачем, який має права - доступу на запис до файла (наприклад користувачем root), - перетворення буде перервано, якщо зберегти початкові значення не - вдасться. Зміна власника може означати неможливість читання файла - для його початкового власника. Зміна групи може призвести до проблем - із безпекою, оскільки файл може стати доступним для читання - користувачам, які не повинні мати такі права доступу. Можливість - збереження прав власності та прав доступу до файла передбачено лише - у Unix. - - -q, --quiet - Режим без виведення повідомлень. Програма не виводитиме жодних - попереджень або повідомлень про помилки. Повернутим значенням завжди - буде нуль, якщо вказано правильні параметри командного рядка. - - -r, --remove-bom - Вилучити позначку порядку байтів (BOM). Не записувати BOM до файла - результатів. Це типова поведінка під час перетворення файлів з - форматом розриву рядків Unix. Див. також параметр "-b". - - -s, --safe - Пропускати двійкові файли (типово). - - -u, --keep-utf16 - Зберегти початкове кодування UTF-16. Файл результатів буде записано - у тому самому кодуванні UTF-16, із прямим або зворотним порядком - байтів, що і початковий файл. Таким чином можна запобігти - перетворенню даних у кодування UTF-8. До файла буде записано - відповідну позначку порядку байтів UTF-16. Вимкнути цей параметр - можна за допомогою параметра "-ascii". - - -ul, --assume-utf16le - Припускати, що кодуванням вхідних файлів є UTF-16LE. - - Якщо у початковому файлі є позначка порядку байтів (BOM), її буде - використано у файлі-результаті, незалежно від використання цього - параметра. - - Якщо вами було зроблено помилкове припущення щодо формату файла - (файл вхідних даних насправді не є файлом у форматі UTF-16LE), і - дані вдасться успішно перетворити, ви отримаєте файл у кодуванні - UTF-8 з помилковим вмістом. Скасувати таке помилкове перетворення - можна за допомогою зворотного перетворення iconv(1) з даних у - форматі UTF-8 на дані у форматі UTF-16LE. Таким чином ви повернетеся - до початкового кодування даних у файлі. - - Припущення щодо форматування UTF-16LE працює як визначення *режиму - перетворення*. Перемиканням на типовий режим *ascii* можна вимкнути - припущення щодо форматування UTF-16LE. - - -ub, --assume-utf16be - Припускати, що вхідним форматом є UTF-16BE. - - Цей параметр працює у спосіб, тотожний до параметра "-ul". - - -v, --verbose - Виводити докладні повідомлення. Буде показано додаткові дані щодо - позначок порядку байтів та кількості перетворених символів розриву - рядків. - - -F, --follow-symlink - Переходити за символічними посиланням і перетворювати файли, на які - вони вказують. - - -R, --replace-symlink - Замінити символічні посилання перетвореними файлами (початкові - файли, на які вони вказують, змінено не буде). - - -S, --skip-symlink - Не змінювати символічні посилання та файли, на які вони посилаються - (типово). - - -V, --version - Вивести дані щодо версії і завершити роботу. - -РЕЖИМ MAC - У звичайному режимі розриви рядків DOS перетворюються на розриви рядків - Unix, і навпаки. Розриви рядків Mac перетворенню не підлягають. - - У режимі Mac розриви рядків Mac перетворюються на розриви рядків Unix, і - навпаки. Розриви рядків DOS перетворенню не підлягають. - - Щоб запустити програму у режимі перетворення Mac, скористайтеся - параметром командного рядка "-c mac" або програмами "mac2unix" та - "unix2mac". - -РЕЖИМИ ПЕРЕТВОРЕННЯ - ascii - У режимі "ascii" виконуватиметься лише перетворення символів розриву - рядків. Цей режим є типовим режимом перетворення. - - Хоча цей режим і називається режимом ASCII (стандарту 7-бітового - кодування), насправді кодування символів у ньому є 8-бітовим. Завжди - користуйтеся цим режимом для перетворення файлів у кодуванні UTF-8 - (Unicode). - - 7bit - У цьому режимі усі 8-бітові символи, які не є частиною ASCII, (з - номерами від 128 до 255) буде перетворено на відповідні 7-бітові - символи. - - iso Перетворення символів буде виконано з кодування (кодової сторінки) - DOS до кодування ISO-8859-1 (Latin-1) у Unix. Символи DOS, які не - мають еквівалентів у ISO-8859-1 і перетворення яких неможливе, буде - перетворено на символ крапки. Те саме стосується символів - ISO-8859-1, які не мають еквівалентів у DOS. - - Якщо буде використано лише параметр "-iso", програма dos2unix - спробує визначити активне кодування. Якщо це виявиться неможливим, - dos2unix використає типове кодування CP437, яке здебільшого - використовується у США. Щоб примусово визначити кодування, - скористайтеся параметром -437 (США), -850 (західноєвропейські мови), - -860 (португальська), -863 (канадська французька) або -865 - (скандинавські мови). Використати кодування Windows CP1252 - (західноєвропейські мови) можна за допомогою параметра -1252. Для - інших кодувань використовуйте поєднання dos2unix з iconv(1). - Програма iconv здатна виконувати перетворення даних у доволі - широкому спектрі кодувань символів. - - Ніколи не користуйтеся перетворенням ISO для текстових файлів у - форматі Unicode. Використання подібного перетворення призведе до - ушкодження вмісту файлів у кодуванні UTF-8. - - Декілька прикладів: - - Перетворити дані у типовому кодуванні DOS на дані у кодуванні - Latin-1 Unix: - - dos2unix -iso -n in.txt out.txt - - Перетворити дані у кодуванні DOS CP850 на дані у кодуванні Latin-1 - Unix: - - dos2unix -850 -n in.txt out.txt - - Перетворити дані у кодуванні CP1252 Windows на дані у кодуванні - Latin-1 Unix: - - dos2unix -1252 -n in.txt out.txt - - Перетворити дані у кодуванні CP252 Windows на дані у кодуванні UTF-8 - Unix (Unicode): - - iconv -f CP1252 -t UTF-8 in.txt | dos2unix > out.txt - - Перетворити дані у кодуванні Latin-1 Unix на дані у типовому - кодуванні DOS: - - unix2dos -iso -n in.txt out.txt - - Перетворити дані у кодуванні Latin-1 Unix на дані у кодуванні DOS - CP850: - - unix2dos -850 -n in.txt out.txt - - Перетворити дані у кодуванні Latin-1 Unix на дані у кодуванні - Windows CP1252: - - unix2dos -1252 -n in.txt out.txt - - Перетворити дані у кодуванні UTF-8 Unix (Unicode) на дані у - кодуванні Windows CP1252: - - unix2dos < in.txt | iconv -f UTF-8 -t CP1252 > out.txt - - Див. також та - . - -UNICODE - Кодування - Існує декілька різних кодувань Unicode. У Unix та Linux у файлах Unicode - здебільшого використовується кодування UTF-8. У Windows для текстових - файлів Unicode може бути використано кодування UTF-8, UTF-16 або UTF-16 - зі зворотним порядком байтів. Втім, здебільшого, використовується формат - UTF-16. - - Перетворення - У текстових файлах Unicode, як і у звичайних текстових файлах, може бути - використано розриви рядків DOS, Unix або Mac. - - Усі версії dos2unix та unix2dos здатні виконувати перетворення у - кодуванні UTF-8, оскільки UTF-8 було розроблено так, що зворотну - сумісність з ASCII збережено. - - Програми dos2unix та unix2dos, зібрані з підтримкою Unicode UTF-16, - можуть читати текстові файли у кодуванні UTF-16 з прямим та зворотним - порядком байтів. Щоб дізнатися про те, чи було dos2unix зібрано з - підтримкою UTF-16, віддайте команду "dos2unix -V". - - У Unix/Linux файли у кодуванні UTF-16 перетворюються на файли у - кодуванні локалі. Для визначення поточного кодування символів локалі - скористайтеся командою locale(1). Якщо перетворення виявиться - неможливим, програма повідомить про помилку перетворення і пропустить - відповідний файл. - - У Windows файли UTF-16 типово буде перетворено на файли UTF-8. Обидва - типи систем, Windows та Unix/Linux, мають непогані можливості з - підтримки файлів у форматуванні UTF-8. - - Кодування UTF-16 та UTF-8 є повністю сумісними. Під час перетворення не - буде втрачено жодної інформації. Якщо під час перетворення даних у - кодуванні UTF-16 на дані у кодуванні UTF-8 трапиться помилка, наприклад, - якщо у вхідному файлі UTF-16 міститиметься якась помилка, файл буде - пропущено. - - Якщо використано параметр "-u", файл результатів буде записано у тому - самому кодуванні UTF-16, що і початковий файл. Використання параметра - Option "-u" запобігає перетворенню даних у кодування UTF-8. - - У dos2unix та unix2dos не передбачено параметра для перетворення даних у - кодуванні UTF-8 на дані у кодуванні UTF-16. - - Режим перетворення ISO та 7-бітовий режим не працюють для файлів UTF-16. - - Позначка порядку байтів - У Windows до текстових файлів у кодуванні Unicode типово дописується - позначка порядку байтів (BOM), оскільки багато програм Windows (зокрема - Notepad) додають таку позначку автоматично. Див. також - . - - У Unix файли у кодуванні Unicode типово не містять позначки порядку - байтів. Вважається, що кодуванням текстових файлів є те кодування, яке - визначається поточною локаллю. - - Програма dos2unix може визначити, чи є кодуванням файла UTF-16, лише - якщо у файлі міститься позначка порядку байтів. Якщо у файлі, де - використано кодування UTF-16, немає такої позначки, dos2unix вважатиме - такий файл двійковим (бінарним). - - Для перетворення файлів UTF-16 без позначки порядку байтів скористайтеся - параметром "-ul" або "-ub". - - Типово dos2unix не записує до файлів результатів перетворення позначки - порядку байтів (BOM). Якщо використано параметр "-b", dos2unix запише до - файла результатів BOM, якщо BOM була у файлі початкових даних. - - Типово unix2dos записує позначку порядку байтів (BOM) до файла - результатів, якщо BOM є у початковому файлі. Скористайтеся параметром - "-r", щоб вилучити BOM. - - Dos2unix та unix2dos завжди записують до файла результатів позначку - порядку байтів (BOM), якщо використано параметр "-m". - - Приклади для Unicode - Перетворити дані з Windows UTF-16 (з позначкою порядку байтів (BOM)) у - формат Unix UTF-8: - - dos2unix -n in.txt out.txt - - Перетворити дані у форматі Windows UTF-16LE (без BOM) на дані у форматі - UTF-8 Unix: - - dos2unix -ul -n in.txt out.txt - - Перетворити дані у кодуванні UTF-8 Unix на дані у кодуванні Windows - UTF-8 без BOM: - - unix2dos -m -n in.txt out.txt - - Перетворити дані у кодуванні UTF-8 Unix на дані у кодуванні Windows - UTF-16: - - unix2dos < in.txt | iconv -f UTF-8 -t UTF-16 > out.txt - -GB18030 - GB18030 є китайським урядовим стандартом. Підтримка обов’язкової - підмножини стандарту GB18030 є неодмінною вимогою до будь-яких - програмних продуктів, які продаються у Китаї. Див. також - . - - Кодування GB18030 є повністю сумісним із Unicode. Його можна розглядати - як формат перетворення unicode. Подібно до UTF-8, GB18030 є сумісним із - ASCII. GB18030 також є сумісним із кодовою сторінкою Windows 936, яку ще - називають GBK. - - У Unix/Linux файли UTF-16 буде перетворено до кодування GB18030, якщо - кодуванням локалі є GB18030. Зауважте, що це спрацює, лише якщо - встановлено значення країни КНР. Наприклад, у англійській локалі для - Великоританії із встановленою локаллю "en_GB.GB18030" перетворення - UTF-16 на GB18030 не працюватиме, а у китайській локалі "zh_CN.GB18030" - все працюватиме як слід. - - У Windows для перетворення файлів UTF-16 на файли GB18030 слід вказати - параметр "-gb". - - У файлах у кодуванні GB18030 може міститися позначка порядку байтів, так - само, як у файлах у кодуванні Unicode. - -ПРИКЛАДИ - Прочитати вхідні дані зі стандартного джерела (stdin) і записати - результат до стандартного виведення (stdout): - - dos2unix - dos2unix -l -c mac - - Перетворити дані у a.txt і замістити цей файл. Перетворити дані у b.txt - і замістити цей файл: - - dos2unix a.txt b.txt - dos2unix -o a.txt b.txt - - Перетворити дані у a.txt і замістити файл у режимі перетворення ascii: - - dos2unix a.txt - - Перетворити дані у a.txt і замістити файл у режимі перетворення ascii. - Перетворити дані у b.txt і замістити цей файл у режимі 7-бітового - перетворення: - - dos2unix a.txt -c 7bit b.txt - dos2unix -c ascii a.txt -c 7bit b.txt - dos2unix -ascii a.txt -7 b.txt - - Перетворити файл a.txt з формату Mac на формат Unix: - - dos2unix -c mac a.txt - mac2unix a.txt - - Перетворити файл a.txt з формату Unix на формат Mac: - - unix2dos -c mac a.txt - unix2mac a.txt - - Перетворити дані у a.txt, замістити цей файл і зберегти часову позначку - початкового файла: - - dos2unix -k a.txt - dos2unix -k -o a.txt - - Перетворити дані у файлі a.txt і записати результати до файла e.txt: - - dos2unix -n a.txt e.txt - - Перетворити дані у файлі a.txt і записати результати до файла e.txt. - Скопіювати часову позначку файла a.txt для файла e.txt: - - dos2unix -k -n a.txt e.txt - - Перетворити дані у a.txt і замістити цей файл. Перетворити дані у b.txt - і записати результат до e.txt: - - dos2unix a.txt -n b.txt e.txt - dos2unix -o a.txt -n b.txt e.txt - - Перетворити дані у c.txt і записати результати до e.txt. Перетворити - дані у a.txt і замістити ними цей файл. Перетворити дані у b.txt і - замістити ними цей файл. Перетворити дані у d.txt і записати результати - до f.txt: - - dos2unix -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt - -РЕКУРСИВНЕ ПЕРЕТВОРЕННЯ - Для рекурсивного перетворення текстових файлів у ієрархії каталогів слід - використовувати dos2unix у поєднанні з програмами find(1) та xargs(1). - Наприклад, щоб виконати перетворення усіх файлів .txt у структурі - підкаталогів поточного каталогу, віддайте таку команду: - - find . -name *.txt |xargs dos2unix - -ЛОКАЛІЗАЦІЯ - LANG - Основна мова визначається за допомогою змінної середовища LANG. - Значення змінної LANG складається з декількох частин. Перша частина - записується малими літерами і визначає код мови. Друга частина є - необов’язковою, визначає код країни і записується прописними - літерами, відокремлюється від першої частини символом - підкреслювання. Передбачено також необов’язкову третю частину: - кодування. Ця частина відокремлюється від другої частини крапкою. - Ось декілька прикладів для командних оболонок стандартного типу - POSIX: - - export LANG=uk українська - export LANG=uk_UA українська, Україна - export LANG=ru_UA російська, Україна - export LANG=es_ES іспанська, Іспанія - export LANG=es_MX іспанська, Мексика - export LANG=en_US.iso88591 англійська, США, кодування Latin-1 - export LANG=en_GB.UTF-8 англійська, Великобританія, кодування UTF-8 - - Повний список мов та кодів країн наведено у підручнику з gettext: - - - У системах Unix для отримання даних щодо локалі можна скористатися - командою locale(1). - - LANGUAGE - За допомогою змінної середовища LANGUAGE ви можете вказати список - пріоритеності мов. Записи у списку слід відокремлювати двокрапками. - Програма dos2unix надає перевагу LANGUAGE над LANG. Наприклад, перша - голландська, далі німецька: "LANGUAGE=nl:de". Спочатку вам слід - увімкнути локалізацію, встановивши для змінної LANG (або LC_ALL) - значення, відмінне від «C». Далі ви зможете використовувати список - пріоритетності мов за допомогою змінної LANGUAGE. Додаткові - відомості можна знайти у підручнику з gettext: - - - Якщо вами буде вибрано мову, перекладу якою немає, буде показано - стандартні повідомлення англійською мовою. - - DOS2UNIX_LOCALEDIR - Змінну LOCALEDIR, встановлену під час збирання програми, можна - змінити за допомогою змінної середовища DOS2UNIX_LOCALEDIR. - LOCALEDIR використовується для пошуку файлів перекладів. Типовим - значенням у системах GNU є "/usr/local/share/locale". Переглянути - поточне значення змінної LOCALEDIR можна переглянути за допомогою - параметра --version. - - Приклад (командна оболонка POSIX): - - export DOS2UNIX_LOCALEDIR=$HOME/share/locale - -ПОВЕРНУТЕ ЗНАЧЕННЯ - Якщо завдання вдасться успішно виконати, програма поверне нульовий код - виходу. Якщо станеться системна помилка, буде повернуто код цієї - помилки. Якщо станеться якась інша помилка, буде повернуто код 1. - - У режимі без повідомлень повернутим значенням завжди буде нуль, якщо - вказано правильні параметри командного рядка. - -СТАНДАРТИ - - - - - - - - -АВТОРИ - Benjamin Lin - , Bernd Johannes Wuebben (режим - mac2unix) - , Christian Wurll (додатковий новий рядок) - - , Erwin Waterlander - - (супровідник) - - Сторінка проекту: - - Сторінка на SourceForge: - -ТАКОЖ ПЕРЕГЛЯНЬТЕ - file(1) find(1) iconv(1) locale(1) xargs(1) - diff --git a/Tools/dos2unix/share/man/de/man1/dos2unix.1 b/Tools/dos2unix/share/man/de/man1/dos2unix.1 deleted file mode 100644 index 4ca2eeb..0000000 --- a/Tools/dos2unix/share/man/de/man1/dos2unix.1 +++ /dev/null @@ -1,781 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "BEZEICHNUNG" -.IX Header "BEZEICHNUNG" -dos2unix \- Formatumwandlung für Textdateien von DOS/Mac nach Unix und -umgekehrt -.SH "ÜBERSICHT" -.IX Header "ÜBERSICHT" -.Vb 2 -\& dos2unix [Optionen] [DATEI …] [\-n EINGABEDATEI AUSGABEDATEI …] -\& unix2dos [Optionen] [DATEI …] [\-n EINGABEDATEI AUSGABEDATEI …] -.Ve -.SH "BESCHREIBUNG" -.IX Header "BESCHREIBUNG" -Das Paket Dos2unix enthält die Werkzeuge \f(CW\*(C`dos2unix\*(C'\fR und \f(CW\*(C`unix2dos\*(C'\fR zum -Umwandeln einfacher Textdateien aus dem \s-1DOS\-\s0 oder Mac-Format in das -Unix-Format und umgekehrt. -.PP -In Textdateien unter DOS/Windows sind Zeilenumbrüche, auch als neue Zeile -(\s-1NL\s0) bekannt, eine Kombination aus zwei Zeichen: einem Wagenrücklauf -(Carriage Return, \s-1CR\s0) gefolgt von einem Zeilenvorschub (Line Feed, \s-1LF\s0). In -Unix-Textdateien bestehen Zeilenumbrüche nur aus einem Zeichen, dem -Zeilenvorschub (\s-1LF\s0). In Mac-Textdateien aus der Zeit vor MacOSX bestand ein -Zeilenumbruch aus einem einzelnen CR-Zeichen. Heute verwendet Mac \s-1OS\s0 -Zeilenumbrüche im Unix-Stil (\s-1LF\s0). -.PP -Neben Zeilenumbrüchen kann Dos2unix auch die Zeichenkodierung von Dateien -umwandeln. Einige DOS-Codepages können in Unix Latin\-1 umgewandelt werden, -und Windows-Unicode-Dateien (\s-1UTF\-16\s0) können in Unix-Unicode-Dateien (\s-1UTF\-8\s0) -umgewandelt werden. -.PP -Binärdateien werden automatisch übersprungen, sofern die Umwandlung nicht -erzwungen wird. -.PP -Nicht\-reguläre Dateien, wie Verzeichnisse und \s-1FIFOS \s0(Weiterleitungen) werden -automatisch übersprungen. -.PP -Symbolische Links und deren Ziele werden per Vorgabe unverändert -belassen. Symbolische Links können optional ersetzt werden, oder die Ausgabe -wird in das Ziel des symbolischen Links geschrieben. Unter Windows wird das -Schreiben in das Ziel eines symbolischen Links nicht unterstützt. -.PP -Dos2unix wurde nach dem Vorbild der dos2unix\-Version unter SunOS/Solaris -entwickelt, doch es gitb einen wesentlichen Unterschied zu: Diese Version -ersetzt per Vorgabe Dateien bei der Umwandlung (Alte-Datei-Modus), während -unter SunOS/Solaris nur die paarweise Umwandlung (Neue-Datei-Modus) -unterstützt wird. Siehe dazu die Optionen \f(CW\*(C`\-o\*(C'\fR und \f(CW\*(C`\-n\*(C'\fR. -.SH "OPTIONEN" -.IX Header "OPTIONEN" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -nimmt alle folgenden Optionen als Dateinamen an. Verwenden Sie diese Option, -wenn Sie Dateien umwandeln wollen, deren Namen mit einem Minuszeichen -beginnen. Um beispielsweise eine Datei namens »\-bla« umzuwandeln, können Sie -folgenden Befehl verwenden: -.Sp -.Vb 1 -\& dos2unix \-\- \-bla -.Ve -.Sp -oder im Neue-Datei-Modus: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-bla ausgabe.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -wandelt nur Zeilenumbrüche um. Dies ist der vorgegebene Umwandlungsmodus. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -wandelt aus dem \s-1DOS\-\s0 in den ISO\-8859\-1\-Zeichensatz um. Weitere Informationen -hierzu finden Sie im Abschnitt \s-1UMWANDLUNGSMODI.\s0 -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -verwendet die Windows-Codepage 1252 (Westeuropäisch). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -verwendet die DOS-Codepage 437 (\s-1US\s0). Dies ist die vorgegebene Codepage für -die ISO-Umwandlung. -.IP "\fB\-850\fR" 4 -.IX Item "-850" -verwendet die DOS-Codepage 850 (Westeuropäisch). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -verwendet die DOS-Codepage 860 (Portugiesisch). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -verwendet die DOS-Codepage 863 (Kanadisches Französisch). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -verwendet die DOS-Codepage 865 (Skandinavisch). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -wandelt 8bit\-Zeichen in ein 7bit\-Bitmuster um. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -erhält die Markierung der Bytereihenfolge (\s-1BOM\s0). Wenn die Eingabedatei eine -\&\s-1BOM\s0 enthält, wird ebenfalls eine \s-1BOM\s0 in die Ausgabedatei geschrieben. Dies -ist das Standardverhalten beim Umwandeln von DOS\-Zeilenumbrüchen. Siehe auch -die Option \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode \s-1UMWANDLUNGSMODUS\s0\fR" 4 -.IX Item "-c, --convmode UMWANDLUNGSMODUS" -legt den Umwandlungsmodus fest. \s-1UMWANDLUNGSMODUS\s0 kann \fIascii\fR, \fI7bit\fR, -\&\fIiso\fR oder \fImac\fR sein, wobei \fIascii\fR die Vorgabe ist. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -erzwingt die Umwandlung von Binärdateien. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -wandelt unter Windows UTF\-16\-Dateien standardmäßig in \s-1UTF\-8\s0 um, ungeachtet -der Einstellung der Locale. Verwenden Sie diese Option zum umwandeln von -Utf\-16\-Dateien in \s-1GB18030.\s0 Diese Option ist nur unter Windows -verfügbar. Siehe auch Abschnitt \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -zeigt eine Hilfe an und beendet das Programm. -.IP "\fB\-i[\s-1SCHALTER\s0], \-\-info[=SCHALTER] \s-1DATEI\s0\fR" 4 -.IX Item "-i[SCHALTER], --info[=SCHALTER] DATEI" -zeigt Dateiinformationen an. Es wird keine Umwandlung vorgenommen. -.Sp -Die Ausgabe der Informationen geschieht in der folgenden Reihenfolge: Anzahl -der DOS\-Zeilenumbrüche, Anzahl der Unix\-Zeilenumbrüche, Anzahl der -Mac\-Zeilenumbrüche, Markierung der Bytereihenfolge, Text\- oder Binärformat, -Dateiname. -.Sp -Beispielausgabe: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Optionale zusätzliche Schalter können gesetzt werden, um die Ausgabe -anzupassen. Einer oder mehrere Schalter können hinzugefügt werden. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -gibt die Anzahl der DOS\-Zeilenumbrüche aus. -.IP "\fBu\fR" 4 -.IX Item "u" -gibt die Anzahl der Unix\-Zeilenumbrüche aus. -.IP "\fBm\fR" 4 -.IX Item "m" -gibt die Anzahl der Mac\-Zeilenumbrüche aus. -.IP "\fBb\fR" 4 -.IX Item "b" -gibt die Markierung der Bytereihenfolge aus. -.IP "\fBt\fR" 4 -.IX Item "t" -zeigt an, ob es sich um eine Text\- oder eine Binärdatei handelt. -.IP "\fBc\fR" 4 -.IX Item "c" -gibt nur die Dateien aus, die umgewandelt werden würden. -.Sp -Mit dem Schalter \f(CW\*(C`c\*(C'\fR gibt dos2unix nur die Dateien aus, die -DOS\-Zeilenumbrüche enthalten, unix2dos nur die Dateien mit -Unix\-Zeilenumbrüchen. -.RE -.RS 4 -.Sp -Beispiele: -.Sp -Informationen zu allen *.txt\-Dateien anzeigen: -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Nur die Anzahl der DOS\-Zeilenumbrüche und Unix\-Zeilenumbrüche anzeigen: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Nur die Markierung der Bytereihenfolge anzeigen: -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -Die Dateien auflisten, die DOS\-Zeilenumbrüche enthalten: -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -Die Dateien auflisten, die Unix\-Zeilenumbrüche enthalten: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -übernimmt den Zeitstempel der Eingabedatei in die Ausgabedatei. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -zeigt die Lizenz des Programms an. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -fügt eine zusätzliche neue Zeile hinzu. -.Sp -\&\fBdos2unix\fR: Nur DOS\-Zeilenumbrüche werden in Unix\-Zeilenumbrüche -umgewandelt. Im Mac-Modus werden nur Mac\-Zeilenumbrüche in -Unix\-Zeilenumbrüche umgewandelt. -.Sp -\&\fBunix2dos\fR: Nur Unix\-Zeilenumbrüche werden in DOS\-Zeilenumbrüche -umgewandelt. Im Mac-Modus werden nur Unix\-Zeilenumbrüche in -Mac\-Zeilenumbrüche umgewandelt. -.IP "\fB\-m, \-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -schreibt eine Markierung der Bytereihenfolge (\s-1BOM\s0) in die Ausgabedatei. In -der Voreinstellung wird eine \s-1UTF\-8\-BOM\s0 geschrieben. -.Sp -Wenn die Eingabedatei in \s-1UTF\-16\s0 kodiert ist und die Option \f(CW\*(C`\-u\*(C'\fR verwendet -wird, wird eine \s-1UTF\-16\-BOM\s0 geschrieben. -.Sp -Verwenden Sie diese Option niemals, wenn die Kodierung der Ausgabedatei -weder \s-1UTF\-8\s0 noch \s-1UTF\-16\s0 ist. Weitere Informationen finden Sie im Abschnitt -\&\s-1UNICODE.\s0 -.IP "\fB\-n, \-\-newfile \s-1EINGABEDATEI AUSGABEDATEI\s0 …\fR" 4 -.IX Item "-n, --newfile EINGABEDATEI AUSGABEDATEI …" -Neue-Datei-Modus. Die \s-1EINGABEDATEI\s0 wird umgewandelt und in die \s-1AUSGABEDATEI\s0 -geschrieben. Die Dateinamen müssen paarweise angegeben werden. Platzhalter -sollten \fInicht\fR verwendet werden, sonst werden Sie Ihre Dateien -\&\fIverlieren\fR. -.Sp -Der Benutzer, der die Umwandlung im Neue-Datei-Modus startet, wird Besitzer -der umgewandelten Datei. Die Lese\- und Schreibrechte werden aus den -Zugriffsrechten der Originaldatei minus der \fIumask\fR\|(1) der Person ermittelt, -die die Umwandlung ausgeführt hat. -.IP "\fB\-o, \-\-oldfile \s-1DATEI\s0 …\fR" 4 -.IX Item "-o, --oldfile DATEI …" -Alte-Datei-Modus. Die \s-1DATEI\s0 wird umgewandelt und durch die Ausgabedatei -überschrieben. Per Vorgabe werden Umwandlungen in diesem Modus -ausgeführt. Platzhalter sind verwendbar. -.Sp -Im Alte-Datei-Modus (Ersetzungsmodus) erhalten die umgewandelten Dateien den -gleichen Eigentümer, die gleiche Gruppe und die gleichen Lese\- und -Schreibberechtigungen wie die Originaldatei, auch wenn die Datei von einem -anderen Benutzer umgewandelt wird, der Schreibrechte für die Datei hat (zum -Beispiel der Systemadministrator). Die Umwandlung wird abgebrochen, wenn es -nicht möglich ist, die originalen Werte beizubehalten. Die Änderung des -Eigentümers könnte zum Beispiel bewirken, dass der ursprüngliche Eigentümer -die Datei nicht mehr lesen kann. Die Änderung der Gruppe könnte ein -Sicherheitsrisiko sein, da die Datei vielleicht für Benutzer lesbar wird, -für die sie nicht bestimmt ist. Die Beibehaltung von Eigentümer, Gruppe und -Schreib\- und Leserechten wird nur unter Unix unterstützt. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Stiller Modus, in dem alle Warnungen und sonstige Meldungen unterdrückt -werden. Der Rückgabewert ist 0, außer wenn fehlerhafte Befehlszeilenoptionen -angegeben werden. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -entfernt die Markierung der Bytereihenfolge (\s-1BOM\s0). Es wird keine \s-1BOM\s0 in die -Ausgabedatei geschrieben. Dies ist das Standardverhalten beim Umwandeln von -Unix\-Zeilenumbrüchen. Siehe auch die Option \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s, \-\-safe\fR" 4 -.IX Item "-s, --safe" -überspringt Binärdateien (Vorgabe). -.IP "\fB\-u, \-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -erhält die originale UTF\-16\-Kodierung der Eingabedatei. Die Ausgabedatei -wird in der gleichen UTF\-16\-Kodierung geschrieben (Little\-Endian\- oder -Big-Endian-Bytereihenfolge) wie die Eingabedatei. Dies verhindert die -Umwandlung in \s-1UTF\-8.\s0 Eine \s-1UTF\-16\-BOM\s0 wird dementsprechend geschrieben. Diese -Option kann durch Angabe der Option \f(CW\*(C`\-ascii\*(C'\fR deaktiviert werden. -.IP "\fB\-ul, \-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -nimmt an, dass die Eingabedatei das Format \s-1UTF\-16LE\s0 hat. -.Sp -Wenn die Eingabedatei eine Markierung der Bytereihenfolge enthält (\s-1BOM\s0), -dann hat die \s-1BOM\s0 Vorrang vor dieser Option. -.Sp -Durch eine falsche Annahme (die Eingabedatei war nicht in \s-1UTF\-16LE\s0 kodiert) -mit erfolgreicher Umwandlung erhalten Sie eine UTF\-8\-Ausgabedatei mit -fehlerhaftem Text. Sie können die fehlgeschlagene Umwandlung mit \fIiconv\fR\|(1) -rückgängig machen, indem Sie die Rückumwandlung von \s-1UTF\-8\s0 nach \s-1UTF\-16LE\s0 -vornehmen. Dadurch gewinnen Sie die Originaldatei zurück. -.Sp -Die Annahme von \s-1UTF\-16LE\s0 wirkt wie ein \fIUmwandlungsmodus\fR. Beim Wechsel zum -vorgegebenen \fIascii\fR\-Modus wird die UTF16LE\-Annahme deaktiviert. -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -nimmt an, dass die Eingabedatei das Format \s-1UTF\-16BE\s0 hat. -.Sp -Diese Option ist gleichbedeutend mit \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v, \-\-verbose\fR" 4 -.IX Item "-v, --verbose" -zeigt ausführliche Meldungen an. Zusätzliche Informationen werden zu den -Markierungen der Bytereihenfolge (\s-1BOM\s0) und zur Anzahl der umgewandelten -Zeilenumbrüche angezeigt. -.IP "\fB\-F, \-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -folgt symbolischen Links und wandelt die Zieldateien um. -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -ersetzt symbolische Links durch die umgewandelten Dateien (die originalen -Zieldateien bleiben unverändert). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -erhält symbolische Links als solche und lässt die Ziele unverändert -(Vorgabe). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -zeigt Versionsinformationen an und beendet das Programm. -.SH "MAC-MODUS" -.IX Header "MAC-MODUS" -Im Normalmodus werden Zeilenumbrüche von \s-1DOS\s0 nach Unix und umgekehrt -umgewandelt. Mac\-Zeilenumbrüche werden nicht verändert. -.PP -Im Mac-Modus werden Zeilenumbrüche von Mac nach Unix und umgekehrt -umgewandelt. DOS\-Zeilenumbrüche werden nicht verändert. -.PP -Um das Programm im Mac-Modus auszuführen, verwenden Sie die -Befehlszeilenoption \f(CW\*(C`\-c mac\*(C'\fR oder die Befehle \f(CW\*(C`mac2unix\*(C'\fR oder \f(CW\*(C`unix2mac\*(C'\fR. -.SH "UMWANDLUNGSMODI" -.IX Header "UMWANDLUNGSMODI" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -Im \f(CW\*(C`ascii\*(C'\fR\-Modus werden nur Zeilenumbrüche umgewandelt. Dies ist der -vorgegebene Umwandlungsmodus. -.Sp -Obwohl der Name dieses Modus auf \s-1ASCII\s0 hinweist, welches ein 7\-bit\-Standard -ist, bezieht sich der eigentliche Modus auf 8 Bit. Verwenden Sie diesen -Modus immer dann, wenn Sie Unicode-Dateien in UTF\-8\-Kodierung umwandeln. -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -In diesem Modus werden alle Nicht-ASCII-Zeichen aus 8 Bit in das -7\-Bit\-Bitmuster umgewandelt. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Die Zeichen werden aus dem DOS-Zeichensatz (der Codepage) in den -ISO-Zeichensatz \s-1ISO\-8859\-1 \s0(Latin\-1) in Unix umgewandelt. DOS-Zeichen ohne -Äquivalent in \s-1ISO\-8859\-1,\s0 für die die Umwandlung nicht möglich ist, werden -durch einen Punkt ersetzt. Gleiches gilt für ISO\-8859\-1\-Zeichen ohne -DOS\-Gegenstück. -.Sp -Wenn nur die Option \f(CW\*(C`\-iso\*(C'\fR angegeben ist, versucht dos2unix die aktive -Codepage selbst zu ermitteln. Sollte dies nicht möglich sein, wird die -Standard-Codepage \s-1CP437\s0 verwendet, welche hauptsächlich in den \s-1USA\s0 -eingesetzt wird. Um eine bestimmte Codepage zu erzwingen, verwenden Sie die -Optionen \f(CW\*(C`\-437\*(C'\fR (\s-1US\s0), \f(CW\*(C`\-850\*(C'\fR (Westeuropäisch), \f(CW\*(C`\-860\*(C'\fR (Portugiesisch), -\&\f(CW\*(C`\-863\*(C'\fR (Kanadisches Französisch) oder \f(CW\*(C`\-865\*(C'\fR (Skandinavisch). Die -Windows-Codepage \s-1CP1252 \s0(Westeuropäisch) wird durch die Option \f(CW\*(C`\-1252\*(C'\fR -unterstützt. -.Sp -Wenden Sie niemals die ISO-Umwandlung auf Unicode-Textdateien an. In \s-1UTF\-8\s0 -kodierte Dateien werden dadurch beschädigt. -.Sp -Einige Beispiele: -.Sp -Umwandlung aus der vorgegebenen DOS-Codepage nach Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-iso \-n in.txt ausgabe.txt -.Ve -.Sp -Umwandlung von \s-1DOS CP850\s0 nach Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-850 \-n eingabe.txt ausgabe.txt -.Ve -.Sp -Umwandlung von Windows \s-1CP1252\s0 nach Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n eingabe.txt ausgabe.txt -.Ve -.Sp -Umwandlung von Windows \s-1CP1252\s0 nach Unix \s-1UTF\-8 \s0(Unicode): -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 eingabe.txt | dos2unix > ausgabe.txt -.Ve -.Sp -Umwandlung von Unix Latin\-1 in die vorgegebene DOS-Codepage: -.Sp -.Vb 1 -\& unix2dos \-iso \-n eingabe.txt ausgabe.txt -.Ve -.Sp -Umwandlung von Unix Latin\-1 nach \s-1DOS CP850:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n eingabe.txt ausgabe.txt -.Ve -.Sp -Umwandlung von Unix Latin\-1 nach Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos \-1252 \-n eingabe.txt ausgabe.txt -.Ve -.Sp -Umwandlung von Unix \s-1UTF\-8 \s0(Unicode) nach Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos < eingabe.txt | iconv \-f UTF\-8 \-t CP1252 > ausgabe.txt -.Ve -.Sp -Siehe auch und -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Zeichenkodierungen" -.IX Subsection "Zeichenkodierungen" -Es gibt verschiedene Unicode-Zeichenkodierungen. Unter Unix und Linux sind -Unicode-Dateien typischerweise in \s-1UTF\-8\s0 kodiert. Unter Windows können -Textdateien in \s-1UTF\-8, UTF\-16\s0 oder \s-1UTF\-16\s0 in Big-Endian-Bytereihenfolge -kodiert sein, liegen aber meist im Format \s-1UTF\-16\s0 vor. -.SS "Umwandlung" -.IX Subsection "Umwandlung" -Unicode-Textdateien können \s-1DOS\-,\s0 Unix\- oder Mac\-Zeilenumbrüche enthalten, so -wie reguläre Textdateien. -.PP -Alle Versionen von dos2unix und unix2dos können UTF\-8\-kodierte Dateien -umwandeln, weil \s-1UTF\-8\s0 im Hinblick auf Abwärtskompatiblität mit \s-1ASCII\s0 -entwickelt wurde. -.PP -Dos2unix und unix2dos mit Unterstützung für \s-1UTF\-16\s0 können in \s-1UTF\-16\s0 kodierte -Dateien in Little\-Endian\- und Big-Endian-Bytereihenfolge lesen. Um -festzustellen, ob dos2unix mit UTF\-16\-Unterstützung kompiliert wurde, geben -Sie \f(CW\*(C`dos2unix \-V\*(C'\fR ein. -.PP -Unter Unix/Linux werden \s-1UTF\-16\s0 kodierte Dateien standardmäßig in die -Zeichenkodierung entsprechend der Locale umgewandelt. Mit dem Befehl -\&\fIlocale\fR\|(1) können Sie herausfinden, wie die Zeichenkodierung der Locale -eingestellt ist. Wenn eine Umwandlung nicht möglich ist, verursacht dies -einen Umwandlungsfehler, wodurch die Datei übersprungen wird. -.PP -Unter Windows werden UTF\-16\-Dateien standardmäßig in \s-1UTF\-8\s0 umgewandelt. In -\&\s-1UTF\-8\s0 formatierte Textdateien werden von Windows und Unix/Linux -gleichermaßen unterstützt. -.PP -Die Kodierungen \s-1UTF\-16\s0 und \s-1UTF\-8\s0 sind vollständig kompatibel, daher wird bei -der Umwandlung keinerlei Text verlorengehen. Sollte bei der Umwandlung von -\&\s-1UTF\-16\s0 in \s-1UTF\-8\s0 ein Problem auftreten, beispielsweise wenn die -UTF\-16\-kodierte Eingabedatei einen Fehler enthält, dann wird diese Datei -übersprungen. -.PP -Wenn die Option \f(CW\*(C`\-u\*(C'\fR verwendet wird, wird die Ausgabedatei in der gleichen -UTF\-16\-Kodierung wie die Eingabedatei geschrieben. Die Option \f(CW\*(C`\-u\*(C'\fR -verhindert die Umwandlung in \s-1UTF\-8.\s0 -.PP -Dos2unix und unix2dos bieten keine Option zur Umwandlung von UTF\-8\-Dateien -in \s-1UTF\-16.\s0 -.PP -Umwandlungen im \s-1ISO\-\s0 und 7bit\-Modus funktionieren mit UTF\-16\-Dateien nicht. -.SS "Markierung der Bytereihenfolge" -.IX Subsection "Markierung der Bytereihenfolge" -Unicode-Textdateien unter Windows haben typischerweise eine Markierung der -Bytereihenfolge (\s-1BOM\s0), da viele Windows-Programme (zum Beispiel Notepad) -solche BOMs standardmäßig hinzufügen. Weitere Informationen hierzu finden -Sie auf . -.PP -Unter Unix haben Textdateien üblicherweise keine \s-1BOM.\s0 Es wird stattdessen -angenommen, dass Textdateien in der Zeichenkodierung entsprechend der -Spracheinstellung vorliegen. -.PP -Dos2unix kann nur dann erkennen, ob eine Datei UTF\-16\-kodiert ist, wenn die -Datei eine \s-1BOM\s0 enthält. Ist dies nicht der Fall, nimmt dos2unix an, dass es -sich um eine Binärdatei handelt. -.PP -Verwenden Sie die Optionen \f(CW\*(C`\-ul\*(C'\fR oder \f(CW\*(C`\-ub\*(C'\fR, um eine UTF\-16\-Datei ohne \s-1BOM\s0 -umzuwandeln. -.PP -Dos2unix schreibt in der Voreinstellung keine \s-1BOM\s0 in die Ausgabedatei. Mit -der Option \f(CW\*(C`\-b\*(C'\fR schreibt Dos2unix eine \s-1BOM,\s0 wenn die Eingabedatei ebenfalls -eine \s-1BOM\s0 hat. -.PP -Unix2dos schreibt in der Voreinstellung eine \s-1BOM\s0 in die Ausgabedatei, wenn -die Eingabedatei ebenfalls eine solche Markierung hat. Verwenden Sie die -Option \f(CW\*(C`\-r\*(C'\fR, um die \s-1BOM\s0 zu entfernen. -.PP -Dos2unix und unix2dos schreiben immer eine \s-1BOM,\s0 wenn die Option \f(CW\*(C`\-m\*(C'\fR -angegeben ist. -.SS "Unicode-Beispiele" -.IX Subsection "Unicode-Beispiele" -Umwandlung von Windows \s-1UTF\-16 \s0(mit \s-1BOM\s0) nach Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-n eingabe.txt ausgabe.txt -.Ve -.PP -Umwandlung von Windows \s-1UTF\-16LE \s0(ohne \s-1BOM\s0) nach Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-ul \-n eingabe.txt ausgabe.txt -.Ve -.PP -Umwandlung von Unix \s-1UTF\-8\s0 nach Windows \s-1UTF\-8\s0 mit \s-1BOM:\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n eingabe.txt ausgabe.txt -.Ve -.PP -Umwandlung von Unix \s-1UTF\-8\s0 nach Windows \s-1UTF\-16:\s0 -.PP -.Vb 1 -\& unix2dos < eingabe.txt | iconv \-f UTF\-8 \-t UTF\-16 > ausgabe.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 ist ein Standard der chinesischen Regierung. Eine Teilmenge des in -\&\s-1GB18030\s0 definierten Standards ist offiziell für alle in China verkauften -Softwareprodukte vorgeschrieben. Siehe auch -. -.PP -\&\s-1GB18030\s0 ist vollständig zu Unicode kompatibel und kann als -Unicode-Umwandlungsformat betrahctet werden. Wie auch \s-1UTF\-8\s0 ist \s-1GB18030\s0 -kompatibel zu \s-1ASCII.\s0 Ebenfalls kompatibel ist es zur Codepage 936 von -Windows, auch als \s-1GBK\s0 bekannt. -.PP -Unter Unix/Linux werden UTF\-16\-Dateien in \s-1GB18030\s0 umgewandelt, wenn die -Einstellung der Locale auf \s-1GB18030\s0 gesetzt ist. Beachten Sie, dass dies nur -funktioniert, wenn der Ort auf »China« gesetzt ist. Zum Beispiel wird in -einer Locale-Einstellung \f(CW\*(C`en_GB.GB18030\*(C'\fR (Britisches Englisch) die -Umwandlung von \s-1UTF\-16\s0 in \s-1GB18030\s0 nicht möglich sein, aber in der -chinesischen Einstellung \f(CW\*(C`zh_CN.GB18030\*(C'\fR dagegen funktionieren. -.PP -Unter Windows benötigen Sie die Option \f(CW\*(C`\-gb\*(C'\fR, um UTF\-16\-Dateien in \s-1GB18030\s0 -umwandeln zu können. -.PP -In \s-1GB 18030\s0 kodierte Dateien haben wie Unicode-Dateien eine Markierung der -Bytereihenfolge (\s-1BOM\s0). -.SH "BEISPIELE" -.IX Header "BEISPIELE" -Aus der Standardeingabe lesen und in die Standardausgabe schreiben: -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -a.txt umwandeln und ersetzen, b.txt umwandeln und ersetzen: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -a.txt im ascii-Modus umwandeln und ersetzen: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -a.txt im ascii-Modus umwandeln und ersetzen, b.txt im 7bit\-Modus umwandeln -und ersetzen: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -a.txt aus dem Mac\- in das Unix-Format umwandeln: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -a.txt aus dem Unix\- in das Mac-Format umwandeln: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -a.txt unter Beibehaltung des ursprünglichen Zeitstempels umwandeln: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -a.txt umwandeln und das Ergebnis nach e.txt schreiben: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -a.txt umwandeln und das Ergebnis nach e.txt schreiben, wobei e.txt den -gleichen Zeitstempel erhält wie a.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -a.txt umwandeln und ersetzen, b.txt umwandeln und das Ergebnis nach e.txt -schreiben: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -c.txt umwandeln und das Ergebnis nach e.txt schreiben, a.txt umwandeln und -ersetzen, b.txt umwandeln und ersetzen, d.txt umwandeln und das Ergebnis -nach f.txt schreiben: -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "REKURSIVE UMWANDLUNG" -.IX Header "REKURSIVE UMWANDLUNG" -Verwenden Sie dos2unix zusammen mit den Befehlen \fIfind\fR\|(1) und \fIxargs\fR\|(1), um -Textdateien in einem Verzeichnisbaum rekursiv umzuwandeln. Um beispielsweise -alle *.txt\-Dateien im aktuellen Verzeichnis und dessen Unterverzeichnissen -umzuwandeln, geben Sie Folgendes ein: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "LOKALISIERUNG" -.IX Header "LOKALISIERUNG" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -Die primäre Sprache wird durch die Umgebungsvariable \s-1LANG\s0 festgelegt. Diese -Variable besteht aus mehreren Teilen: Der erste Teil besteht aus zwei -Kleinbuchstaben, die den Sprachcode angeben. Der zweite Teil ist optional -und bezeichnet den Ländercode in Großbuchstaben, vom davor stehenden -Sprachcode durch einen Unterstrich getrennt. Der dritte Teil ist ebenfalls -optional und gibt die Zeichenkodierung an, vom Ländercode durch einen Punkt -getrennt. Einige Beispiele für Standard-POSIX-Shells: -.Sp -.Vb 7 -\& export LANG=de Deutsch -\& export LANG=de_DE Deutsch, Deutschland -\& export LANG=de_AT Deutsch, Österreich -\& export LANG=es_ES Spanisch, Spanien -\& export LANG=es_MX Spanisch, Mexiko -\& export LANG=en_US.iso88591 Englisch, USA, Latin\-1\-Zeichenkodierung -\& export LANG=en_GB.UTF\-8 Englisch, GB, UTF\-8\-Zeichenkodierung -.Ve -.Sp -Eine vollständige Liste der Sprachen und Ländercodes finden Sie im -Gettext-Handbuch: - -.Sp -Auf Unix-Systemen erhalten Sie mit dem Befehl \fIlocale\fR\|(1) spezifische -Informationen zu den Spracheinstellungen. -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -Mit der Umgebungsvariable \s-1LANGUAGE\s0 können Sie eine Prioritätenliste für -Sprachen übergeben, die Sie durch Doppelpunkte voneinander trennen. Dos2unix -gibt \s-1LANGUAGE\s0 vor \s-1LANG\s0 den Vorzug, zum Beispiel bei Deutsch vor -Niederländisch: \f(CW\*(C`LANGUAGE=de:nl\*(C'\fR. Sie müssen zunächst die Lokalisierung -aktivieren, indem Sie die Variable \s-1LANG \s0(oder \s-1LC_ALL\s0) auf einen anderen Wert -als »C« setzen, bevor Sie die Liste der Sprachprioritäten mit der Variable -\&\s-1LANGUAGE\s0 nutzen können. Weitere Informationen finden Sie im -Gettext-Handbuch: - -.Sp -Falls Sie eine Sprache auswählen, die nicht verfügbar ist, erhalten Sie die -Standardmeldungen in englischer Sprache. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Durch die Umgebungsvariable \s-1DOS2UNIX_LOCALEDIR\s0 wird \s-1LOCALEDIR\s0 während der -Kompilierung übergangen. \s-1LOCALEDIR\s0 wird verwendet, um Sprachdateien zu -finden. Der GNU-Standardwert ist \f(CW\*(C`/usr/local/share/locale\*(C'\fR. Die Option -\&\fB\-\-version\fR zeigt das verwendete \s-1LOCALEDIR\s0 an. -.Sp -Beispiel (POSIX-Shell): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "RÜCKGABEWERT" -.IX Header "RÜCKGABEWERT" -Bei Erfolg wird 0 zurückgegeben. Bei aufgetretenen Systemfehlern wird der -letzte Systemfehler zurückgegeben. Für alle anderen Fehler wird 1 -zurückgegeben. -.PP -Der Rückgabewert ist im stillen Modus stets 0, außer wenn fehlerhafte -Befehlszeilenoptionen verwendet werden. -.SH "STANDARDS" -.IX Header "STANDARDS" - -.PP - -.PP - -.PP - -.SH "AUTOREN" -.IX Header "AUTOREN" -Benjamin Lin \- , Bernd Johannes Wuebben -(Mac2unix\-Modus) \- , Christian Wurll (Extra Zeilenumbruch) -\&\- , Erwin Waterlander \- (Betreuer) -.PP -Projektseite: -.PP -SourceForge-Seite: -.SH "SIEHE AUCH" -.IX Header "SIEHE AUCH" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/de/man1/mac2unix.1 b/Tools/dos2unix/share/man/de/man1/mac2unix.1 deleted file mode 100644 index 4ca2eeb..0000000 --- a/Tools/dos2unix/share/man/de/man1/mac2unix.1 +++ /dev/null @@ -1,781 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "BEZEICHNUNG" -.IX Header "BEZEICHNUNG" -dos2unix \- Formatumwandlung für Textdateien von DOS/Mac nach Unix und -umgekehrt -.SH "ÜBERSICHT" -.IX Header "ÜBERSICHT" -.Vb 2 -\& dos2unix [Optionen] [DATEI …] [\-n EINGABEDATEI AUSGABEDATEI …] -\& unix2dos [Optionen] [DATEI …] [\-n EINGABEDATEI AUSGABEDATEI …] -.Ve -.SH "BESCHREIBUNG" -.IX Header "BESCHREIBUNG" -Das Paket Dos2unix enthält die Werkzeuge \f(CW\*(C`dos2unix\*(C'\fR und \f(CW\*(C`unix2dos\*(C'\fR zum -Umwandeln einfacher Textdateien aus dem \s-1DOS\-\s0 oder Mac-Format in das -Unix-Format und umgekehrt. -.PP -In Textdateien unter DOS/Windows sind Zeilenumbrüche, auch als neue Zeile -(\s-1NL\s0) bekannt, eine Kombination aus zwei Zeichen: einem Wagenrücklauf -(Carriage Return, \s-1CR\s0) gefolgt von einem Zeilenvorschub (Line Feed, \s-1LF\s0). In -Unix-Textdateien bestehen Zeilenumbrüche nur aus einem Zeichen, dem -Zeilenvorschub (\s-1LF\s0). In Mac-Textdateien aus der Zeit vor MacOSX bestand ein -Zeilenumbruch aus einem einzelnen CR-Zeichen. Heute verwendet Mac \s-1OS\s0 -Zeilenumbrüche im Unix-Stil (\s-1LF\s0). -.PP -Neben Zeilenumbrüchen kann Dos2unix auch die Zeichenkodierung von Dateien -umwandeln. Einige DOS-Codepages können in Unix Latin\-1 umgewandelt werden, -und Windows-Unicode-Dateien (\s-1UTF\-16\s0) können in Unix-Unicode-Dateien (\s-1UTF\-8\s0) -umgewandelt werden. -.PP -Binärdateien werden automatisch übersprungen, sofern die Umwandlung nicht -erzwungen wird. -.PP -Nicht\-reguläre Dateien, wie Verzeichnisse und \s-1FIFOS \s0(Weiterleitungen) werden -automatisch übersprungen. -.PP -Symbolische Links und deren Ziele werden per Vorgabe unverändert -belassen. Symbolische Links können optional ersetzt werden, oder die Ausgabe -wird in das Ziel des symbolischen Links geschrieben. Unter Windows wird das -Schreiben in das Ziel eines symbolischen Links nicht unterstützt. -.PP -Dos2unix wurde nach dem Vorbild der dos2unix\-Version unter SunOS/Solaris -entwickelt, doch es gitb einen wesentlichen Unterschied zu: Diese Version -ersetzt per Vorgabe Dateien bei der Umwandlung (Alte-Datei-Modus), während -unter SunOS/Solaris nur die paarweise Umwandlung (Neue-Datei-Modus) -unterstützt wird. Siehe dazu die Optionen \f(CW\*(C`\-o\*(C'\fR und \f(CW\*(C`\-n\*(C'\fR. -.SH "OPTIONEN" -.IX Header "OPTIONEN" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -nimmt alle folgenden Optionen als Dateinamen an. Verwenden Sie diese Option, -wenn Sie Dateien umwandeln wollen, deren Namen mit einem Minuszeichen -beginnen. Um beispielsweise eine Datei namens »\-bla« umzuwandeln, können Sie -folgenden Befehl verwenden: -.Sp -.Vb 1 -\& dos2unix \-\- \-bla -.Ve -.Sp -oder im Neue-Datei-Modus: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-bla ausgabe.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -wandelt nur Zeilenumbrüche um. Dies ist der vorgegebene Umwandlungsmodus. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -wandelt aus dem \s-1DOS\-\s0 in den ISO\-8859\-1\-Zeichensatz um. Weitere Informationen -hierzu finden Sie im Abschnitt \s-1UMWANDLUNGSMODI.\s0 -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -verwendet die Windows-Codepage 1252 (Westeuropäisch). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -verwendet die DOS-Codepage 437 (\s-1US\s0). Dies ist die vorgegebene Codepage für -die ISO-Umwandlung. -.IP "\fB\-850\fR" 4 -.IX Item "-850" -verwendet die DOS-Codepage 850 (Westeuropäisch). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -verwendet die DOS-Codepage 860 (Portugiesisch). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -verwendet die DOS-Codepage 863 (Kanadisches Französisch). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -verwendet die DOS-Codepage 865 (Skandinavisch). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -wandelt 8bit\-Zeichen in ein 7bit\-Bitmuster um. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -erhält die Markierung der Bytereihenfolge (\s-1BOM\s0). Wenn die Eingabedatei eine -\&\s-1BOM\s0 enthält, wird ebenfalls eine \s-1BOM\s0 in die Ausgabedatei geschrieben. Dies -ist das Standardverhalten beim Umwandeln von DOS\-Zeilenumbrüchen. Siehe auch -die Option \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode \s-1UMWANDLUNGSMODUS\s0\fR" 4 -.IX Item "-c, --convmode UMWANDLUNGSMODUS" -legt den Umwandlungsmodus fest. \s-1UMWANDLUNGSMODUS\s0 kann \fIascii\fR, \fI7bit\fR, -\&\fIiso\fR oder \fImac\fR sein, wobei \fIascii\fR die Vorgabe ist. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -erzwingt die Umwandlung von Binärdateien. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -wandelt unter Windows UTF\-16\-Dateien standardmäßig in \s-1UTF\-8\s0 um, ungeachtet -der Einstellung der Locale. Verwenden Sie diese Option zum umwandeln von -Utf\-16\-Dateien in \s-1GB18030.\s0 Diese Option ist nur unter Windows -verfügbar. Siehe auch Abschnitt \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -zeigt eine Hilfe an und beendet das Programm. -.IP "\fB\-i[\s-1SCHALTER\s0], \-\-info[=SCHALTER] \s-1DATEI\s0\fR" 4 -.IX Item "-i[SCHALTER], --info[=SCHALTER] DATEI" -zeigt Dateiinformationen an. Es wird keine Umwandlung vorgenommen. -.Sp -Die Ausgabe der Informationen geschieht in der folgenden Reihenfolge: Anzahl -der DOS\-Zeilenumbrüche, Anzahl der Unix\-Zeilenumbrüche, Anzahl der -Mac\-Zeilenumbrüche, Markierung der Bytereihenfolge, Text\- oder Binärformat, -Dateiname. -.Sp -Beispielausgabe: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Optionale zusätzliche Schalter können gesetzt werden, um die Ausgabe -anzupassen. Einer oder mehrere Schalter können hinzugefügt werden. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -gibt die Anzahl der DOS\-Zeilenumbrüche aus. -.IP "\fBu\fR" 4 -.IX Item "u" -gibt die Anzahl der Unix\-Zeilenumbrüche aus. -.IP "\fBm\fR" 4 -.IX Item "m" -gibt die Anzahl der Mac\-Zeilenumbrüche aus. -.IP "\fBb\fR" 4 -.IX Item "b" -gibt die Markierung der Bytereihenfolge aus. -.IP "\fBt\fR" 4 -.IX Item "t" -zeigt an, ob es sich um eine Text\- oder eine Binärdatei handelt. -.IP "\fBc\fR" 4 -.IX Item "c" -gibt nur die Dateien aus, die umgewandelt werden würden. -.Sp -Mit dem Schalter \f(CW\*(C`c\*(C'\fR gibt dos2unix nur die Dateien aus, die -DOS\-Zeilenumbrüche enthalten, unix2dos nur die Dateien mit -Unix\-Zeilenumbrüchen. -.RE -.RS 4 -.Sp -Beispiele: -.Sp -Informationen zu allen *.txt\-Dateien anzeigen: -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Nur die Anzahl der DOS\-Zeilenumbrüche und Unix\-Zeilenumbrüche anzeigen: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Nur die Markierung der Bytereihenfolge anzeigen: -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -Die Dateien auflisten, die DOS\-Zeilenumbrüche enthalten: -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -Die Dateien auflisten, die Unix\-Zeilenumbrüche enthalten: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -übernimmt den Zeitstempel der Eingabedatei in die Ausgabedatei. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -zeigt die Lizenz des Programms an. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -fügt eine zusätzliche neue Zeile hinzu. -.Sp -\&\fBdos2unix\fR: Nur DOS\-Zeilenumbrüche werden in Unix\-Zeilenumbrüche -umgewandelt. Im Mac-Modus werden nur Mac\-Zeilenumbrüche in -Unix\-Zeilenumbrüche umgewandelt. -.Sp -\&\fBunix2dos\fR: Nur Unix\-Zeilenumbrüche werden in DOS\-Zeilenumbrüche -umgewandelt. Im Mac-Modus werden nur Unix\-Zeilenumbrüche in -Mac\-Zeilenumbrüche umgewandelt. -.IP "\fB\-m, \-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -schreibt eine Markierung der Bytereihenfolge (\s-1BOM\s0) in die Ausgabedatei. In -der Voreinstellung wird eine \s-1UTF\-8\-BOM\s0 geschrieben. -.Sp -Wenn die Eingabedatei in \s-1UTF\-16\s0 kodiert ist und die Option \f(CW\*(C`\-u\*(C'\fR verwendet -wird, wird eine \s-1UTF\-16\-BOM\s0 geschrieben. -.Sp -Verwenden Sie diese Option niemals, wenn die Kodierung der Ausgabedatei -weder \s-1UTF\-8\s0 noch \s-1UTF\-16\s0 ist. Weitere Informationen finden Sie im Abschnitt -\&\s-1UNICODE.\s0 -.IP "\fB\-n, \-\-newfile \s-1EINGABEDATEI AUSGABEDATEI\s0 …\fR" 4 -.IX Item "-n, --newfile EINGABEDATEI AUSGABEDATEI …" -Neue-Datei-Modus. Die \s-1EINGABEDATEI\s0 wird umgewandelt und in die \s-1AUSGABEDATEI\s0 -geschrieben. Die Dateinamen müssen paarweise angegeben werden. Platzhalter -sollten \fInicht\fR verwendet werden, sonst werden Sie Ihre Dateien -\&\fIverlieren\fR. -.Sp -Der Benutzer, der die Umwandlung im Neue-Datei-Modus startet, wird Besitzer -der umgewandelten Datei. Die Lese\- und Schreibrechte werden aus den -Zugriffsrechten der Originaldatei minus der \fIumask\fR\|(1) der Person ermittelt, -die die Umwandlung ausgeführt hat. -.IP "\fB\-o, \-\-oldfile \s-1DATEI\s0 …\fR" 4 -.IX Item "-o, --oldfile DATEI …" -Alte-Datei-Modus. Die \s-1DATEI\s0 wird umgewandelt und durch die Ausgabedatei -überschrieben. Per Vorgabe werden Umwandlungen in diesem Modus -ausgeführt. Platzhalter sind verwendbar. -.Sp -Im Alte-Datei-Modus (Ersetzungsmodus) erhalten die umgewandelten Dateien den -gleichen Eigentümer, die gleiche Gruppe und die gleichen Lese\- und -Schreibberechtigungen wie die Originaldatei, auch wenn die Datei von einem -anderen Benutzer umgewandelt wird, der Schreibrechte für die Datei hat (zum -Beispiel der Systemadministrator). Die Umwandlung wird abgebrochen, wenn es -nicht möglich ist, die originalen Werte beizubehalten. Die Änderung des -Eigentümers könnte zum Beispiel bewirken, dass der ursprüngliche Eigentümer -die Datei nicht mehr lesen kann. Die Änderung der Gruppe könnte ein -Sicherheitsrisiko sein, da die Datei vielleicht für Benutzer lesbar wird, -für die sie nicht bestimmt ist. Die Beibehaltung von Eigentümer, Gruppe und -Schreib\- und Leserechten wird nur unter Unix unterstützt. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Stiller Modus, in dem alle Warnungen und sonstige Meldungen unterdrückt -werden. Der Rückgabewert ist 0, außer wenn fehlerhafte Befehlszeilenoptionen -angegeben werden. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -entfernt die Markierung der Bytereihenfolge (\s-1BOM\s0). Es wird keine \s-1BOM\s0 in die -Ausgabedatei geschrieben. Dies ist das Standardverhalten beim Umwandeln von -Unix\-Zeilenumbrüchen. Siehe auch die Option \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s, \-\-safe\fR" 4 -.IX Item "-s, --safe" -überspringt Binärdateien (Vorgabe). -.IP "\fB\-u, \-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -erhält die originale UTF\-16\-Kodierung der Eingabedatei. Die Ausgabedatei -wird in der gleichen UTF\-16\-Kodierung geschrieben (Little\-Endian\- oder -Big-Endian-Bytereihenfolge) wie die Eingabedatei. Dies verhindert die -Umwandlung in \s-1UTF\-8.\s0 Eine \s-1UTF\-16\-BOM\s0 wird dementsprechend geschrieben. Diese -Option kann durch Angabe der Option \f(CW\*(C`\-ascii\*(C'\fR deaktiviert werden. -.IP "\fB\-ul, \-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -nimmt an, dass die Eingabedatei das Format \s-1UTF\-16LE\s0 hat. -.Sp -Wenn die Eingabedatei eine Markierung der Bytereihenfolge enthält (\s-1BOM\s0), -dann hat die \s-1BOM\s0 Vorrang vor dieser Option. -.Sp -Durch eine falsche Annahme (die Eingabedatei war nicht in \s-1UTF\-16LE\s0 kodiert) -mit erfolgreicher Umwandlung erhalten Sie eine UTF\-8\-Ausgabedatei mit -fehlerhaftem Text. Sie können die fehlgeschlagene Umwandlung mit \fIiconv\fR\|(1) -rückgängig machen, indem Sie die Rückumwandlung von \s-1UTF\-8\s0 nach \s-1UTF\-16LE\s0 -vornehmen. Dadurch gewinnen Sie die Originaldatei zurück. -.Sp -Die Annahme von \s-1UTF\-16LE\s0 wirkt wie ein \fIUmwandlungsmodus\fR. Beim Wechsel zum -vorgegebenen \fIascii\fR\-Modus wird die UTF16LE\-Annahme deaktiviert. -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -nimmt an, dass die Eingabedatei das Format \s-1UTF\-16BE\s0 hat. -.Sp -Diese Option ist gleichbedeutend mit \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v, \-\-verbose\fR" 4 -.IX Item "-v, --verbose" -zeigt ausführliche Meldungen an. Zusätzliche Informationen werden zu den -Markierungen der Bytereihenfolge (\s-1BOM\s0) und zur Anzahl der umgewandelten -Zeilenumbrüche angezeigt. -.IP "\fB\-F, \-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -folgt symbolischen Links und wandelt die Zieldateien um. -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -ersetzt symbolische Links durch die umgewandelten Dateien (die originalen -Zieldateien bleiben unverändert). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -erhält symbolische Links als solche und lässt die Ziele unverändert -(Vorgabe). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -zeigt Versionsinformationen an und beendet das Programm. -.SH "MAC-MODUS" -.IX Header "MAC-MODUS" -Im Normalmodus werden Zeilenumbrüche von \s-1DOS\s0 nach Unix und umgekehrt -umgewandelt. Mac\-Zeilenumbrüche werden nicht verändert. -.PP -Im Mac-Modus werden Zeilenumbrüche von Mac nach Unix und umgekehrt -umgewandelt. DOS\-Zeilenumbrüche werden nicht verändert. -.PP -Um das Programm im Mac-Modus auszuführen, verwenden Sie die -Befehlszeilenoption \f(CW\*(C`\-c mac\*(C'\fR oder die Befehle \f(CW\*(C`mac2unix\*(C'\fR oder \f(CW\*(C`unix2mac\*(C'\fR. -.SH "UMWANDLUNGSMODI" -.IX Header "UMWANDLUNGSMODI" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -Im \f(CW\*(C`ascii\*(C'\fR\-Modus werden nur Zeilenumbrüche umgewandelt. Dies ist der -vorgegebene Umwandlungsmodus. -.Sp -Obwohl der Name dieses Modus auf \s-1ASCII\s0 hinweist, welches ein 7\-bit\-Standard -ist, bezieht sich der eigentliche Modus auf 8 Bit. Verwenden Sie diesen -Modus immer dann, wenn Sie Unicode-Dateien in UTF\-8\-Kodierung umwandeln. -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -In diesem Modus werden alle Nicht-ASCII-Zeichen aus 8 Bit in das -7\-Bit\-Bitmuster umgewandelt. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Die Zeichen werden aus dem DOS-Zeichensatz (der Codepage) in den -ISO-Zeichensatz \s-1ISO\-8859\-1 \s0(Latin\-1) in Unix umgewandelt. DOS-Zeichen ohne -Äquivalent in \s-1ISO\-8859\-1,\s0 für die die Umwandlung nicht möglich ist, werden -durch einen Punkt ersetzt. Gleiches gilt für ISO\-8859\-1\-Zeichen ohne -DOS\-Gegenstück. -.Sp -Wenn nur die Option \f(CW\*(C`\-iso\*(C'\fR angegeben ist, versucht dos2unix die aktive -Codepage selbst zu ermitteln. Sollte dies nicht möglich sein, wird die -Standard-Codepage \s-1CP437\s0 verwendet, welche hauptsächlich in den \s-1USA\s0 -eingesetzt wird. Um eine bestimmte Codepage zu erzwingen, verwenden Sie die -Optionen \f(CW\*(C`\-437\*(C'\fR (\s-1US\s0), \f(CW\*(C`\-850\*(C'\fR (Westeuropäisch), \f(CW\*(C`\-860\*(C'\fR (Portugiesisch), -\&\f(CW\*(C`\-863\*(C'\fR (Kanadisches Französisch) oder \f(CW\*(C`\-865\*(C'\fR (Skandinavisch). Die -Windows-Codepage \s-1CP1252 \s0(Westeuropäisch) wird durch die Option \f(CW\*(C`\-1252\*(C'\fR -unterstützt. -.Sp -Wenden Sie niemals die ISO-Umwandlung auf Unicode-Textdateien an. In \s-1UTF\-8\s0 -kodierte Dateien werden dadurch beschädigt. -.Sp -Einige Beispiele: -.Sp -Umwandlung aus der vorgegebenen DOS-Codepage nach Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-iso \-n in.txt ausgabe.txt -.Ve -.Sp -Umwandlung von \s-1DOS CP850\s0 nach Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-850 \-n eingabe.txt ausgabe.txt -.Ve -.Sp -Umwandlung von Windows \s-1CP1252\s0 nach Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n eingabe.txt ausgabe.txt -.Ve -.Sp -Umwandlung von Windows \s-1CP1252\s0 nach Unix \s-1UTF\-8 \s0(Unicode): -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 eingabe.txt | dos2unix > ausgabe.txt -.Ve -.Sp -Umwandlung von Unix Latin\-1 in die vorgegebene DOS-Codepage: -.Sp -.Vb 1 -\& unix2dos \-iso \-n eingabe.txt ausgabe.txt -.Ve -.Sp -Umwandlung von Unix Latin\-1 nach \s-1DOS CP850:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n eingabe.txt ausgabe.txt -.Ve -.Sp -Umwandlung von Unix Latin\-1 nach Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos \-1252 \-n eingabe.txt ausgabe.txt -.Ve -.Sp -Umwandlung von Unix \s-1UTF\-8 \s0(Unicode) nach Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos < eingabe.txt | iconv \-f UTF\-8 \-t CP1252 > ausgabe.txt -.Ve -.Sp -Siehe auch und -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Zeichenkodierungen" -.IX Subsection "Zeichenkodierungen" -Es gibt verschiedene Unicode-Zeichenkodierungen. Unter Unix und Linux sind -Unicode-Dateien typischerweise in \s-1UTF\-8\s0 kodiert. Unter Windows können -Textdateien in \s-1UTF\-8, UTF\-16\s0 oder \s-1UTF\-16\s0 in Big-Endian-Bytereihenfolge -kodiert sein, liegen aber meist im Format \s-1UTF\-16\s0 vor. -.SS "Umwandlung" -.IX Subsection "Umwandlung" -Unicode-Textdateien können \s-1DOS\-,\s0 Unix\- oder Mac\-Zeilenumbrüche enthalten, so -wie reguläre Textdateien. -.PP -Alle Versionen von dos2unix und unix2dos können UTF\-8\-kodierte Dateien -umwandeln, weil \s-1UTF\-8\s0 im Hinblick auf Abwärtskompatiblität mit \s-1ASCII\s0 -entwickelt wurde. -.PP -Dos2unix und unix2dos mit Unterstützung für \s-1UTF\-16\s0 können in \s-1UTF\-16\s0 kodierte -Dateien in Little\-Endian\- und Big-Endian-Bytereihenfolge lesen. Um -festzustellen, ob dos2unix mit UTF\-16\-Unterstützung kompiliert wurde, geben -Sie \f(CW\*(C`dos2unix \-V\*(C'\fR ein. -.PP -Unter Unix/Linux werden \s-1UTF\-16\s0 kodierte Dateien standardmäßig in die -Zeichenkodierung entsprechend der Locale umgewandelt. Mit dem Befehl -\&\fIlocale\fR\|(1) können Sie herausfinden, wie die Zeichenkodierung der Locale -eingestellt ist. Wenn eine Umwandlung nicht möglich ist, verursacht dies -einen Umwandlungsfehler, wodurch die Datei übersprungen wird. -.PP -Unter Windows werden UTF\-16\-Dateien standardmäßig in \s-1UTF\-8\s0 umgewandelt. In -\&\s-1UTF\-8\s0 formatierte Textdateien werden von Windows und Unix/Linux -gleichermaßen unterstützt. -.PP -Die Kodierungen \s-1UTF\-16\s0 und \s-1UTF\-8\s0 sind vollständig kompatibel, daher wird bei -der Umwandlung keinerlei Text verlorengehen. Sollte bei der Umwandlung von -\&\s-1UTF\-16\s0 in \s-1UTF\-8\s0 ein Problem auftreten, beispielsweise wenn die -UTF\-16\-kodierte Eingabedatei einen Fehler enthält, dann wird diese Datei -übersprungen. -.PP -Wenn die Option \f(CW\*(C`\-u\*(C'\fR verwendet wird, wird die Ausgabedatei in der gleichen -UTF\-16\-Kodierung wie die Eingabedatei geschrieben. Die Option \f(CW\*(C`\-u\*(C'\fR -verhindert die Umwandlung in \s-1UTF\-8.\s0 -.PP -Dos2unix und unix2dos bieten keine Option zur Umwandlung von UTF\-8\-Dateien -in \s-1UTF\-16.\s0 -.PP -Umwandlungen im \s-1ISO\-\s0 und 7bit\-Modus funktionieren mit UTF\-16\-Dateien nicht. -.SS "Markierung der Bytereihenfolge" -.IX Subsection "Markierung der Bytereihenfolge" -Unicode-Textdateien unter Windows haben typischerweise eine Markierung der -Bytereihenfolge (\s-1BOM\s0), da viele Windows-Programme (zum Beispiel Notepad) -solche BOMs standardmäßig hinzufügen. Weitere Informationen hierzu finden -Sie auf . -.PP -Unter Unix haben Textdateien üblicherweise keine \s-1BOM.\s0 Es wird stattdessen -angenommen, dass Textdateien in der Zeichenkodierung entsprechend der -Spracheinstellung vorliegen. -.PP -Dos2unix kann nur dann erkennen, ob eine Datei UTF\-16\-kodiert ist, wenn die -Datei eine \s-1BOM\s0 enthält. Ist dies nicht der Fall, nimmt dos2unix an, dass es -sich um eine Binärdatei handelt. -.PP -Verwenden Sie die Optionen \f(CW\*(C`\-ul\*(C'\fR oder \f(CW\*(C`\-ub\*(C'\fR, um eine UTF\-16\-Datei ohne \s-1BOM\s0 -umzuwandeln. -.PP -Dos2unix schreibt in der Voreinstellung keine \s-1BOM\s0 in die Ausgabedatei. Mit -der Option \f(CW\*(C`\-b\*(C'\fR schreibt Dos2unix eine \s-1BOM,\s0 wenn die Eingabedatei ebenfalls -eine \s-1BOM\s0 hat. -.PP -Unix2dos schreibt in der Voreinstellung eine \s-1BOM\s0 in die Ausgabedatei, wenn -die Eingabedatei ebenfalls eine solche Markierung hat. Verwenden Sie die -Option \f(CW\*(C`\-r\*(C'\fR, um die \s-1BOM\s0 zu entfernen. -.PP -Dos2unix und unix2dos schreiben immer eine \s-1BOM,\s0 wenn die Option \f(CW\*(C`\-m\*(C'\fR -angegeben ist. -.SS "Unicode-Beispiele" -.IX Subsection "Unicode-Beispiele" -Umwandlung von Windows \s-1UTF\-16 \s0(mit \s-1BOM\s0) nach Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-n eingabe.txt ausgabe.txt -.Ve -.PP -Umwandlung von Windows \s-1UTF\-16LE \s0(ohne \s-1BOM\s0) nach Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-ul \-n eingabe.txt ausgabe.txt -.Ve -.PP -Umwandlung von Unix \s-1UTF\-8\s0 nach Windows \s-1UTF\-8\s0 mit \s-1BOM:\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n eingabe.txt ausgabe.txt -.Ve -.PP -Umwandlung von Unix \s-1UTF\-8\s0 nach Windows \s-1UTF\-16:\s0 -.PP -.Vb 1 -\& unix2dos < eingabe.txt | iconv \-f UTF\-8 \-t UTF\-16 > ausgabe.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 ist ein Standard der chinesischen Regierung. Eine Teilmenge des in -\&\s-1GB18030\s0 definierten Standards ist offiziell für alle in China verkauften -Softwareprodukte vorgeschrieben. Siehe auch -. -.PP -\&\s-1GB18030\s0 ist vollständig zu Unicode kompatibel und kann als -Unicode-Umwandlungsformat betrahctet werden. Wie auch \s-1UTF\-8\s0 ist \s-1GB18030\s0 -kompatibel zu \s-1ASCII.\s0 Ebenfalls kompatibel ist es zur Codepage 936 von -Windows, auch als \s-1GBK\s0 bekannt. -.PP -Unter Unix/Linux werden UTF\-16\-Dateien in \s-1GB18030\s0 umgewandelt, wenn die -Einstellung der Locale auf \s-1GB18030\s0 gesetzt ist. Beachten Sie, dass dies nur -funktioniert, wenn der Ort auf »China« gesetzt ist. Zum Beispiel wird in -einer Locale-Einstellung \f(CW\*(C`en_GB.GB18030\*(C'\fR (Britisches Englisch) die -Umwandlung von \s-1UTF\-16\s0 in \s-1GB18030\s0 nicht möglich sein, aber in der -chinesischen Einstellung \f(CW\*(C`zh_CN.GB18030\*(C'\fR dagegen funktionieren. -.PP -Unter Windows benötigen Sie die Option \f(CW\*(C`\-gb\*(C'\fR, um UTF\-16\-Dateien in \s-1GB18030\s0 -umwandeln zu können. -.PP -In \s-1GB 18030\s0 kodierte Dateien haben wie Unicode-Dateien eine Markierung der -Bytereihenfolge (\s-1BOM\s0). -.SH "BEISPIELE" -.IX Header "BEISPIELE" -Aus der Standardeingabe lesen und in die Standardausgabe schreiben: -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -a.txt umwandeln und ersetzen, b.txt umwandeln und ersetzen: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -a.txt im ascii-Modus umwandeln und ersetzen: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -a.txt im ascii-Modus umwandeln und ersetzen, b.txt im 7bit\-Modus umwandeln -und ersetzen: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -a.txt aus dem Mac\- in das Unix-Format umwandeln: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -a.txt aus dem Unix\- in das Mac-Format umwandeln: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -a.txt unter Beibehaltung des ursprünglichen Zeitstempels umwandeln: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -a.txt umwandeln und das Ergebnis nach e.txt schreiben: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -a.txt umwandeln und das Ergebnis nach e.txt schreiben, wobei e.txt den -gleichen Zeitstempel erhält wie a.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -a.txt umwandeln und ersetzen, b.txt umwandeln und das Ergebnis nach e.txt -schreiben: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -c.txt umwandeln und das Ergebnis nach e.txt schreiben, a.txt umwandeln und -ersetzen, b.txt umwandeln und ersetzen, d.txt umwandeln und das Ergebnis -nach f.txt schreiben: -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "REKURSIVE UMWANDLUNG" -.IX Header "REKURSIVE UMWANDLUNG" -Verwenden Sie dos2unix zusammen mit den Befehlen \fIfind\fR\|(1) und \fIxargs\fR\|(1), um -Textdateien in einem Verzeichnisbaum rekursiv umzuwandeln. Um beispielsweise -alle *.txt\-Dateien im aktuellen Verzeichnis und dessen Unterverzeichnissen -umzuwandeln, geben Sie Folgendes ein: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "LOKALISIERUNG" -.IX Header "LOKALISIERUNG" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -Die primäre Sprache wird durch die Umgebungsvariable \s-1LANG\s0 festgelegt. Diese -Variable besteht aus mehreren Teilen: Der erste Teil besteht aus zwei -Kleinbuchstaben, die den Sprachcode angeben. Der zweite Teil ist optional -und bezeichnet den Ländercode in Großbuchstaben, vom davor stehenden -Sprachcode durch einen Unterstrich getrennt. Der dritte Teil ist ebenfalls -optional und gibt die Zeichenkodierung an, vom Ländercode durch einen Punkt -getrennt. Einige Beispiele für Standard-POSIX-Shells: -.Sp -.Vb 7 -\& export LANG=de Deutsch -\& export LANG=de_DE Deutsch, Deutschland -\& export LANG=de_AT Deutsch, Österreich -\& export LANG=es_ES Spanisch, Spanien -\& export LANG=es_MX Spanisch, Mexiko -\& export LANG=en_US.iso88591 Englisch, USA, Latin\-1\-Zeichenkodierung -\& export LANG=en_GB.UTF\-8 Englisch, GB, UTF\-8\-Zeichenkodierung -.Ve -.Sp -Eine vollständige Liste der Sprachen und Ländercodes finden Sie im -Gettext-Handbuch: - -.Sp -Auf Unix-Systemen erhalten Sie mit dem Befehl \fIlocale\fR\|(1) spezifische -Informationen zu den Spracheinstellungen. -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -Mit der Umgebungsvariable \s-1LANGUAGE\s0 können Sie eine Prioritätenliste für -Sprachen übergeben, die Sie durch Doppelpunkte voneinander trennen. Dos2unix -gibt \s-1LANGUAGE\s0 vor \s-1LANG\s0 den Vorzug, zum Beispiel bei Deutsch vor -Niederländisch: \f(CW\*(C`LANGUAGE=de:nl\*(C'\fR. Sie müssen zunächst die Lokalisierung -aktivieren, indem Sie die Variable \s-1LANG \s0(oder \s-1LC_ALL\s0) auf einen anderen Wert -als »C« setzen, bevor Sie die Liste der Sprachprioritäten mit der Variable -\&\s-1LANGUAGE\s0 nutzen können. Weitere Informationen finden Sie im -Gettext-Handbuch: - -.Sp -Falls Sie eine Sprache auswählen, die nicht verfügbar ist, erhalten Sie die -Standardmeldungen in englischer Sprache. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Durch die Umgebungsvariable \s-1DOS2UNIX_LOCALEDIR\s0 wird \s-1LOCALEDIR\s0 während der -Kompilierung übergangen. \s-1LOCALEDIR\s0 wird verwendet, um Sprachdateien zu -finden. Der GNU-Standardwert ist \f(CW\*(C`/usr/local/share/locale\*(C'\fR. Die Option -\&\fB\-\-version\fR zeigt das verwendete \s-1LOCALEDIR\s0 an. -.Sp -Beispiel (POSIX-Shell): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "RÜCKGABEWERT" -.IX Header "RÜCKGABEWERT" -Bei Erfolg wird 0 zurückgegeben. Bei aufgetretenen Systemfehlern wird der -letzte Systemfehler zurückgegeben. Für alle anderen Fehler wird 1 -zurückgegeben. -.PP -Der Rückgabewert ist im stillen Modus stets 0, außer wenn fehlerhafte -Befehlszeilenoptionen verwendet werden. -.SH "STANDARDS" -.IX Header "STANDARDS" - -.PP - -.PP - -.PP - -.SH "AUTOREN" -.IX Header "AUTOREN" -Benjamin Lin \- , Bernd Johannes Wuebben -(Mac2unix\-Modus) \- , Christian Wurll (Extra Zeilenumbruch) -\&\- , Erwin Waterlander \- (Betreuer) -.PP -Projektseite: -.PP -SourceForge-Seite: -.SH "SIEHE AUCH" -.IX Header "SIEHE AUCH" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/de/man1/unix2dos.1 b/Tools/dos2unix/share/man/de/man1/unix2dos.1 deleted file mode 100644 index 4ca2eeb..0000000 --- a/Tools/dos2unix/share/man/de/man1/unix2dos.1 +++ /dev/null @@ -1,781 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "BEZEICHNUNG" -.IX Header "BEZEICHNUNG" -dos2unix \- Formatumwandlung für Textdateien von DOS/Mac nach Unix und -umgekehrt -.SH "ÜBERSICHT" -.IX Header "ÜBERSICHT" -.Vb 2 -\& dos2unix [Optionen] [DATEI …] [\-n EINGABEDATEI AUSGABEDATEI …] -\& unix2dos [Optionen] [DATEI …] [\-n EINGABEDATEI AUSGABEDATEI …] -.Ve -.SH "BESCHREIBUNG" -.IX Header "BESCHREIBUNG" -Das Paket Dos2unix enthält die Werkzeuge \f(CW\*(C`dos2unix\*(C'\fR und \f(CW\*(C`unix2dos\*(C'\fR zum -Umwandeln einfacher Textdateien aus dem \s-1DOS\-\s0 oder Mac-Format in das -Unix-Format und umgekehrt. -.PP -In Textdateien unter DOS/Windows sind Zeilenumbrüche, auch als neue Zeile -(\s-1NL\s0) bekannt, eine Kombination aus zwei Zeichen: einem Wagenrücklauf -(Carriage Return, \s-1CR\s0) gefolgt von einem Zeilenvorschub (Line Feed, \s-1LF\s0). In -Unix-Textdateien bestehen Zeilenumbrüche nur aus einem Zeichen, dem -Zeilenvorschub (\s-1LF\s0). In Mac-Textdateien aus der Zeit vor MacOSX bestand ein -Zeilenumbruch aus einem einzelnen CR-Zeichen. Heute verwendet Mac \s-1OS\s0 -Zeilenumbrüche im Unix-Stil (\s-1LF\s0). -.PP -Neben Zeilenumbrüchen kann Dos2unix auch die Zeichenkodierung von Dateien -umwandeln. Einige DOS-Codepages können in Unix Latin\-1 umgewandelt werden, -und Windows-Unicode-Dateien (\s-1UTF\-16\s0) können in Unix-Unicode-Dateien (\s-1UTF\-8\s0) -umgewandelt werden. -.PP -Binärdateien werden automatisch übersprungen, sofern die Umwandlung nicht -erzwungen wird. -.PP -Nicht\-reguläre Dateien, wie Verzeichnisse und \s-1FIFOS \s0(Weiterleitungen) werden -automatisch übersprungen. -.PP -Symbolische Links und deren Ziele werden per Vorgabe unverändert -belassen. Symbolische Links können optional ersetzt werden, oder die Ausgabe -wird in das Ziel des symbolischen Links geschrieben. Unter Windows wird das -Schreiben in das Ziel eines symbolischen Links nicht unterstützt. -.PP -Dos2unix wurde nach dem Vorbild der dos2unix\-Version unter SunOS/Solaris -entwickelt, doch es gitb einen wesentlichen Unterschied zu: Diese Version -ersetzt per Vorgabe Dateien bei der Umwandlung (Alte-Datei-Modus), während -unter SunOS/Solaris nur die paarweise Umwandlung (Neue-Datei-Modus) -unterstützt wird. Siehe dazu die Optionen \f(CW\*(C`\-o\*(C'\fR und \f(CW\*(C`\-n\*(C'\fR. -.SH "OPTIONEN" -.IX Header "OPTIONEN" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -nimmt alle folgenden Optionen als Dateinamen an. Verwenden Sie diese Option, -wenn Sie Dateien umwandeln wollen, deren Namen mit einem Minuszeichen -beginnen. Um beispielsweise eine Datei namens »\-bla« umzuwandeln, können Sie -folgenden Befehl verwenden: -.Sp -.Vb 1 -\& dos2unix \-\- \-bla -.Ve -.Sp -oder im Neue-Datei-Modus: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-bla ausgabe.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -wandelt nur Zeilenumbrüche um. Dies ist der vorgegebene Umwandlungsmodus. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -wandelt aus dem \s-1DOS\-\s0 in den ISO\-8859\-1\-Zeichensatz um. Weitere Informationen -hierzu finden Sie im Abschnitt \s-1UMWANDLUNGSMODI.\s0 -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -verwendet die Windows-Codepage 1252 (Westeuropäisch). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -verwendet die DOS-Codepage 437 (\s-1US\s0). Dies ist die vorgegebene Codepage für -die ISO-Umwandlung. -.IP "\fB\-850\fR" 4 -.IX Item "-850" -verwendet die DOS-Codepage 850 (Westeuropäisch). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -verwendet die DOS-Codepage 860 (Portugiesisch). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -verwendet die DOS-Codepage 863 (Kanadisches Französisch). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -verwendet die DOS-Codepage 865 (Skandinavisch). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -wandelt 8bit\-Zeichen in ein 7bit\-Bitmuster um. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -erhält die Markierung der Bytereihenfolge (\s-1BOM\s0). Wenn die Eingabedatei eine -\&\s-1BOM\s0 enthält, wird ebenfalls eine \s-1BOM\s0 in die Ausgabedatei geschrieben. Dies -ist das Standardverhalten beim Umwandeln von DOS\-Zeilenumbrüchen. Siehe auch -die Option \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode \s-1UMWANDLUNGSMODUS\s0\fR" 4 -.IX Item "-c, --convmode UMWANDLUNGSMODUS" -legt den Umwandlungsmodus fest. \s-1UMWANDLUNGSMODUS\s0 kann \fIascii\fR, \fI7bit\fR, -\&\fIiso\fR oder \fImac\fR sein, wobei \fIascii\fR die Vorgabe ist. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -erzwingt die Umwandlung von Binärdateien. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -wandelt unter Windows UTF\-16\-Dateien standardmäßig in \s-1UTF\-8\s0 um, ungeachtet -der Einstellung der Locale. Verwenden Sie diese Option zum umwandeln von -Utf\-16\-Dateien in \s-1GB18030.\s0 Diese Option ist nur unter Windows -verfügbar. Siehe auch Abschnitt \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -zeigt eine Hilfe an und beendet das Programm. -.IP "\fB\-i[\s-1SCHALTER\s0], \-\-info[=SCHALTER] \s-1DATEI\s0\fR" 4 -.IX Item "-i[SCHALTER], --info[=SCHALTER] DATEI" -zeigt Dateiinformationen an. Es wird keine Umwandlung vorgenommen. -.Sp -Die Ausgabe der Informationen geschieht in der folgenden Reihenfolge: Anzahl -der DOS\-Zeilenumbrüche, Anzahl der Unix\-Zeilenumbrüche, Anzahl der -Mac\-Zeilenumbrüche, Markierung der Bytereihenfolge, Text\- oder Binärformat, -Dateiname. -.Sp -Beispielausgabe: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Optionale zusätzliche Schalter können gesetzt werden, um die Ausgabe -anzupassen. Einer oder mehrere Schalter können hinzugefügt werden. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -gibt die Anzahl der DOS\-Zeilenumbrüche aus. -.IP "\fBu\fR" 4 -.IX Item "u" -gibt die Anzahl der Unix\-Zeilenumbrüche aus. -.IP "\fBm\fR" 4 -.IX Item "m" -gibt die Anzahl der Mac\-Zeilenumbrüche aus. -.IP "\fBb\fR" 4 -.IX Item "b" -gibt die Markierung der Bytereihenfolge aus. -.IP "\fBt\fR" 4 -.IX Item "t" -zeigt an, ob es sich um eine Text\- oder eine Binärdatei handelt. -.IP "\fBc\fR" 4 -.IX Item "c" -gibt nur die Dateien aus, die umgewandelt werden würden. -.Sp -Mit dem Schalter \f(CW\*(C`c\*(C'\fR gibt dos2unix nur die Dateien aus, die -DOS\-Zeilenumbrüche enthalten, unix2dos nur die Dateien mit -Unix\-Zeilenumbrüchen. -.RE -.RS 4 -.Sp -Beispiele: -.Sp -Informationen zu allen *.txt\-Dateien anzeigen: -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Nur die Anzahl der DOS\-Zeilenumbrüche und Unix\-Zeilenumbrüche anzeigen: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Nur die Markierung der Bytereihenfolge anzeigen: -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -Die Dateien auflisten, die DOS\-Zeilenumbrüche enthalten: -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -Die Dateien auflisten, die Unix\-Zeilenumbrüche enthalten: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -übernimmt den Zeitstempel der Eingabedatei in die Ausgabedatei. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -zeigt die Lizenz des Programms an. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -fügt eine zusätzliche neue Zeile hinzu. -.Sp -\&\fBdos2unix\fR: Nur DOS\-Zeilenumbrüche werden in Unix\-Zeilenumbrüche -umgewandelt. Im Mac-Modus werden nur Mac\-Zeilenumbrüche in -Unix\-Zeilenumbrüche umgewandelt. -.Sp -\&\fBunix2dos\fR: Nur Unix\-Zeilenumbrüche werden in DOS\-Zeilenumbrüche -umgewandelt. Im Mac-Modus werden nur Unix\-Zeilenumbrüche in -Mac\-Zeilenumbrüche umgewandelt. -.IP "\fB\-m, \-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -schreibt eine Markierung der Bytereihenfolge (\s-1BOM\s0) in die Ausgabedatei. In -der Voreinstellung wird eine \s-1UTF\-8\-BOM\s0 geschrieben. -.Sp -Wenn die Eingabedatei in \s-1UTF\-16\s0 kodiert ist und die Option \f(CW\*(C`\-u\*(C'\fR verwendet -wird, wird eine \s-1UTF\-16\-BOM\s0 geschrieben. -.Sp -Verwenden Sie diese Option niemals, wenn die Kodierung der Ausgabedatei -weder \s-1UTF\-8\s0 noch \s-1UTF\-16\s0 ist. Weitere Informationen finden Sie im Abschnitt -\&\s-1UNICODE.\s0 -.IP "\fB\-n, \-\-newfile \s-1EINGABEDATEI AUSGABEDATEI\s0 …\fR" 4 -.IX Item "-n, --newfile EINGABEDATEI AUSGABEDATEI …" -Neue-Datei-Modus. Die \s-1EINGABEDATEI\s0 wird umgewandelt und in die \s-1AUSGABEDATEI\s0 -geschrieben. Die Dateinamen müssen paarweise angegeben werden. Platzhalter -sollten \fInicht\fR verwendet werden, sonst werden Sie Ihre Dateien -\&\fIverlieren\fR. -.Sp -Der Benutzer, der die Umwandlung im Neue-Datei-Modus startet, wird Besitzer -der umgewandelten Datei. Die Lese\- und Schreibrechte werden aus den -Zugriffsrechten der Originaldatei minus der \fIumask\fR\|(1) der Person ermittelt, -die die Umwandlung ausgeführt hat. -.IP "\fB\-o, \-\-oldfile \s-1DATEI\s0 …\fR" 4 -.IX Item "-o, --oldfile DATEI …" -Alte-Datei-Modus. Die \s-1DATEI\s0 wird umgewandelt und durch die Ausgabedatei -überschrieben. Per Vorgabe werden Umwandlungen in diesem Modus -ausgeführt. Platzhalter sind verwendbar. -.Sp -Im Alte-Datei-Modus (Ersetzungsmodus) erhalten die umgewandelten Dateien den -gleichen Eigentümer, die gleiche Gruppe und die gleichen Lese\- und -Schreibberechtigungen wie die Originaldatei, auch wenn die Datei von einem -anderen Benutzer umgewandelt wird, der Schreibrechte für die Datei hat (zum -Beispiel der Systemadministrator). Die Umwandlung wird abgebrochen, wenn es -nicht möglich ist, die originalen Werte beizubehalten. Die Änderung des -Eigentümers könnte zum Beispiel bewirken, dass der ursprüngliche Eigentümer -die Datei nicht mehr lesen kann. Die Änderung der Gruppe könnte ein -Sicherheitsrisiko sein, da die Datei vielleicht für Benutzer lesbar wird, -für die sie nicht bestimmt ist. Die Beibehaltung von Eigentümer, Gruppe und -Schreib\- und Leserechten wird nur unter Unix unterstützt. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Stiller Modus, in dem alle Warnungen und sonstige Meldungen unterdrückt -werden. Der Rückgabewert ist 0, außer wenn fehlerhafte Befehlszeilenoptionen -angegeben werden. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -entfernt die Markierung der Bytereihenfolge (\s-1BOM\s0). Es wird keine \s-1BOM\s0 in die -Ausgabedatei geschrieben. Dies ist das Standardverhalten beim Umwandeln von -Unix\-Zeilenumbrüchen. Siehe auch die Option \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s, \-\-safe\fR" 4 -.IX Item "-s, --safe" -überspringt Binärdateien (Vorgabe). -.IP "\fB\-u, \-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -erhält die originale UTF\-16\-Kodierung der Eingabedatei. Die Ausgabedatei -wird in der gleichen UTF\-16\-Kodierung geschrieben (Little\-Endian\- oder -Big-Endian-Bytereihenfolge) wie die Eingabedatei. Dies verhindert die -Umwandlung in \s-1UTF\-8.\s0 Eine \s-1UTF\-16\-BOM\s0 wird dementsprechend geschrieben. Diese -Option kann durch Angabe der Option \f(CW\*(C`\-ascii\*(C'\fR deaktiviert werden. -.IP "\fB\-ul, \-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -nimmt an, dass die Eingabedatei das Format \s-1UTF\-16LE\s0 hat. -.Sp -Wenn die Eingabedatei eine Markierung der Bytereihenfolge enthält (\s-1BOM\s0), -dann hat die \s-1BOM\s0 Vorrang vor dieser Option. -.Sp -Durch eine falsche Annahme (die Eingabedatei war nicht in \s-1UTF\-16LE\s0 kodiert) -mit erfolgreicher Umwandlung erhalten Sie eine UTF\-8\-Ausgabedatei mit -fehlerhaftem Text. Sie können die fehlgeschlagene Umwandlung mit \fIiconv\fR\|(1) -rückgängig machen, indem Sie die Rückumwandlung von \s-1UTF\-8\s0 nach \s-1UTF\-16LE\s0 -vornehmen. Dadurch gewinnen Sie die Originaldatei zurück. -.Sp -Die Annahme von \s-1UTF\-16LE\s0 wirkt wie ein \fIUmwandlungsmodus\fR. Beim Wechsel zum -vorgegebenen \fIascii\fR\-Modus wird die UTF16LE\-Annahme deaktiviert. -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -nimmt an, dass die Eingabedatei das Format \s-1UTF\-16BE\s0 hat. -.Sp -Diese Option ist gleichbedeutend mit \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v, \-\-verbose\fR" 4 -.IX Item "-v, --verbose" -zeigt ausführliche Meldungen an. Zusätzliche Informationen werden zu den -Markierungen der Bytereihenfolge (\s-1BOM\s0) und zur Anzahl der umgewandelten -Zeilenumbrüche angezeigt. -.IP "\fB\-F, \-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -folgt symbolischen Links und wandelt die Zieldateien um. -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -ersetzt symbolische Links durch die umgewandelten Dateien (die originalen -Zieldateien bleiben unverändert). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -erhält symbolische Links als solche und lässt die Ziele unverändert -(Vorgabe). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -zeigt Versionsinformationen an und beendet das Programm. -.SH "MAC-MODUS" -.IX Header "MAC-MODUS" -Im Normalmodus werden Zeilenumbrüche von \s-1DOS\s0 nach Unix und umgekehrt -umgewandelt. Mac\-Zeilenumbrüche werden nicht verändert. -.PP -Im Mac-Modus werden Zeilenumbrüche von Mac nach Unix und umgekehrt -umgewandelt. DOS\-Zeilenumbrüche werden nicht verändert. -.PP -Um das Programm im Mac-Modus auszuführen, verwenden Sie die -Befehlszeilenoption \f(CW\*(C`\-c mac\*(C'\fR oder die Befehle \f(CW\*(C`mac2unix\*(C'\fR oder \f(CW\*(C`unix2mac\*(C'\fR. -.SH "UMWANDLUNGSMODI" -.IX Header "UMWANDLUNGSMODI" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -Im \f(CW\*(C`ascii\*(C'\fR\-Modus werden nur Zeilenumbrüche umgewandelt. Dies ist der -vorgegebene Umwandlungsmodus. -.Sp -Obwohl der Name dieses Modus auf \s-1ASCII\s0 hinweist, welches ein 7\-bit\-Standard -ist, bezieht sich der eigentliche Modus auf 8 Bit. Verwenden Sie diesen -Modus immer dann, wenn Sie Unicode-Dateien in UTF\-8\-Kodierung umwandeln. -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -In diesem Modus werden alle Nicht-ASCII-Zeichen aus 8 Bit in das -7\-Bit\-Bitmuster umgewandelt. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Die Zeichen werden aus dem DOS-Zeichensatz (der Codepage) in den -ISO-Zeichensatz \s-1ISO\-8859\-1 \s0(Latin\-1) in Unix umgewandelt. DOS-Zeichen ohne -Äquivalent in \s-1ISO\-8859\-1,\s0 für die die Umwandlung nicht möglich ist, werden -durch einen Punkt ersetzt. Gleiches gilt für ISO\-8859\-1\-Zeichen ohne -DOS\-Gegenstück. -.Sp -Wenn nur die Option \f(CW\*(C`\-iso\*(C'\fR angegeben ist, versucht dos2unix die aktive -Codepage selbst zu ermitteln. Sollte dies nicht möglich sein, wird die -Standard-Codepage \s-1CP437\s0 verwendet, welche hauptsächlich in den \s-1USA\s0 -eingesetzt wird. Um eine bestimmte Codepage zu erzwingen, verwenden Sie die -Optionen \f(CW\*(C`\-437\*(C'\fR (\s-1US\s0), \f(CW\*(C`\-850\*(C'\fR (Westeuropäisch), \f(CW\*(C`\-860\*(C'\fR (Portugiesisch), -\&\f(CW\*(C`\-863\*(C'\fR (Kanadisches Französisch) oder \f(CW\*(C`\-865\*(C'\fR (Skandinavisch). Die -Windows-Codepage \s-1CP1252 \s0(Westeuropäisch) wird durch die Option \f(CW\*(C`\-1252\*(C'\fR -unterstützt. -.Sp -Wenden Sie niemals die ISO-Umwandlung auf Unicode-Textdateien an. In \s-1UTF\-8\s0 -kodierte Dateien werden dadurch beschädigt. -.Sp -Einige Beispiele: -.Sp -Umwandlung aus der vorgegebenen DOS-Codepage nach Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-iso \-n in.txt ausgabe.txt -.Ve -.Sp -Umwandlung von \s-1DOS CP850\s0 nach Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-850 \-n eingabe.txt ausgabe.txt -.Ve -.Sp -Umwandlung von Windows \s-1CP1252\s0 nach Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n eingabe.txt ausgabe.txt -.Ve -.Sp -Umwandlung von Windows \s-1CP1252\s0 nach Unix \s-1UTF\-8 \s0(Unicode): -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 eingabe.txt | dos2unix > ausgabe.txt -.Ve -.Sp -Umwandlung von Unix Latin\-1 in die vorgegebene DOS-Codepage: -.Sp -.Vb 1 -\& unix2dos \-iso \-n eingabe.txt ausgabe.txt -.Ve -.Sp -Umwandlung von Unix Latin\-1 nach \s-1DOS CP850:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n eingabe.txt ausgabe.txt -.Ve -.Sp -Umwandlung von Unix Latin\-1 nach Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos \-1252 \-n eingabe.txt ausgabe.txt -.Ve -.Sp -Umwandlung von Unix \s-1UTF\-8 \s0(Unicode) nach Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos < eingabe.txt | iconv \-f UTF\-8 \-t CP1252 > ausgabe.txt -.Ve -.Sp -Siehe auch und -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Zeichenkodierungen" -.IX Subsection "Zeichenkodierungen" -Es gibt verschiedene Unicode-Zeichenkodierungen. Unter Unix und Linux sind -Unicode-Dateien typischerweise in \s-1UTF\-8\s0 kodiert. Unter Windows können -Textdateien in \s-1UTF\-8, UTF\-16\s0 oder \s-1UTF\-16\s0 in Big-Endian-Bytereihenfolge -kodiert sein, liegen aber meist im Format \s-1UTF\-16\s0 vor. -.SS "Umwandlung" -.IX Subsection "Umwandlung" -Unicode-Textdateien können \s-1DOS\-,\s0 Unix\- oder Mac\-Zeilenumbrüche enthalten, so -wie reguläre Textdateien. -.PP -Alle Versionen von dos2unix und unix2dos können UTF\-8\-kodierte Dateien -umwandeln, weil \s-1UTF\-8\s0 im Hinblick auf Abwärtskompatiblität mit \s-1ASCII\s0 -entwickelt wurde. -.PP -Dos2unix und unix2dos mit Unterstützung für \s-1UTF\-16\s0 können in \s-1UTF\-16\s0 kodierte -Dateien in Little\-Endian\- und Big-Endian-Bytereihenfolge lesen. Um -festzustellen, ob dos2unix mit UTF\-16\-Unterstützung kompiliert wurde, geben -Sie \f(CW\*(C`dos2unix \-V\*(C'\fR ein. -.PP -Unter Unix/Linux werden \s-1UTF\-16\s0 kodierte Dateien standardmäßig in die -Zeichenkodierung entsprechend der Locale umgewandelt. Mit dem Befehl -\&\fIlocale\fR\|(1) können Sie herausfinden, wie die Zeichenkodierung der Locale -eingestellt ist. Wenn eine Umwandlung nicht möglich ist, verursacht dies -einen Umwandlungsfehler, wodurch die Datei übersprungen wird. -.PP -Unter Windows werden UTF\-16\-Dateien standardmäßig in \s-1UTF\-8\s0 umgewandelt. In -\&\s-1UTF\-8\s0 formatierte Textdateien werden von Windows und Unix/Linux -gleichermaßen unterstützt. -.PP -Die Kodierungen \s-1UTF\-16\s0 und \s-1UTF\-8\s0 sind vollständig kompatibel, daher wird bei -der Umwandlung keinerlei Text verlorengehen. Sollte bei der Umwandlung von -\&\s-1UTF\-16\s0 in \s-1UTF\-8\s0 ein Problem auftreten, beispielsweise wenn die -UTF\-16\-kodierte Eingabedatei einen Fehler enthält, dann wird diese Datei -übersprungen. -.PP -Wenn die Option \f(CW\*(C`\-u\*(C'\fR verwendet wird, wird die Ausgabedatei in der gleichen -UTF\-16\-Kodierung wie die Eingabedatei geschrieben. Die Option \f(CW\*(C`\-u\*(C'\fR -verhindert die Umwandlung in \s-1UTF\-8.\s0 -.PP -Dos2unix und unix2dos bieten keine Option zur Umwandlung von UTF\-8\-Dateien -in \s-1UTF\-16.\s0 -.PP -Umwandlungen im \s-1ISO\-\s0 und 7bit\-Modus funktionieren mit UTF\-16\-Dateien nicht. -.SS "Markierung der Bytereihenfolge" -.IX Subsection "Markierung der Bytereihenfolge" -Unicode-Textdateien unter Windows haben typischerweise eine Markierung der -Bytereihenfolge (\s-1BOM\s0), da viele Windows-Programme (zum Beispiel Notepad) -solche BOMs standardmäßig hinzufügen. Weitere Informationen hierzu finden -Sie auf . -.PP -Unter Unix haben Textdateien üblicherweise keine \s-1BOM.\s0 Es wird stattdessen -angenommen, dass Textdateien in der Zeichenkodierung entsprechend der -Spracheinstellung vorliegen. -.PP -Dos2unix kann nur dann erkennen, ob eine Datei UTF\-16\-kodiert ist, wenn die -Datei eine \s-1BOM\s0 enthält. Ist dies nicht der Fall, nimmt dos2unix an, dass es -sich um eine Binärdatei handelt. -.PP -Verwenden Sie die Optionen \f(CW\*(C`\-ul\*(C'\fR oder \f(CW\*(C`\-ub\*(C'\fR, um eine UTF\-16\-Datei ohne \s-1BOM\s0 -umzuwandeln. -.PP -Dos2unix schreibt in der Voreinstellung keine \s-1BOM\s0 in die Ausgabedatei. Mit -der Option \f(CW\*(C`\-b\*(C'\fR schreibt Dos2unix eine \s-1BOM,\s0 wenn die Eingabedatei ebenfalls -eine \s-1BOM\s0 hat. -.PP -Unix2dos schreibt in der Voreinstellung eine \s-1BOM\s0 in die Ausgabedatei, wenn -die Eingabedatei ebenfalls eine solche Markierung hat. Verwenden Sie die -Option \f(CW\*(C`\-r\*(C'\fR, um die \s-1BOM\s0 zu entfernen. -.PP -Dos2unix und unix2dos schreiben immer eine \s-1BOM,\s0 wenn die Option \f(CW\*(C`\-m\*(C'\fR -angegeben ist. -.SS "Unicode-Beispiele" -.IX Subsection "Unicode-Beispiele" -Umwandlung von Windows \s-1UTF\-16 \s0(mit \s-1BOM\s0) nach Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-n eingabe.txt ausgabe.txt -.Ve -.PP -Umwandlung von Windows \s-1UTF\-16LE \s0(ohne \s-1BOM\s0) nach Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-ul \-n eingabe.txt ausgabe.txt -.Ve -.PP -Umwandlung von Unix \s-1UTF\-8\s0 nach Windows \s-1UTF\-8\s0 mit \s-1BOM:\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n eingabe.txt ausgabe.txt -.Ve -.PP -Umwandlung von Unix \s-1UTF\-8\s0 nach Windows \s-1UTF\-16:\s0 -.PP -.Vb 1 -\& unix2dos < eingabe.txt | iconv \-f UTF\-8 \-t UTF\-16 > ausgabe.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 ist ein Standard der chinesischen Regierung. Eine Teilmenge des in -\&\s-1GB18030\s0 definierten Standards ist offiziell für alle in China verkauften -Softwareprodukte vorgeschrieben. Siehe auch -. -.PP -\&\s-1GB18030\s0 ist vollständig zu Unicode kompatibel und kann als -Unicode-Umwandlungsformat betrahctet werden. Wie auch \s-1UTF\-8\s0 ist \s-1GB18030\s0 -kompatibel zu \s-1ASCII.\s0 Ebenfalls kompatibel ist es zur Codepage 936 von -Windows, auch als \s-1GBK\s0 bekannt. -.PP -Unter Unix/Linux werden UTF\-16\-Dateien in \s-1GB18030\s0 umgewandelt, wenn die -Einstellung der Locale auf \s-1GB18030\s0 gesetzt ist. Beachten Sie, dass dies nur -funktioniert, wenn der Ort auf »China« gesetzt ist. Zum Beispiel wird in -einer Locale-Einstellung \f(CW\*(C`en_GB.GB18030\*(C'\fR (Britisches Englisch) die -Umwandlung von \s-1UTF\-16\s0 in \s-1GB18030\s0 nicht möglich sein, aber in der -chinesischen Einstellung \f(CW\*(C`zh_CN.GB18030\*(C'\fR dagegen funktionieren. -.PP -Unter Windows benötigen Sie die Option \f(CW\*(C`\-gb\*(C'\fR, um UTF\-16\-Dateien in \s-1GB18030\s0 -umwandeln zu können. -.PP -In \s-1GB 18030\s0 kodierte Dateien haben wie Unicode-Dateien eine Markierung der -Bytereihenfolge (\s-1BOM\s0). -.SH "BEISPIELE" -.IX Header "BEISPIELE" -Aus der Standardeingabe lesen und in die Standardausgabe schreiben: -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -a.txt umwandeln und ersetzen, b.txt umwandeln und ersetzen: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -a.txt im ascii-Modus umwandeln und ersetzen: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -a.txt im ascii-Modus umwandeln und ersetzen, b.txt im 7bit\-Modus umwandeln -und ersetzen: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -a.txt aus dem Mac\- in das Unix-Format umwandeln: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -a.txt aus dem Unix\- in das Mac-Format umwandeln: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -a.txt unter Beibehaltung des ursprünglichen Zeitstempels umwandeln: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -a.txt umwandeln und das Ergebnis nach e.txt schreiben: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -a.txt umwandeln und das Ergebnis nach e.txt schreiben, wobei e.txt den -gleichen Zeitstempel erhält wie a.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -a.txt umwandeln und ersetzen, b.txt umwandeln und das Ergebnis nach e.txt -schreiben: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -c.txt umwandeln und das Ergebnis nach e.txt schreiben, a.txt umwandeln und -ersetzen, b.txt umwandeln und ersetzen, d.txt umwandeln und das Ergebnis -nach f.txt schreiben: -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "REKURSIVE UMWANDLUNG" -.IX Header "REKURSIVE UMWANDLUNG" -Verwenden Sie dos2unix zusammen mit den Befehlen \fIfind\fR\|(1) und \fIxargs\fR\|(1), um -Textdateien in einem Verzeichnisbaum rekursiv umzuwandeln. Um beispielsweise -alle *.txt\-Dateien im aktuellen Verzeichnis und dessen Unterverzeichnissen -umzuwandeln, geben Sie Folgendes ein: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "LOKALISIERUNG" -.IX Header "LOKALISIERUNG" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -Die primäre Sprache wird durch die Umgebungsvariable \s-1LANG\s0 festgelegt. Diese -Variable besteht aus mehreren Teilen: Der erste Teil besteht aus zwei -Kleinbuchstaben, die den Sprachcode angeben. Der zweite Teil ist optional -und bezeichnet den Ländercode in Großbuchstaben, vom davor stehenden -Sprachcode durch einen Unterstrich getrennt. Der dritte Teil ist ebenfalls -optional und gibt die Zeichenkodierung an, vom Ländercode durch einen Punkt -getrennt. Einige Beispiele für Standard-POSIX-Shells: -.Sp -.Vb 7 -\& export LANG=de Deutsch -\& export LANG=de_DE Deutsch, Deutschland -\& export LANG=de_AT Deutsch, Österreich -\& export LANG=es_ES Spanisch, Spanien -\& export LANG=es_MX Spanisch, Mexiko -\& export LANG=en_US.iso88591 Englisch, USA, Latin\-1\-Zeichenkodierung -\& export LANG=en_GB.UTF\-8 Englisch, GB, UTF\-8\-Zeichenkodierung -.Ve -.Sp -Eine vollständige Liste der Sprachen und Ländercodes finden Sie im -Gettext-Handbuch: - -.Sp -Auf Unix-Systemen erhalten Sie mit dem Befehl \fIlocale\fR\|(1) spezifische -Informationen zu den Spracheinstellungen. -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -Mit der Umgebungsvariable \s-1LANGUAGE\s0 können Sie eine Prioritätenliste für -Sprachen übergeben, die Sie durch Doppelpunkte voneinander trennen. Dos2unix -gibt \s-1LANGUAGE\s0 vor \s-1LANG\s0 den Vorzug, zum Beispiel bei Deutsch vor -Niederländisch: \f(CW\*(C`LANGUAGE=de:nl\*(C'\fR. Sie müssen zunächst die Lokalisierung -aktivieren, indem Sie die Variable \s-1LANG \s0(oder \s-1LC_ALL\s0) auf einen anderen Wert -als »C« setzen, bevor Sie die Liste der Sprachprioritäten mit der Variable -\&\s-1LANGUAGE\s0 nutzen können. Weitere Informationen finden Sie im -Gettext-Handbuch: - -.Sp -Falls Sie eine Sprache auswählen, die nicht verfügbar ist, erhalten Sie die -Standardmeldungen in englischer Sprache. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Durch die Umgebungsvariable \s-1DOS2UNIX_LOCALEDIR\s0 wird \s-1LOCALEDIR\s0 während der -Kompilierung übergangen. \s-1LOCALEDIR\s0 wird verwendet, um Sprachdateien zu -finden. Der GNU-Standardwert ist \f(CW\*(C`/usr/local/share/locale\*(C'\fR. Die Option -\&\fB\-\-version\fR zeigt das verwendete \s-1LOCALEDIR\s0 an. -.Sp -Beispiel (POSIX-Shell): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "RÜCKGABEWERT" -.IX Header "RÜCKGABEWERT" -Bei Erfolg wird 0 zurückgegeben. Bei aufgetretenen Systemfehlern wird der -letzte Systemfehler zurückgegeben. Für alle anderen Fehler wird 1 -zurückgegeben. -.PP -Der Rückgabewert ist im stillen Modus stets 0, außer wenn fehlerhafte -Befehlszeilenoptionen verwendet werden. -.SH "STANDARDS" -.IX Header "STANDARDS" - -.PP - -.PP - -.PP - -.SH "AUTOREN" -.IX Header "AUTOREN" -Benjamin Lin \- , Bernd Johannes Wuebben -(Mac2unix\-Modus) \- , Christian Wurll (Extra Zeilenumbruch) -\&\- , Erwin Waterlander \- (Betreuer) -.PP -Projektseite: -.PP -SourceForge-Seite: -.SH "SIEHE AUCH" -.IX Header "SIEHE AUCH" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/de/man1/unix2mac.1 b/Tools/dos2unix/share/man/de/man1/unix2mac.1 deleted file mode 100644 index 4ca2eeb..0000000 --- a/Tools/dos2unix/share/man/de/man1/unix2mac.1 +++ /dev/null @@ -1,781 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "BEZEICHNUNG" -.IX Header "BEZEICHNUNG" -dos2unix \- Formatumwandlung für Textdateien von DOS/Mac nach Unix und -umgekehrt -.SH "ÜBERSICHT" -.IX Header "ÜBERSICHT" -.Vb 2 -\& dos2unix [Optionen] [DATEI …] [\-n EINGABEDATEI AUSGABEDATEI …] -\& unix2dos [Optionen] [DATEI …] [\-n EINGABEDATEI AUSGABEDATEI …] -.Ve -.SH "BESCHREIBUNG" -.IX Header "BESCHREIBUNG" -Das Paket Dos2unix enthält die Werkzeuge \f(CW\*(C`dos2unix\*(C'\fR und \f(CW\*(C`unix2dos\*(C'\fR zum -Umwandeln einfacher Textdateien aus dem \s-1DOS\-\s0 oder Mac-Format in das -Unix-Format und umgekehrt. -.PP -In Textdateien unter DOS/Windows sind Zeilenumbrüche, auch als neue Zeile -(\s-1NL\s0) bekannt, eine Kombination aus zwei Zeichen: einem Wagenrücklauf -(Carriage Return, \s-1CR\s0) gefolgt von einem Zeilenvorschub (Line Feed, \s-1LF\s0). In -Unix-Textdateien bestehen Zeilenumbrüche nur aus einem Zeichen, dem -Zeilenvorschub (\s-1LF\s0). In Mac-Textdateien aus der Zeit vor MacOSX bestand ein -Zeilenumbruch aus einem einzelnen CR-Zeichen. Heute verwendet Mac \s-1OS\s0 -Zeilenumbrüche im Unix-Stil (\s-1LF\s0). -.PP -Neben Zeilenumbrüchen kann Dos2unix auch die Zeichenkodierung von Dateien -umwandeln. Einige DOS-Codepages können in Unix Latin\-1 umgewandelt werden, -und Windows-Unicode-Dateien (\s-1UTF\-16\s0) können in Unix-Unicode-Dateien (\s-1UTF\-8\s0) -umgewandelt werden. -.PP -Binärdateien werden automatisch übersprungen, sofern die Umwandlung nicht -erzwungen wird. -.PP -Nicht\-reguläre Dateien, wie Verzeichnisse und \s-1FIFOS \s0(Weiterleitungen) werden -automatisch übersprungen. -.PP -Symbolische Links und deren Ziele werden per Vorgabe unverändert -belassen. Symbolische Links können optional ersetzt werden, oder die Ausgabe -wird in das Ziel des symbolischen Links geschrieben. Unter Windows wird das -Schreiben in das Ziel eines symbolischen Links nicht unterstützt. -.PP -Dos2unix wurde nach dem Vorbild der dos2unix\-Version unter SunOS/Solaris -entwickelt, doch es gitb einen wesentlichen Unterschied zu: Diese Version -ersetzt per Vorgabe Dateien bei der Umwandlung (Alte-Datei-Modus), während -unter SunOS/Solaris nur die paarweise Umwandlung (Neue-Datei-Modus) -unterstützt wird. Siehe dazu die Optionen \f(CW\*(C`\-o\*(C'\fR und \f(CW\*(C`\-n\*(C'\fR. -.SH "OPTIONEN" -.IX Header "OPTIONEN" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -nimmt alle folgenden Optionen als Dateinamen an. Verwenden Sie diese Option, -wenn Sie Dateien umwandeln wollen, deren Namen mit einem Minuszeichen -beginnen. Um beispielsweise eine Datei namens »\-bla« umzuwandeln, können Sie -folgenden Befehl verwenden: -.Sp -.Vb 1 -\& dos2unix \-\- \-bla -.Ve -.Sp -oder im Neue-Datei-Modus: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-bla ausgabe.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -wandelt nur Zeilenumbrüche um. Dies ist der vorgegebene Umwandlungsmodus. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -wandelt aus dem \s-1DOS\-\s0 in den ISO\-8859\-1\-Zeichensatz um. Weitere Informationen -hierzu finden Sie im Abschnitt \s-1UMWANDLUNGSMODI.\s0 -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -verwendet die Windows-Codepage 1252 (Westeuropäisch). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -verwendet die DOS-Codepage 437 (\s-1US\s0). Dies ist die vorgegebene Codepage für -die ISO-Umwandlung. -.IP "\fB\-850\fR" 4 -.IX Item "-850" -verwendet die DOS-Codepage 850 (Westeuropäisch). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -verwendet die DOS-Codepage 860 (Portugiesisch). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -verwendet die DOS-Codepage 863 (Kanadisches Französisch). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -verwendet die DOS-Codepage 865 (Skandinavisch). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -wandelt 8bit\-Zeichen in ein 7bit\-Bitmuster um. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -erhält die Markierung der Bytereihenfolge (\s-1BOM\s0). Wenn die Eingabedatei eine -\&\s-1BOM\s0 enthält, wird ebenfalls eine \s-1BOM\s0 in die Ausgabedatei geschrieben. Dies -ist das Standardverhalten beim Umwandeln von DOS\-Zeilenumbrüchen. Siehe auch -die Option \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode \s-1UMWANDLUNGSMODUS\s0\fR" 4 -.IX Item "-c, --convmode UMWANDLUNGSMODUS" -legt den Umwandlungsmodus fest. \s-1UMWANDLUNGSMODUS\s0 kann \fIascii\fR, \fI7bit\fR, -\&\fIiso\fR oder \fImac\fR sein, wobei \fIascii\fR die Vorgabe ist. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -erzwingt die Umwandlung von Binärdateien. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -wandelt unter Windows UTF\-16\-Dateien standardmäßig in \s-1UTF\-8\s0 um, ungeachtet -der Einstellung der Locale. Verwenden Sie diese Option zum umwandeln von -Utf\-16\-Dateien in \s-1GB18030.\s0 Diese Option ist nur unter Windows -verfügbar. Siehe auch Abschnitt \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -zeigt eine Hilfe an und beendet das Programm. -.IP "\fB\-i[\s-1SCHALTER\s0], \-\-info[=SCHALTER] \s-1DATEI\s0\fR" 4 -.IX Item "-i[SCHALTER], --info[=SCHALTER] DATEI" -zeigt Dateiinformationen an. Es wird keine Umwandlung vorgenommen. -.Sp -Die Ausgabe der Informationen geschieht in der folgenden Reihenfolge: Anzahl -der DOS\-Zeilenumbrüche, Anzahl der Unix\-Zeilenumbrüche, Anzahl der -Mac\-Zeilenumbrüche, Markierung der Bytereihenfolge, Text\- oder Binärformat, -Dateiname. -.Sp -Beispielausgabe: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Optionale zusätzliche Schalter können gesetzt werden, um die Ausgabe -anzupassen. Einer oder mehrere Schalter können hinzugefügt werden. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -gibt die Anzahl der DOS\-Zeilenumbrüche aus. -.IP "\fBu\fR" 4 -.IX Item "u" -gibt die Anzahl der Unix\-Zeilenumbrüche aus. -.IP "\fBm\fR" 4 -.IX Item "m" -gibt die Anzahl der Mac\-Zeilenumbrüche aus. -.IP "\fBb\fR" 4 -.IX Item "b" -gibt die Markierung der Bytereihenfolge aus. -.IP "\fBt\fR" 4 -.IX Item "t" -zeigt an, ob es sich um eine Text\- oder eine Binärdatei handelt. -.IP "\fBc\fR" 4 -.IX Item "c" -gibt nur die Dateien aus, die umgewandelt werden würden. -.Sp -Mit dem Schalter \f(CW\*(C`c\*(C'\fR gibt dos2unix nur die Dateien aus, die -DOS\-Zeilenumbrüche enthalten, unix2dos nur die Dateien mit -Unix\-Zeilenumbrüchen. -.RE -.RS 4 -.Sp -Beispiele: -.Sp -Informationen zu allen *.txt\-Dateien anzeigen: -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Nur die Anzahl der DOS\-Zeilenumbrüche und Unix\-Zeilenumbrüche anzeigen: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Nur die Markierung der Bytereihenfolge anzeigen: -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -Die Dateien auflisten, die DOS\-Zeilenumbrüche enthalten: -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -Die Dateien auflisten, die Unix\-Zeilenumbrüche enthalten: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -übernimmt den Zeitstempel der Eingabedatei in die Ausgabedatei. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -zeigt die Lizenz des Programms an. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -fügt eine zusätzliche neue Zeile hinzu. -.Sp -\&\fBdos2unix\fR: Nur DOS\-Zeilenumbrüche werden in Unix\-Zeilenumbrüche -umgewandelt. Im Mac-Modus werden nur Mac\-Zeilenumbrüche in -Unix\-Zeilenumbrüche umgewandelt. -.Sp -\&\fBunix2dos\fR: Nur Unix\-Zeilenumbrüche werden in DOS\-Zeilenumbrüche -umgewandelt. Im Mac-Modus werden nur Unix\-Zeilenumbrüche in -Mac\-Zeilenumbrüche umgewandelt. -.IP "\fB\-m, \-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -schreibt eine Markierung der Bytereihenfolge (\s-1BOM\s0) in die Ausgabedatei. In -der Voreinstellung wird eine \s-1UTF\-8\-BOM\s0 geschrieben. -.Sp -Wenn die Eingabedatei in \s-1UTF\-16\s0 kodiert ist und die Option \f(CW\*(C`\-u\*(C'\fR verwendet -wird, wird eine \s-1UTF\-16\-BOM\s0 geschrieben. -.Sp -Verwenden Sie diese Option niemals, wenn die Kodierung der Ausgabedatei -weder \s-1UTF\-8\s0 noch \s-1UTF\-16\s0 ist. Weitere Informationen finden Sie im Abschnitt -\&\s-1UNICODE.\s0 -.IP "\fB\-n, \-\-newfile \s-1EINGABEDATEI AUSGABEDATEI\s0 …\fR" 4 -.IX Item "-n, --newfile EINGABEDATEI AUSGABEDATEI …" -Neue-Datei-Modus. Die \s-1EINGABEDATEI\s0 wird umgewandelt und in die \s-1AUSGABEDATEI\s0 -geschrieben. Die Dateinamen müssen paarweise angegeben werden. Platzhalter -sollten \fInicht\fR verwendet werden, sonst werden Sie Ihre Dateien -\&\fIverlieren\fR. -.Sp -Der Benutzer, der die Umwandlung im Neue-Datei-Modus startet, wird Besitzer -der umgewandelten Datei. Die Lese\- und Schreibrechte werden aus den -Zugriffsrechten der Originaldatei minus der \fIumask\fR\|(1) der Person ermittelt, -die die Umwandlung ausgeführt hat. -.IP "\fB\-o, \-\-oldfile \s-1DATEI\s0 …\fR" 4 -.IX Item "-o, --oldfile DATEI …" -Alte-Datei-Modus. Die \s-1DATEI\s0 wird umgewandelt und durch die Ausgabedatei -überschrieben. Per Vorgabe werden Umwandlungen in diesem Modus -ausgeführt. Platzhalter sind verwendbar. -.Sp -Im Alte-Datei-Modus (Ersetzungsmodus) erhalten die umgewandelten Dateien den -gleichen Eigentümer, die gleiche Gruppe und die gleichen Lese\- und -Schreibberechtigungen wie die Originaldatei, auch wenn die Datei von einem -anderen Benutzer umgewandelt wird, der Schreibrechte für die Datei hat (zum -Beispiel der Systemadministrator). Die Umwandlung wird abgebrochen, wenn es -nicht möglich ist, die originalen Werte beizubehalten. Die Änderung des -Eigentümers könnte zum Beispiel bewirken, dass der ursprüngliche Eigentümer -die Datei nicht mehr lesen kann. Die Änderung der Gruppe könnte ein -Sicherheitsrisiko sein, da die Datei vielleicht für Benutzer lesbar wird, -für die sie nicht bestimmt ist. Die Beibehaltung von Eigentümer, Gruppe und -Schreib\- und Leserechten wird nur unter Unix unterstützt. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Stiller Modus, in dem alle Warnungen und sonstige Meldungen unterdrückt -werden. Der Rückgabewert ist 0, außer wenn fehlerhafte Befehlszeilenoptionen -angegeben werden. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -entfernt die Markierung der Bytereihenfolge (\s-1BOM\s0). Es wird keine \s-1BOM\s0 in die -Ausgabedatei geschrieben. Dies ist das Standardverhalten beim Umwandeln von -Unix\-Zeilenumbrüchen. Siehe auch die Option \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s, \-\-safe\fR" 4 -.IX Item "-s, --safe" -überspringt Binärdateien (Vorgabe). -.IP "\fB\-u, \-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -erhält die originale UTF\-16\-Kodierung der Eingabedatei. Die Ausgabedatei -wird in der gleichen UTF\-16\-Kodierung geschrieben (Little\-Endian\- oder -Big-Endian-Bytereihenfolge) wie die Eingabedatei. Dies verhindert die -Umwandlung in \s-1UTF\-8.\s0 Eine \s-1UTF\-16\-BOM\s0 wird dementsprechend geschrieben. Diese -Option kann durch Angabe der Option \f(CW\*(C`\-ascii\*(C'\fR deaktiviert werden. -.IP "\fB\-ul, \-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -nimmt an, dass die Eingabedatei das Format \s-1UTF\-16LE\s0 hat. -.Sp -Wenn die Eingabedatei eine Markierung der Bytereihenfolge enthält (\s-1BOM\s0), -dann hat die \s-1BOM\s0 Vorrang vor dieser Option. -.Sp -Durch eine falsche Annahme (die Eingabedatei war nicht in \s-1UTF\-16LE\s0 kodiert) -mit erfolgreicher Umwandlung erhalten Sie eine UTF\-8\-Ausgabedatei mit -fehlerhaftem Text. Sie können die fehlgeschlagene Umwandlung mit \fIiconv\fR\|(1) -rückgängig machen, indem Sie die Rückumwandlung von \s-1UTF\-8\s0 nach \s-1UTF\-16LE\s0 -vornehmen. Dadurch gewinnen Sie die Originaldatei zurück. -.Sp -Die Annahme von \s-1UTF\-16LE\s0 wirkt wie ein \fIUmwandlungsmodus\fR. Beim Wechsel zum -vorgegebenen \fIascii\fR\-Modus wird die UTF16LE\-Annahme deaktiviert. -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -nimmt an, dass die Eingabedatei das Format \s-1UTF\-16BE\s0 hat. -.Sp -Diese Option ist gleichbedeutend mit \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v, \-\-verbose\fR" 4 -.IX Item "-v, --verbose" -zeigt ausführliche Meldungen an. Zusätzliche Informationen werden zu den -Markierungen der Bytereihenfolge (\s-1BOM\s0) und zur Anzahl der umgewandelten -Zeilenumbrüche angezeigt. -.IP "\fB\-F, \-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -folgt symbolischen Links und wandelt die Zieldateien um. -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -ersetzt symbolische Links durch die umgewandelten Dateien (die originalen -Zieldateien bleiben unverändert). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -erhält symbolische Links als solche und lässt die Ziele unverändert -(Vorgabe). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -zeigt Versionsinformationen an und beendet das Programm. -.SH "MAC-MODUS" -.IX Header "MAC-MODUS" -Im Normalmodus werden Zeilenumbrüche von \s-1DOS\s0 nach Unix und umgekehrt -umgewandelt. Mac\-Zeilenumbrüche werden nicht verändert. -.PP -Im Mac-Modus werden Zeilenumbrüche von Mac nach Unix und umgekehrt -umgewandelt. DOS\-Zeilenumbrüche werden nicht verändert. -.PP -Um das Programm im Mac-Modus auszuführen, verwenden Sie die -Befehlszeilenoption \f(CW\*(C`\-c mac\*(C'\fR oder die Befehle \f(CW\*(C`mac2unix\*(C'\fR oder \f(CW\*(C`unix2mac\*(C'\fR. -.SH "UMWANDLUNGSMODI" -.IX Header "UMWANDLUNGSMODI" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -Im \f(CW\*(C`ascii\*(C'\fR\-Modus werden nur Zeilenumbrüche umgewandelt. Dies ist der -vorgegebene Umwandlungsmodus. -.Sp -Obwohl der Name dieses Modus auf \s-1ASCII\s0 hinweist, welches ein 7\-bit\-Standard -ist, bezieht sich der eigentliche Modus auf 8 Bit. Verwenden Sie diesen -Modus immer dann, wenn Sie Unicode-Dateien in UTF\-8\-Kodierung umwandeln. -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -In diesem Modus werden alle Nicht-ASCII-Zeichen aus 8 Bit in das -7\-Bit\-Bitmuster umgewandelt. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Die Zeichen werden aus dem DOS-Zeichensatz (der Codepage) in den -ISO-Zeichensatz \s-1ISO\-8859\-1 \s0(Latin\-1) in Unix umgewandelt. DOS-Zeichen ohne -Äquivalent in \s-1ISO\-8859\-1,\s0 für die die Umwandlung nicht möglich ist, werden -durch einen Punkt ersetzt. Gleiches gilt für ISO\-8859\-1\-Zeichen ohne -DOS\-Gegenstück. -.Sp -Wenn nur die Option \f(CW\*(C`\-iso\*(C'\fR angegeben ist, versucht dos2unix die aktive -Codepage selbst zu ermitteln. Sollte dies nicht möglich sein, wird die -Standard-Codepage \s-1CP437\s0 verwendet, welche hauptsächlich in den \s-1USA\s0 -eingesetzt wird. Um eine bestimmte Codepage zu erzwingen, verwenden Sie die -Optionen \f(CW\*(C`\-437\*(C'\fR (\s-1US\s0), \f(CW\*(C`\-850\*(C'\fR (Westeuropäisch), \f(CW\*(C`\-860\*(C'\fR (Portugiesisch), -\&\f(CW\*(C`\-863\*(C'\fR (Kanadisches Französisch) oder \f(CW\*(C`\-865\*(C'\fR (Skandinavisch). Die -Windows-Codepage \s-1CP1252 \s0(Westeuropäisch) wird durch die Option \f(CW\*(C`\-1252\*(C'\fR -unterstützt. -.Sp -Wenden Sie niemals die ISO-Umwandlung auf Unicode-Textdateien an. In \s-1UTF\-8\s0 -kodierte Dateien werden dadurch beschädigt. -.Sp -Einige Beispiele: -.Sp -Umwandlung aus der vorgegebenen DOS-Codepage nach Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-iso \-n in.txt ausgabe.txt -.Ve -.Sp -Umwandlung von \s-1DOS CP850\s0 nach Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-850 \-n eingabe.txt ausgabe.txt -.Ve -.Sp -Umwandlung von Windows \s-1CP1252\s0 nach Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n eingabe.txt ausgabe.txt -.Ve -.Sp -Umwandlung von Windows \s-1CP1252\s0 nach Unix \s-1UTF\-8 \s0(Unicode): -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 eingabe.txt | dos2unix > ausgabe.txt -.Ve -.Sp -Umwandlung von Unix Latin\-1 in die vorgegebene DOS-Codepage: -.Sp -.Vb 1 -\& unix2dos \-iso \-n eingabe.txt ausgabe.txt -.Ve -.Sp -Umwandlung von Unix Latin\-1 nach \s-1DOS CP850:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n eingabe.txt ausgabe.txt -.Ve -.Sp -Umwandlung von Unix Latin\-1 nach Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos \-1252 \-n eingabe.txt ausgabe.txt -.Ve -.Sp -Umwandlung von Unix \s-1UTF\-8 \s0(Unicode) nach Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos < eingabe.txt | iconv \-f UTF\-8 \-t CP1252 > ausgabe.txt -.Ve -.Sp -Siehe auch und -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Zeichenkodierungen" -.IX Subsection "Zeichenkodierungen" -Es gibt verschiedene Unicode-Zeichenkodierungen. Unter Unix und Linux sind -Unicode-Dateien typischerweise in \s-1UTF\-8\s0 kodiert. Unter Windows können -Textdateien in \s-1UTF\-8, UTF\-16\s0 oder \s-1UTF\-16\s0 in Big-Endian-Bytereihenfolge -kodiert sein, liegen aber meist im Format \s-1UTF\-16\s0 vor. -.SS "Umwandlung" -.IX Subsection "Umwandlung" -Unicode-Textdateien können \s-1DOS\-,\s0 Unix\- oder Mac\-Zeilenumbrüche enthalten, so -wie reguläre Textdateien. -.PP -Alle Versionen von dos2unix und unix2dos können UTF\-8\-kodierte Dateien -umwandeln, weil \s-1UTF\-8\s0 im Hinblick auf Abwärtskompatiblität mit \s-1ASCII\s0 -entwickelt wurde. -.PP -Dos2unix und unix2dos mit Unterstützung für \s-1UTF\-16\s0 können in \s-1UTF\-16\s0 kodierte -Dateien in Little\-Endian\- und Big-Endian-Bytereihenfolge lesen. Um -festzustellen, ob dos2unix mit UTF\-16\-Unterstützung kompiliert wurde, geben -Sie \f(CW\*(C`dos2unix \-V\*(C'\fR ein. -.PP -Unter Unix/Linux werden \s-1UTF\-16\s0 kodierte Dateien standardmäßig in die -Zeichenkodierung entsprechend der Locale umgewandelt. Mit dem Befehl -\&\fIlocale\fR\|(1) können Sie herausfinden, wie die Zeichenkodierung der Locale -eingestellt ist. Wenn eine Umwandlung nicht möglich ist, verursacht dies -einen Umwandlungsfehler, wodurch die Datei übersprungen wird. -.PP -Unter Windows werden UTF\-16\-Dateien standardmäßig in \s-1UTF\-8\s0 umgewandelt. In -\&\s-1UTF\-8\s0 formatierte Textdateien werden von Windows und Unix/Linux -gleichermaßen unterstützt. -.PP -Die Kodierungen \s-1UTF\-16\s0 und \s-1UTF\-8\s0 sind vollständig kompatibel, daher wird bei -der Umwandlung keinerlei Text verlorengehen. Sollte bei der Umwandlung von -\&\s-1UTF\-16\s0 in \s-1UTF\-8\s0 ein Problem auftreten, beispielsweise wenn die -UTF\-16\-kodierte Eingabedatei einen Fehler enthält, dann wird diese Datei -übersprungen. -.PP -Wenn die Option \f(CW\*(C`\-u\*(C'\fR verwendet wird, wird die Ausgabedatei in der gleichen -UTF\-16\-Kodierung wie die Eingabedatei geschrieben. Die Option \f(CW\*(C`\-u\*(C'\fR -verhindert die Umwandlung in \s-1UTF\-8.\s0 -.PP -Dos2unix und unix2dos bieten keine Option zur Umwandlung von UTF\-8\-Dateien -in \s-1UTF\-16.\s0 -.PP -Umwandlungen im \s-1ISO\-\s0 und 7bit\-Modus funktionieren mit UTF\-16\-Dateien nicht. -.SS "Markierung der Bytereihenfolge" -.IX Subsection "Markierung der Bytereihenfolge" -Unicode-Textdateien unter Windows haben typischerweise eine Markierung der -Bytereihenfolge (\s-1BOM\s0), da viele Windows-Programme (zum Beispiel Notepad) -solche BOMs standardmäßig hinzufügen. Weitere Informationen hierzu finden -Sie auf . -.PP -Unter Unix haben Textdateien üblicherweise keine \s-1BOM.\s0 Es wird stattdessen -angenommen, dass Textdateien in der Zeichenkodierung entsprechend der -Spracheinstellung vorliegen. -.PP -Dos2unix kann nur dann erkennen, ob eine Datei UTF\-16\-kodiert ist, wenn die -Datei eine \s-1BOM\s0 enthält. Ist dies nicht der Fall, nimmt dos2unix an, dass es -sich um eine Binärdatei handelt. -.PP -Verwenden Sie die Optionen \f(CW\*(C`\-ul\*(C'\fR oder \f(CW\*(C`\-ub\*(C'\fR, um eine UTF\-16\-Datei ohne \s-1BOM\s0 -umzuwandeln. -.PP -Dos2unix schreibt in der Voreinstellung keine \s-1BOM\s0 in die Ausgabedatei. Mit -der Option \f(CW\*(C`\-b\*(C'\fR schreibt Dos2unix eine \s-1BOM,\s0 wenn die Eingabedatei ebenfalls -eine \s-1BOM\s0 hat. -.PP -Unix2dos schreibt in der Voreinstellung eine \s-1BOM\s0 in die Ausgabedatei, wenn -die Eingabedatei ebenfalls eine solche Markierung hat. Verwenden Sie die -Option \f(CW\*(C`\-r\*(C'\fR, um die \s-1BOM\s0 zu entfernen. -.PP -Dos2unix und unix2dos schreiben immer eine \s-1BOM,\s0 wenn die Option \f(CW\*(C`\-m\*(C'\fR -angegeben ist. -.SS "Unicode-Beispiele" -.IX Subsection "Unicode-Beispiele" -Umwandlung von Windows \s-1UTF\-16 \s0(mit \s-1BOM\s0) nach Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-n eingabe.txt ausgabe.txt -.Ve -.PP -Umwandlung von Windows \s-1UTF\-16LE \s0(ohne \s-1BOM\s0) nach Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-ul \-n eingabe.txt ausgabe.txt -.Ve -.PP -Umwandlung von Unix \s-1UTF\-8\s0 nach Windows \s-1UTF\-8\s0 mit \s-1BOM:\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n eingabe.txt ausgabe.txt -.Ve -.PP -Umwandlung von Unix \s-1UTF\-8\s0 nach Windows \s-1UTF\-16:\s0 -.PP -.Vb 1 -\& unix2dos < eingabe.txt | iconv \-f UTF\-8 \-t UTF\-16 > ausgabe.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 ist ein Standard der chinesischen Regierung. Eine Teilmenge des in -\&\s-1GB18030\s0 definierten Standards ist offiziell für alle in China verkauften -Softwareprodukte vorgeschrieben. Siehe auch -. -.PP -\&\s-1GB18030\s0 ist vollständig zu Unicode kompatibel und kann als -Unicode-Umwandlungsformat betrahctet werden. Wie auch \s-1UTF\-8\s0 ist \s-1GB18030\s0 -kompatibel zu \s-1ASCII.\s0 Ebenfalls kompatibel ist es zur Codepage 936 von -Windows, auch als \s-1GBK\s0 bekannt. -.PP -Unter Unix/Linux werden UTF\-16\-Dateien in \s-1GB18030\s0 umgewandelt, wenn die -Einstellung der Locale auf \s-1GB18030\s0 gesetzt ist. Beachten Sie, dass dies nur -funktioniert, wenn der Ort auf »China« gesetzt ist. Zum Beispiel wird in -einer Locale-Einstellung \f(CW\*(C`en_GB.GB18030\*(C'\fR (Britisches Englisch) die -Umwandlung von \s-1UTF\-16\s0 in \s-1GB18030\s0 nicht möglich sein, aber in der -chinesischen Einstellung \f(CW\*(C`zh_CN.GB18030\*(C'\fR dagegen funktionieren. -.PP -Unter Windows benötigen Sie die Option \f(CW\*(C`\-gb\*(C'\fR, um UTF\-16\-Dateien in \s-1GB18030\s0 -umwandeln zu können. -.PP -In \s-1GB 18030\s0 kodierte Dateien haben wie Unicode-Dateien eine Markierung der -Bytereihenfolge (\s-1BOM\s0). -.SH "BEISPIELE" -.IX Header "BEISPIELE" -Aus der Standardeingabe lesen und in die Standardausgabe schreiben: -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -a.txt umwandeln und ersetzen, b.txt umwandeln und ersetzen: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -a.txt im ascii-Modus umwandeln und ersetzen: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -a.txt im ascii-Modus umwandeln und ersetzen, b.txt im 7bit\-Modus umwandeln -und ersetzen: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -a.txt aus dem Mac\- in das Unix-Format umwandeln: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -a.txt aus dem Unix\- in das Mac-Format umwandeln: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -a.txt unter Beibehaltung des ursprünglichen Zeitstempels umwandeln: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -a.txt umwandeln und das Ergebnis nach e.txt schreiben: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -a.txt umwandeln und das Ergebnis nach e.txt schreiben, wobei e.txt den -gleichen Zeitstempel erhält wie a.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -a.txt umwandeln und ersetzen, b.txt umwandeln und das Ergebnis nach e.txt -schreiben: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -c.txt umwandeln und das Ergebnis nach e.txt schreiben, a.txt umwandeln und -ersetzen, b.txt umwandeln und ersetzen, d.txt umwandeln und das Ergebnis -nach f.txt schreiben: -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "REKURSIVE UMWANDLUNG" -.IX Header "REKURSIVE UMWANDLUNG" -Verwenden Sie dos2unix zusammen mit den Befehlen \fIfind\fR\|(1) und \fIxargs\fR\|(1), um -Textdateien in einem Verzeichnisbaum rekursiv umzuwandeln. Um beispielsweise -alle *.txt\-Dateien im aktuellen Verzeichnis und dessen Unterverzeichnissen -umzuwandeln, geben Sie Folgendes ein: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "LOKALISIERUNG" -.IX Header "LOKALISIERUNG" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -Die primäre Sprache wird durch die Umgebungsvariable \s-1LANG\s0 festgelegt. Diese -Variable besteht aus mehreren Teilen: Der erste Teil besteht aus zwei -Kleinbuchstaben, die den Sprachcode angeben. Der zweite Teil ist optional -und bezeichnet den Ländercode in Großbuchstaben, vom davor stehenden -Sprachcode durch einen Unterstrich getrennt. Der dritte Teil ist ebenfalls -optional und gibt die Zeichenkodierung an, vom Ländercode durch einen Punkt -getrennt. Einige Beispiele für Standard-POSIX-Shells: -.Sp -.Vb 7 -\& export LANG=de Deutsch -\& export LANG=de_DE Deutsch, Deutschland -\& export LANG=de_AT Deutsch, Österreich -\& export LANG=es_ES Spanisch, Spanien -\& export LANG=es_MX Spanisch, Mexiko -\& export LANG=en_US.iso88591 Englisch, USA, Latin\-1\-Zeichenkodierung -\& export LANG=en_GB.UTF\-8 Englisch, GB, UTF\-8\-Zeichenkodierung -.Ve -.Sp -Eine vollständige Liste der Sprachen und Ländercodes finden Sie im -Gettext-Handbuch: - -.Sp -Auf Unix-Systemen erhalten Sie mit dem Befehl \fIlocale\fR\|(1) spezifische -Informationen zu den Spracheinstellungen. -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -Mit der Umgebungsvariable \s-1LANGUAGE\s0 können Sie eine Prioritätenliste für -Sprachen übergeben, die Sie durch Doppelpunkte voneinander trennen. Dos2unix -gibt \s-1LANGUAGE\s0 vor \s-1LANG\s0 den Vorzug, zum Beispiel bei Deutsch vor -Niederländisch: \f(CW\*(C`LANGUAGE=de:nl\*(C'\fR. Sie müssen zunächst die Lokalisierung -aktivieren, indem Sie die Variable \s-1LANG \s0(oder \s-1LC_ALL\s0) auf einen anderen Wert -als »C« setzen, bevor Sie die Liste der Sprachprioritäten mit der Variable -\&\s-1LANGUAGE\s0 nutzen können. Weitere Informationen finden Sie im -Gettext-Handbuch: - -.Sp -Falls Sie eine Sprache auswählen, die nicht verfügbar ist, erhalten Sie die -Standardmeldungen in englischer Sprache. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Durch die Umgebungsvariable \s-1DOS2UNIX_LOCALEDIR\s0 wird \s-1LOCALEDIR\s0 während der -Kompilierung übergangen. \s-1LOCALEDIR\s0 wird verwendet, um Sprachdateien zu -finden. Der GNU-Standardwert ist \f(CW\*(C`/usr/local/share/locale\*(C'\fR. Die Option -\&\fB\-\-version\fR zeigt das verwendete \s-1LOCALEDIR\s0 an. -.Sp -Beispiel (POSIX-Shell): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "RÜCKGABEWERT" -.IX Header "RÜCKGABEWERT" -Bei Erfolg wird 0 zurückgegeben. Bei aufgetretenen Systemfehlern wird der -letzte Systemfehler zurückgegeben. Für alle anderen Fehler wird 1 -zurückgegeben. -.PP -Der Rückgabewert ist im stillen Modus stets 0, außer wenn fehlerhafte -Befehlszeilenoptionen verwendet werden. -.SH "STANDARDS" -.IX Header "STANDARDS" - -.PP - -.PP - -.PP - -.SH "AUTOREN" -.IX Header "AUTOREN" -Benjamin Lin \- , Bernd Johannes Wuebben -(Mac2unix\-Modus) \- , Christian Wurll (Extra Zeilenumbruch) -\&\- , Erwin Waterlander \- (Betreuer) -.PP -Projektseite: -.PP -SourceForge-Seite: -.SH "SIEHE AUCH" -.IX Header "SIEHE AUCH" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/es/man1/dos2unix.1 b/Tools/dos2unix/share/man/es/man1/dos2unix.1 deleted file mode 100644 index d820f9f..0000000 --- a/Tools/dos2unix/share/man/es/man1/dos2unix.1 +++ /dev/null @@ -1,764 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NOMBRE" -.IX Header "NOMBRE" -dos2unix \- Convertidor de archivos de texto de formato DOS/Mac a Unix y -viceversa -.SH "SINOPSIS" -.IX Header "SINOPSIS" -.Vb 2 -\& dos2unix [parámetros] [ARCHIVO ...] [\-n ARCHIVO_DE_ENTRADA ARCHIVO_DE_SALIDA ...] -\& unix2dos [parámetros] [ARCHIVO ...] [\-n ARCHIVO_DE_ENTRADA ARCHIVO_DE_SALIDA ...] -.Ve -.SH "DESCRIPCIÓN" -.IX Header "DESCRIPCIÓN" -El paquete Dos2unix incluye las herramientas \f(CW\*(C`dos2unix\*(C'\fR y \f(CW\*(C`unix2dos\*(C'\fR para -convertir archivos de texto plano en formato \s-1DOS\s0 o Mac a formato Unix y -viceversa. -.PP -En archivos de texto DOS/Windows, un salto de línea, también conocido como -nueva línea, es una combinación de dos caracteres: un retorno de carro (\s-1CR\s0) -seguido por un salto de línea (\s-1LF\s0). En archivos de texto Unix, un salto de -línea es solamente un carácter: el salto de línea (\s-1LF\s0). En archivos de texto -Mac, antes de Mac \s-1OS X,\s0 un salto de línea era sólo un carácter retorno de -carro (\s-1CR\s0). Actualmente, Mac \s-1OS\s0 usa el estilo Unix de saltos de línea (\s-1LF\s0). -.PP -Además de saltos de línea, Dos2unix puede también convertir la codificación -de archivos. Unas cuantas páginas de códigos \s-1DOS\s0 pueden ser convertidas a -Unix Latin\-1. Y archivos Unicode de Windows (\s-1UTF\-16\s0) pueden ser convertidos -a archivos Unicode de Unix (\s-1UTF\-8\s0). -.PP -Los archivos binarios son ignorados automáticamente, a menos que se fuerce -su conversión. -.PP -Los archivos no regulares, tales como directorios y \s-1FIFO,\s0 son ignorados -automáticamente. -.PP -Los enlaces simbólicos y sus destinos no son modificados por defecto. Los -enlaces simbólicos pueden opcionalmente ser reemplazados, o la salida puede -ser escrita al destino simbólico del enlace. En Windows no está soportada la -escritura a enlaces simbólicos. -.PP -Dos2unix fue modelado después de dos2unix bajo SunOS/Solaris. Hay una -importante diferencia respecto a la versión original SunOS/Solaris. Esta -versión hace, por defecto, la conversión en el mismo archivo (modo de -archivo antiguo), mientras que la versión original de SunOS/Solaris sólo es -compatible con la conversión en archivo emparejado (modo de archivo -nuevo). Véanse las opciones \f(CW\*(C`\-o\*(C'\fR y \f(CW\*(C`\-n\*(C'\fR. -.SH "PARÁMETROS" -.IX Header "PARÁMETROS" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Todos los parámetros siguientes son tratados como nombres de archivo. Use -este parámetro si desea convertir archivos cuyos nombres inician con un -guión. Por ejemplo para convertir un archivoo llamado \*(L"\-foo\*(R", use este -comando: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -O en modo de archivo nuevo: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo out.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Sólo convierte los salto de línea. Éste es el modo de conversión por -defecto. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Conversión entre el conjunto de caracteres \s-1DOS\s0 e \s-1ISO\-8859\-1.\s0 Véase también -la sección \s-1MODOS DE\s0 CONVERSIÓN. -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Usa la página de códigos Windows 1252 (Europa Occidental). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -Usa la página de códigos \s-1DOS 437 \s0(\s-1EE. UU.\s0). Está es la página de códigos -usada por defecto para conversión \s-1ISO.\s0 -.IP "\fB\-850\fR" 4 -.IX Item "-850" -Usa la página de códigos \s-1DOS 850 \s0(Europa Occidental). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -Usa la página de códigos \s-1DOS 860 \s0(Portugués). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -Usa la página de códigos \s-1DOS 863 \s0(Francocanadiense). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -Usa la página de códigos \s-1DOS 865 \s0(Nórdico). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Convierte caracteres de 8 bits al espacio de 7 bits. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Mantiene la Marca de Orden de Byte (\s-1BOM\s0). Cuando el archivo de entrada -tiene \s-1BOM,\s0 escribe \s-1BOM\s0 en el archivo de salida. Este es el comportamiento -por defecto en la conversión a saltos de línea \s-1DOS.\s0 Vea también la opción -\&\f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode \s-1CONVMODE\s0\fR" 4 -.IX Item "-c, --convmode CONVMODE" -Establece el modo de conversión, Donde \s-1CONVMODE\s0 puede ser: \fIascii\fR, -\&\fI7bit\fR, \fIiso\fR, \fImac\fR siendo ascii el valor por defecto. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -Fuerza la conversión de archivos binarios. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -En Windows los archivos \s-1UTF\-16\s0 se convierten por defecto a \s-1UTF\-8,\s0 sin tener -en cuenta la configuración local. Use esta opción para convertir archivos -\&\s-1UTF\-16\s0 a \s-1GB18030.\s0 Esta opción sólo está disponible en Windows.l Véase -también la sección \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -Despiega la ayuda y termina el programa. -.IP "\fB\-i[\s-1MARCAS\s0], \-\-info[= \s-1MARCAS\s0] \s-1ARCHIVO ...\s0\fR" 4 -.IX Item "-i[MARCAS], --info[= MARCAS] ARCHIVO ..." -Muestra la información del archivo. No se realiza ninguna conversión. -.Sp -Se muestra la siguiente información, en este orden: número de saltos de -línea \s-1DOS,\s0 número de saltos de línea Unix, número de saltos de línea Mac, -Marca de Orden de Byte, de texto o binario, nombre del archivo. -.Sp -Ejemplo de salida: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Se pueden utilizar marcas extras opcionales para modificar la salida. Se -pueden añadir una o más marcas. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Muestra el número de saltos de línea \s-1DOS.\s0 -.IP "\fBu\fR" 4 -.IX Item "u" -Muestra el número de saltos de línea Unix. -.IP "\fBm\fR" 4 -.IX Item "m" -Muestra el número de saltos de línea Mac. -.IP "\fBb\fR" 4 -.IX Item "b" -Muestra la Marca de Orden de Byte. -.IP "\fBt\fR" 4 -.IX Item "t" -Muestra si el archivo es de texto o binario. -.IP "\fBc\fR" 4 -.IX Item "c" -Muestra sólo los archivos que pueden ser convertidos. -.Sp -Con la marca \f(CW\*(C`c\*(C'\fR dos2unix sólo mostrará los archivos que contengan saltos -de línea \s-1DOS,\s0 unix2dos sólo mostrará los nombres de archivo que tengan -saltos de línea Unix. -.RE -.RS 4 -.Sp -Ejemplos: -.Sp -Muestra información para todos los archivos *.txt: -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Muestra sólo el número de saltos de línea de \s-1DOS\s0 y de Unix: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Muestra sólo la Marca de Orden de Byte. -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -Muestra los archivos que tienen saltos de línea \s-1DOS:\s0 -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -Muestra los archivos que tienen saltos de línea Unix: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -Mantiene la fecha del archivo de salida igual a la del archivo de entrada. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -Muestra la licencia del programa. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -Añade salto de línea adicional. -.Sp -\&\fBdos2unix\fR: Sólo los saltos de línea \s-1DOS\s0 son cambiados por dos saltos de -línea Unix. En modo Mac sólo los saltos de línea Mac son cambiados por dos -saltos de línea Unix. -.Sp -\&\fBunix2dos\fR: Sólo los saltos de línea Unix son cambiados por dos saltos de -línea \s-1DOS.\s0 En modo Mac los saltos de línea Unix son cambiados por dos saltos -de línea Mac. -.IP "\fB\-m, \-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -Escribe una Marca de Orden de Bytes (\s-1BOM\s0) en el archivo de salida. Por -defecto se escribe una \s-1BOM UTF\-8.\s0 -.Sp -Cuando el archivo de entrada es \s-1UTF\-16\s0 y se usa la opción \f(CW\*(C`\-u\*(C'\fR, se -escribirá un \s-1BOM UTF\-16.\s0 -.Sp -No utilice esta opción cuando la codificación de salida sea distinta de -\&\s-1UTF\-8\s0 o \s-1UTF\-16.\s0 Véase también la sección \s-1UNICODE.\s0 -.IP "\fB\-n, \-\-newfile \s-1ARCHIVO_DE_ENTRADA ARCHIVO_DE_SALIDA ...\s0\fR" 4 -.IX Item "-n, --newfile ARCHIVO_DE_ENTRADA ARCHIVO_DE_SALIDA ..." -Modo de archivo nuevo. Convierte el archivo \s-1ARCHIVO_DE_ENTRADA\s0 y escribe la -salida al archivo \s-1ARCHIVO_DE_SALIDA.\s0 Los nombres de archivo deben ser dados -en pares y los comodines \fIno\fR deben ser usados o \fIperderá\fR sus archivos. -.Sp -La persona que inicia la conversión en el modo de archivo nuevo (emparejado) -será el propietario del archivo convertido. Los permisos de -lectura/escritura del archivo nuevo serán los permisos del archivo original -menos la \fIumask\fR\|(1) de la persona que ejecute la conversión. -.IP "\fB\-o, \-\-oldfile \s-1ARCHIVO ...\s0\fR" 4 -.IX Item "-o, --oldfile ARCHIVO ..." -Modo de archivo antiguo. Convierte el archivo \s-1ARCHIVO\s0 y lo sobrescribe con -la salida. El programa por defecto se ejecuta en este modo. Se pueden -emplear comodines. -.Sp -En modo de archivo antiguo (in situ), el archivo convertido tiene el mismo -propietario, grupo y permisos de lectura/escritura que el archivo original. -Lo mismo aplica cuando el archivo es convertido por otro usuario que tiene -permiso de lectura en el archivo (p.e. usuario root). La conversión será -abortada cuando no sea posible preservar los valores originales. Cambiar el -propietario implicaría que el propietario original ya no podrá leer el -archivo. Cambiar el grupo podría ser un riesgo de seguridad, ya que el -archivo podría ser accesible a personas inadecuadas. La preservación del -propietario, grupo, y permisos de lectura/escritura sólo está soportada bajo -Unix. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Modo silencioso. Suprime todas las advertencias y mensajes. El valor -retornado es cero. Excepto cuando se emplean parámetros incorrectos. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -Elimina la Marca de Orden de Byte (\s-1BOM\s0). No escribe el \s-1BOM\s0 en el archivo de -salida. Este es el comportamiento por defecto al convertir a saltos de línea -Unix. Vea también la opción \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s, \-\-safe\fR" 4 -.IX Item "-s, --safe" -Ignora los archivos binarios (por defecto). -.IP "\fB\-u, \-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -Mantiene la codificación original \s-1UTF\-16\s0 en el archivo de entrada. El -archivo de salida se escribirá con la misma codificación \s-1UTF\-16,\s0 little o -big endian, como el archivo de entrada. Esto impide la transformación a -\&\s-1UTF\-8.\s0 En consecuencia se escribirá un \s-1BOM UTF\-16.\s0 Esta opción se puede -desactivar con la opción \f(CW\*(C`\-ascii\*(C'\fR. -.IP "\fB\-ul, \-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -Se asume que el formato de archivo de entrada es \s-1UTF\-16LE.\s0 -.Sp -Cuando existe una Marca de Orden de Bytes (\s-1BOM\s0) en el archivo de entrada, la -\&\s-1BOM\s0 tiene prioridad sobre esta opción. -.Sp -Cuando se hace una suposición incorrecta (el archivo de entrada no estaba en -formato \s-1UTF\-16LE\s0) y la conversión tiene éxito, obtendrá un archivo \s-1UTF\-8\s0 de -salida con el texto erróneo. La conversión errónea puede deshacerse con -\&\fIiconv\fR\|(1) convirtiendo el archivo \s-1UTF\-8\s0 de salida de vuelta a \s-1UTF\-16LE.\s0 Esto -restaurará el archivo original. -.Sp -El supuesto de \s-1UTF\-16LE\s0 funciona como un \fImodo de conversión\fR. Al cambiar -al modo por defecto \fIascii\fR el supuesto \s-1UTF\-16LE\s0 es deshabilitado. -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -Se asume que el formato del archivo de entrada es \s-1UTF\-16BE.\s0 -.Sp -Esta opción funciona igual que la opción \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v, \-\-verbose\fR" 4 -.IX Item "-v, --verbose" -Mostrar mensajes detallados. Se muestra información extra acerca de Marcas -de Orden de Bytes (\s-1BOM\s0) y el número de saltos de línea convertidos. -.IP "\fB\-F, \-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -Sigue los enlaces simbólicos y convierte los destinos. -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Reemplaza los enlaces simbólicos con los archivos convertidos (los archivos -destino originales no se alteran). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -No altera los enlaces simbólicos ni sus destinos (por defecto). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -Despiega la información de la versión y termina el programa. -.SH "MODO MAC" -.IX Header "MODO MAC" -En modo normal los saltos de línea son convertidos de \s-1DOS\s0 a Unix y -viceversa. Los saltos de línea Mac no son convertidos. -.PP -En modo Mac los saltos de línea son convertidos de Mac a Unix y -viceversa. Los saltos de línea \s-1DOS\s0 no son modificados. -.PP -Para ejecutar en modo Mac use el modificador \f(CW\*(C`\-c mac\*(C'\fR o use los comandos -\&\f(CW\*(C`mac2unix\*(C'\fR o \f(CW\*(C`unix2mac\*(C'\fR. -.SH "MODOS DE CONVERSIÓN" -.IX Header "MODOS DE CONVERSIÓN" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -En modo \f(CW\*(C`ascii\*(C'\fR sólo los saltos de línea son convertidos. Éste es el modo -de conversión por defecto. -.Sp -Aunque el nombre de este modo es \s-1ASCII,\s0 que es un estándar de 7 bits, éste -emplea 8 bits. Siempre use este modo cuando convierta archivos Unicode -\&\s-1UTF\-8.\s0 -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -En este modo todos los caracteres no \s-1ASCII\s0 de 8 bits (con valores de 128 a -255) son convertidos al espacio de 7 bits. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Los caracteres son convertidos entre un conjunto de caracteres \s-1DOS \s0(página -de códigos) y el conjunto de caracteres \s-1ISO\-8859\-1 \s0(Latín\-1) de Unix. Los -caracteres \s-1DOS\s0 sin equivalente \s-1ISO\-8859\-1,\s0 para los cuales la conversión es -imposible, son convertidos en un punto. Lo mismo se aplica para caracteres -\&\s-1ISO\-8859\-1\s0 sin contraparte \s-1DOS.\s0 -.Sp -Cuando sólo se emplea el parámetro \f(CW\*(C`\-iso\*(C'\fR, dos2unix intentará determinar la -página de códigos activa. Cuando esto no sea posible, dos2unix utilizará la -página de códigos 437 por defecto, la cual es empleada principalmente en -\&\s-1EE. UU.\s0 Para forzar una página de códigos específica emplee los parámetros -\&\f(CW\*(C`\-437\*(C'\fR (\s-1EE. UU.\s0), \f(CW\*(C`\-850\*(C'\fR (Europa Occidental), \f(CW\*(C`\-860\*(C'\fR (Portugués), \f(CW\*(C`\-863\*(C'\fR -(Francocanadiense), o \f(CW\*(C`\-865\*(C'\fR (Nórdico). La página de códigos Windows 1252 -(Europa Occidental) también está soportada con el parámetro \f(CW\*(C`\-1252\*(C'\fR. Para -acceder a otras páginas de códigos use dos2unix en combinación con -\&\fIiconv\fR\|(1). Iconv puede convertir entre una larga lista de codificaciones de -caracteres. -.Sp -No use la conversión \s-1ISO\s0 en archivos de texto Unicode. Esto corrompería los -archivos codificados como \s-1UTF\-8.\s0 -.Sp -Algunos ejemplos: -.Sp -Convierte de la página de códigos por defecto de \s-1DOS\s0 a Latín\-1 de Unix: -.Sp -.Vb 1 -\& dos2unix \-iso \-n in.txt out.txt -.Ve -.Sp -Convierte de \s-1DOS CP850\s0 a Unix Latín\-1: -.Sp -.Vb 1 -\& dos2unix \-850 \-n in.txt out.txt -.Ve -.Sp -Convierte de Windows \s-1CP1252\s0 a Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n in.txt out.txt -.Ve -.Sp -Convierte de Windows \s-1CP1252\s0 a Unix \s-1UTF\-8 \s0(Unicode). -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 in.txt | dos2unix > out.txt -.Ve -.Sp -Convierte de Unix Latin\-1 a la página de códigos por defecto de \s-1DOS:\s0 -.Sp -.Vb 1 -\& unix2dos \-iso \-n in.txt out.txt -.Ve -.Sp -Convierte de Unix Latin\-1 a \s-1DOS CP850:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n in.txt out.txt -.Ve -.Sp -Convierte de Unix Latin\-1 a Windows \s-1CP1252.\s0 -.Sp -.Vb 1 -\& unix2dos \-1252 \-n in.txt out.txt -.Ve -.Sp -Convierte de Unix \s-1UTF\-8 \s0(Unicode) a Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t CP1252 > out.txt -.Ve -.Sp -Véase también y -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Codificaciones" -.IX Subsection "Codificaciones" -Existen diferentes codificaciones Unicode. En Unix y Linux los archivos -Unicode son codificados comúnmente en \s-1UTF\-8.\s0 En Windows los archivos de -texto Unicode pueden estar codificados en \s-1UTF\-8, UTF\-16,\s0 o \s-1UTF\-16\s0 big -endian, pero en general son codificados en formato \s-1UTF\-16.\s0 -.SS "Conversion" -.IX Subsection "Conversion" -Los archivos de texto Unicode pueden tener saltos de línea \s-1DOS,\s0 Unix o Mac, -como cualquier archivo de texto. -.PP -Todas las versiones de dos2unix y unix2dos pueden convertir archivos -codificados como \s-1UTF\-8,\s0 debido a que \s-1UTF\-8\s0 fue diseñado para -retro-compatibilidad con \s-1ASCII.\s0 -.PP -Dos2unix y unix2dos con soporte Unicode \s-1UTF\-16,\s0 pueden leer archivos de -texto codificados como \s-1UTF\-16\s0 little y big endian. Para ver si dos2unix fue -compilado con soporte \s-1UTF\-16\s0 escriba \f(CW\*(C`dos2unix \-V\*(C'\fR. -.PP -En Unix/Linux los archivos codificados con \s-1UTF\-16\s0 se convierten a la -codificación de caracteres local. Use el comando \fIlocale\fR\|(1) para averiguar la -codificación de caracteres local. Cuando no se puede hacer la conversión se -obtendrá un error de conversión y se omitirá el archivo. -.PP -En Windows los archivos \s-1UTF\-16\s0 se convierten por defecto a \s-1UTF\-8.\s0 Los -archivos de texto forrajeados con \s-1UTF\-8\s0 están soportados tanto en Windows -como en Unix/Linux. -.PP -Las codificaciones \s-1UTF\-16\s0 y \s-1UTF\-8\s0 son totalmente compatibles, no se perderá -ningún texto en la conversión. Cuando ocurre un error de conversión de -\&\s-1UTF\-16\s0 a \s-1UTF\-8,\s0 por ejemplo cuando el archivo de entrada \s-1UTF\-16\s0 contiene un -error, se omitirá el archivo. -.PP -Cuando se usa la opción \f(CW\*(C`\-u\*(C'\fR, el archivo de salida se escribirá en la misma -codificación \s-1UTF\-16\s0 que el archivo de entrada. La opción \f(CW\*(C`\-u\*(C'\fR previene la -conversión a \s-1UTF\-8.\s0 -.PP -Dos2unix y unix2dos no tienen la opción de convertir archivos \s-1UTF\-8\s0 a -\&\s-1UTF\-16.\s0 -.PP -La conversión en modos \s-1ISO\s0 y 7\-bit no funciona en archivos \s-1UTF\-16.\s0 -.SS "Marca de orden de bytes" -.IX Subsection "Marca de orden de bytes" -En Windows los archivos de texto Unicode típicamente tienen una Marca de -Orden de Bytes (\s-1BOM\s0), debido a que muchos programas de Windows (incluyendo -el Bloc de Notas) añaden una \s-1BOM\s0 por defecto. Véase también -. -.PP -En Unix los archivos Unicode no suelen tener \s-1BOM.\s0 Se supone que los archivos -de texto son codificados en la codificación local de caracteres. -.PP -Dos2unix sólo puede detectar si un archivo está en formato \s-1UTF\-16\s0 si el -archivo tiene una \s-1BOM.\s0 Cuando un archivo \s-1UTF\-16\s0 no tiene una \s-1BOM,\s0 dos2unix -tratará el archivo como un archivo binario. -.PP -Use la opción \f(CW\*(C`\-ul\*(C'\fR o \f(CW\*(C`\-ub\*(C'\fR para convertir un archivo \s-1UTF\-16\s0 sin \s-1BOM.\s0 -.PP -Dos2Unix, por defecto, no escribe \s-1BOM\s0 en el archivo de salida. Con la opción -\&\f(CW\*(C`\-b\*(C'\fR Dos2unix escribe el \s-1BOM\s0 cuando el archivo de entrada tiene \s-1BOM.\s0 -.PP -Unix2dos escribe \s-1BOM\s0 en el archivo de salida cuando el archivo de entrada -tiene \s-1BOM.\s0 Use la opción \f(CW\*(C`\-r\*(C'\fR para eliminar la \s-1BOM.\s0 -.PP -Dos2unix y unix2dos escriben siempre \s-1BOM\s0 cuando se usa la opción \f(CW\*(C`\-m\*(C'\fR. -.SS "Ejemplos Unicode" -.IX Subsection "Ejemplos Unicode" -Convertir de Windows \s-1UTF\-16 \s0(con una \s-1BOM\s0) a Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-n in.txt out.txt -.Ve -.PP -Convertir de Windows \s-1UTF\-16LE \s0(sin una \s-1BOM\s0) a Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-ul \-n in.txt out.txt -.Ve -.PP -Convertir de Unix \s-1UTF\-8\s0 a Windows \s-1UTF\-8\s0 sin una \s-1BOM:\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n in.txt out.txt -.Ve -.PP -Convertir de Unix \s-1UTF\-8\s0 a Windows \s-1UTF\-16:\s0 -.PP -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t UTF\-16 > out.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 es un estándar del gobierno chino. Todo producto software vendido en -China está obligado por ley a contener un subconjunto del \s-1GB18030\s0 -estándar. Véase . -.PP -\&\s-1GB18030\s0 es totalmente compatible con Unicode y puede considerarse como -formato de transformación Unicode. Como ocurre con \s-1UTF\-8, GB18030\s0 es -compatible con \s-1ASCII. GB18030\s0 también es compatible con la página de códigos -de Windows 936, también conocida como \s-1GBK.\s0 -.PP -En Unix/Linux los archivos \s-1UTF\-16\s0 se convierten a \s-1GB18030\s0 cuando la -codificación local se establece en \s-1GB18030.\s0 Tenga en cuenta que esto sólo -funcionará si se establece la ubicación en China. Por ejemplo en una -configuración local English British la conversión \f(CW\*(C`en_GB.GB18030\*(C'\fR de \s-1UTF\-16\s0 -a \s-1GB18030\s0 no funcionará, pero en una configuración local China -\&\f(CW\*(C`zh_CN.GB18030\*(C'\fR sí lo hará. -.PP -Use la opción \f(CW\*(C`\-ul\*(C'\fR o \f(CW\*(C`\-ub\*(C'\fR para convertir un archivo \s-1UTF\-16\s0 sin \s-1BOM.\s0 -.PP -Los archivos codificados como \s-1GB18030\s0 pueden tener una Marca de Orden de -Bytes, como ocurre con los archivos Unicode. -.SH "EJEMPLOS" -.IX Header "EJEMPLOS" -Lee la entrada desde 'stdin' y escribe la salida a 'stdout': -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Convierte y reemplaza a.txt. Convierte y reemplaza b.txt: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Convierte y reemplaza a.txt empleando modo de conversión ascii: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Convierte y reemplaza a.txt empleando modo de conversión ascii, convierte y -reemplaza b.txt empleando modo de conversión de 7bits: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Convierte a.txt del formato de Mac a Unix: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Convierte a.txt del formato de Unix a Mac: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Convierte y reemplaza a.txt manteniendo la fecha del archivo original: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Convierte a.txt y escribe la salida en e.txt: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Convierte a.txt y escribe la salida en e.txt, manteniendo la fecha de e.txt -igual a la de a.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Convierte y reemplaza a.txt, convierte b.txt y escribe en e.txt: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Convierte c.txt y escribe en e.txt, convierte y reemplaza a.txt, convierte y -reemplaza b.txt, convierte d.txt y escribe en f.txt: -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "CONVERSIÓN RECURSIVA" -.IX Header "CONVERSIÓN RECURSIVA" -Use dos2unix en combinación con los comandos \fIfind\fR\|(1) y \fIxargs\fR\|(1) para -convertir recursivamente archivos de texto contenidos en un árbol de -directorios. Por ejemplo para convertir todos los archivos .txt en el árbol -de directorios debajo del directorio actual escriba: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "INTERNACIONALIZACIÓN" -.IX Header "INTERNACIONALIZACIÓN" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -El idioma principal se selecciona con la variable de entorno \s-1LANG.\s0 La -variable \s-1LANG\s0 consiste de varias partes. La primer parte es el código del -idioma en minúsculas. La segunda es opcional y es el código del país en -mayúsculas, precedido por un guión bajo. Existe también una tercera parte -opcional: la codificación de caracteres, precedida por un punto. Unos -cuantos ejemplos para intérpretes de comandos tipo \s-1POSIX\s0 estándar: -.Sp -.Vb 7 -\& export LANG=nl Neerlandés -\& export LANG=nl_NL Neerlandés, Países Bajos -\& export LANG=nl_BE Neerlandés, Bélgica -\& export LANG=es_ES Español, España -\& export LANG=es_MX Español, México -\& export LANG=en_US.iso88591 Ingles, EE. UU., codificación Latín\-1 -\& export LANG=en_GB.UTF\-8 Ingles, Reino Unido, codificación UTF\-8 -.Ve -.Sp -Para obtener una lista completa de códigos de idioma y país véase el manual -de gettext: - -.Sp -En sistemas Unix puede emplear el comando \fIlocale\fR\|(1) para obtener información -específica de locale. -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -Con la variable de entorno \s-1LANGUAGE\s0 puede especificar una lista de prioridad -de los idiomas, separados por dos puntos. Dos2unix da preferencia a \s-1LANGUAGE\s0 -sobre \s-1LANG.\s0 Por ejemplo, primero neerlandés y entonces alemán: -\&\f(CW\*(C`LANGUAGE=nl:de\*(C'\fR. Para usar una lista de prioridad de idiomas a través de -la variable \s-1LANGUAGE\s0 tiene que habilitar antes la internacionalización, -asignando un valor distinto de \*(L"C\*(R" a \s-1LANG \s0(o \s-1LC_ALL\s0). Véase también el -manual de gettext: - -.Sp -Si selecciona un idioma que no está disponible el programa funcionará en -ingles. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Con la variable de entorno \s-1DOS2UNIX_LOCALEDIR\s0 el \s-1LOCALEDIR\s0 asignado durante -la compilación puede ser modificado. \s-1LOCALEDIR\s0 es usado para encontrar los -archivos de idioma. El valor por defecto de \s-1GNU\s0 es -\&\f(CW\*(C`/usr/local/share/locale\*(C'\fR. El parámetro \fB\-\-version\fR mostrará el \s-1LOCALEDIR\s0 -en uso. -.Sp -Ejemplo (intérprete de comandos \s-1POSIX\s0): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "VALOR DE RETORNO" -.IX Header "VALOR DE RETORNO" -Se regresa cero cuando el programa termina exitosamente. Cuando ocurre un -error del sistema se regresará el último número de error del sistema. Para -otros errores se regresa 1. -.PP -El valor de retorno es siempre cero en modo silencioso, excepto cuando se -emplean parámetros incorrectos. -.SH "ESTÁNDARES" -.IX Header "ESTÁNDARES" - -.PP - -.PP - -.PP - -.SH "AUTORES" -.IX Header "AUTORES" -Benjamin Lin \- , Bernd Johannes Wuebben (mac2unix -mode) \- , Christian Wurll (add extra newline) \- -, Erwin Waterlander \- (maintainer) -.PP -Página del proyecto: -.PP -Página de SourceForge: -.SH "VÉASE TAMBIÉN" -.IX Header "VÉASE TAMBIÉN" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/es/man1/mac2unix.1 b/Tools/dos2unix/share/man/es/man1/mac2unix.1 deleted file mode 100644 index d820f9f..0000000 --- a/Tools/dos2unix/share/man/es/man1/mac2unix.1 +++ /dev/null @@ -1,764 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NOMBRE" -.IX Header "NOMBRE" -dos2unix \- Convertidor de archivos de texto de formato DOS/Mac a Unix y -viceversa -.SH "SINOPSIS" -.IX Header "SINOPSIS" -.Vb 2 -\& dos2unix [parámetros] [ARCHIVO ...] [\-n ARCHIVO_DE_ENTRADA ARCHIVO_DE_SALIDA ...] -\& unix2dos [parámetros] [ARCHIVO ...] [\-n ARCHIVO_DE_ENTRADA ARCHIVO_DE_SALIDA ...] -.Ve -.SH "DESCRIPCIÓN" -.IX Header "DESCRIPCIÓN" -El paquete Dos2unix incluye las herramientas \f(CW\*(C`dos2unix\*(C'\fR y \f(CW\*(C`unix2dos\*(C'\fR para -convertir archivos de texto plano en formato \s-1DOS\s0 o Mac a formato Unix y -viceversa. -.PP -En archivos de texto DOS/Windows, un salto de línea, también conocido como -nueva línea, es una combinación de dos caracteres: un retorno de carro (\s-1CR\s0) -seguido por un salto de línea (\s-1LF\s0). En archivos de texto Unix, un salto de -línea es solamente un carácter: el salto de línea (\s-1LF\s0). En archivos de texto -Mac, antes de Mac \s-1OS X,\s0 un salto de línea era sólo un carácter retorno de -carro (\s-1CR\s0). Actualmente, Mac \s-1OS\s0 usa el estilo Unix de saltos de línea (\s-1LF\s0). -.PP -Además de saltos de línea, Dos2unix puede también convertir la codificación -de archivos. Unas cuantas páginas de códigos \s-1DOS\s0 pueden ser convertidas a -Unix Latin\-1. Y archivos Unicode de Windows (\s-1UTF\-16\s0) pueden ser convertidos -a archivos Unicode de Unix (\s-1UTF\-8\s0). -.PP -Los archivos binarios son ignorados automáticamente, a menos que se fuerce -su conversión. -.PP -Los archivos no regulares, tales como directorios y \s-1FIFO,\s0 son ignorados -automáticamente. -.PP -Los enlaces simbólicos y sus destinos no son modificados por defecto. Los -enlaces simbólicos pueden opcionalmente ser reemplazados, o la salida puede -ser escrita al destino simbólico del enlace. En Windows no está soportada la -escritura a enlaces simbólicos. -.PP -Dos2unix fue modelado después de dos2unix bajo SunOS/Solaris. Hay una -importante diferencia respecto a la versión original SunOS/Solaris. Esta -versión hace, por defecto, la conversión en el mismo archivo (modo de -archivo antiguo), mientras que la versión original de SunOS/Solaris sólo es -compatible con la conversión en archivo emparejado (modo de archivo -nuevo). Véanse las opciones \f(CW\*(C`\-o\*(C'\fR y \f(CW\*(C`\-n\*(C'\fR. -.SH "PARÁMETROS" -.IX Header "PARÁMETROS" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Todos los parámetros siguientes son tratados como nombres de archivo. Use -este parámetro si desea convertir archivos cuyos nombres inician con un -guión. Por ejemplo para convertir un archivoo llamado \*(L"\-foo\*(R", use este -comando: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -O en modo de archivo nuevo: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo out.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Sólo convierte los salto de línea. Éste es el modo de conversión por -defecto. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Conversión entre el conjunto de caracteres \s-1DOS\s0 e \s-1ISO\-8859\-1.\s0 Véase también -la sección \s-1MODOS DE\s0 CONVERSIÓN. -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Usa la página de códigos Windows 1252 (Europa Occidental). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -Usa la página de códigos \s-1DOS 437 \s0(\s-1EE. UU.\s0). Está es la página de códigos -usada por defecto para conversión \s-1ISO.\s0 -.IP "\fB\-850\fR" 4 -.IX Item "-850" -Usa la página de códigos \s-1DOS 850 \s0(Europa Occidental). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -Usa la página de códigos \s-1DOS 860 \s0(Portugués). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -Usa la página de códigos \s-1DOS 863 \s0(Francocanadiense). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -Usa la página de códigos \s-1DOS 865 \s0(Nórdico). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Convierte caracteres de 8 bits al espacio de 7 bits. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Mantiene la Marca de Orden de Byte (\s-1BOM\s0). Cuando el archivo de entrada -tiene \s-1BOM,\s0 escribe \s-1BOM\s0 en el archivo de salida. Este es el comportamiento -por defecto en la conversión a saltos de línea \s-1DOS.\s0 Vea también la opción -\&\f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode \s-1CONVMODE\s0\fR" 4 -.IX Item "-c, --convmode CONVMODE" -Establece el modo de conversión, Donde \s-1CONVMODE\s0 puede ser: \fIascii\fR, -\&\fI7bit\fR, \fIiso\fR, \fImac\fR siendo ascii el valor por defecto. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -Fuerza la conversión de archivos binarios. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -En Windows los archivos \s-1UTF\-16\s0 se convierten por defecto a \s-1UTF\-8,\s0 sin tener -en cuenta la configuración local. Use esta opción para convertir archivos -\&\s-1UTF\-16\s0 a \s-1GB18030.\s0 Esta opción sólo está disponible en Windows.l Véase -también la sección \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -Despiega la ayuda y termina el programa. -.IP "\fB\-i[\s-1MARCAS\s0], \-\-info[= \s-1MARCAS\s0] \s-1ARCHIVO ...\s0\fR" 4 -.IX Item "-i[MARCAS], --info[= MARCAS] ARCHIVO ..." -Muestra la información del archivo. No se realiza ninguna conversión. -.Sp -Se muestra la siguiente información, en este orden: número de saltos de -línea \s-1DOS,\s0 número de saltos de línea Unix, número de saltos de línea Mac, -Marca de Orden de Byte, de texto o binario, nombre del archivo. -.Sp -Ejemplo de salida: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Se pueden utilizar marcas extras opcionales para modificar la salida. Se -pueden añadir una o más marcas. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Muestra el número de saltos de línea \s-1DOS.\s0 -.IP "\fBu\fR" 4 -.IX Item "u" -Muestra el número de saltos de línea Unix. -.IP "\fBm\fR" 4 -.IX Item "m" -Muestra el número de saltos de línea Mac. -.IP "\fBb\fR" 4 -.IX Item "b" -Muestra la Marca de Orden de Byte. -.IP "\fBt\fR" 4 -.IX Item "t" -Muestra si el archivo es de texto o binario. -.IP "\fBc\fR" 4 -.IX Item "c" -Muestra sólo los archivos que pueden ser convertidos. -.Sp -Con la marca \f(CW\*(C`c\*(C'\fR dos2unix sólo mostrará los archivos que contengan saltos -de línea \s-1DOS,\s0 unix2dos sólo mostrará los nombres de archivo que tengan -saltos de línea Unix. -.RE -.RS 4 -.Sp -Ejemplos: -.Sp -Muestra información para todos los archivos *.txt: -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Muestra sólo el número de saltos de línea de \s-1DOS\s0 y de Unix: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Muestra sólo la Marca de Orden de Byte. -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -Muestra los archivos que tienen saltos de línea \s-1DOS:\s0 -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -Muestra los archivos que tienen saltos de línea Unix: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -Mantiene la fecha del archivo de salida igual a la del archivo de entrada. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -Muestra la licencia del programa. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -Añade salto de línea adicional. -.Sp -\&\fBdos2unix\fR: Sólo los saltos de línea \s-1DOS\s0 son cambiados por dos saltos de -línea Unix. En modo Mac sólo los saltos de línea Mac son cambiados por dos -saltos de línea Unix. -.Sp -\&\fBunix2dos\fR: Sólo los saltos de línea Unix son cambiados por dos saltos de -línea \s-1DOS.\s0 En modo Mac los saltos de línea Unix son cambiados por dos saltos -de línea Mac. -.IP "\fB\-m, \-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -Escribe una Marca de Orden de Bytes (\s-1BOM\s0) en el archivo de salida. Por -defecto se escribe una \s-1BOM UTF\-8.\s0 -.Sp -Cuando el archivo de entrada es \s-1UTF\-16\s0 y se usa la opción \f(CW\*(C`\-u\*(C'\fR, se -escribirá un \s-1BOM UTF\-16.\s0 -.Sp -No utilice esta opción cuando la codificación de salida sea distinta de -\&\s-1UTF\-8\s0 o \s-1UTF\-16.\s0 Véase también la sección \s-1UNICODE.\s0 -.IP "\fB\-n, \-\-newfile \s-1ARCHIVO_DE_ENTRADA ARCHIVO_DE_SALIDA ...\s0\fR" 4 -.IX Item "-n, --newfile ARCHIVO_DE_ENTRADA ARCHIVO_DE_SALIDA ..." -Modo de archivo nuevo. Convierte el archivo \s-1ARCHIVO_DE_ENTRADA\s0 y escribe la -salida al archivo \s-1ARCHIVO_DE_SALIDA.\s0 Los nombres de archivo deben ser dados -en pares y los comodines \fIno\fR deben ser usados o \fIperderá\fR sus archivos. -.Sp -La persona que inicia la conversión en el modo de archivo nuevo (emparejado) -será el propietario del archivo convertido. Los permisos de -lectura/escritura del archivo nuevo serán los permisos del archivo original -menos la \fIumask\fR\|(1) de la persona que ejecute la conversión. -.IP "\fB\-o, \-\-oldfile \s-1ARCHIVO ...\s0\fR" 4 -.IX Item "-o, --oldfile ARCHIVO ..." -Modo de archivo antiguo. Convierte el archivo \s-1ARCHIVO\s0 y lo sobrescribe con -la salida. El programa por defecto se ejecuta en este modo. Se pueden -emplear comodines. -.Sp -En modo de archivo antiguo (in situ), el archivo convertido tiene el mismo -propietario, grupo y permisos de lectura/escritura que el archivo original. -Lo mismo aplica cuando el archivo es convertido por otro usuario que tiene -permiso de lectura en el archivo (p.e. usuario root). La conversión será -abortada cuando no sea posible preservar los valores originales. Cambiar el -propietario implicaría que el propietario original ya no podrá leer el -archivo. Cambiar el grupo podría ser un riesgo de seguridad, ya que el -archivo podría ser accesible a personas inadecuadas. La preservación del -propietario, grupo, y permisos de lectura/escritura sólo está soportada bajo -Unix. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Modo silencioso. Suprime todas las advertencias y mensajes. El valor -retornado es cero. Excepto cuando se emplean parámetros incorrectos. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -Elimina la Marca de Orden de Byte (\s-1BOM\s0). No escribe el \s-1BOM\s0 en el archivo de -salida. Este es el comportamiento por defecto al convertir a saltos de línea -Unix. Vea también la opción \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s, \-\-safe\fR" 4 -.IX Item "-s, --safe" -Ignora los archivos binarios (por defecto). -.IP "\fB\-u, \-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -Mantiene la codificación original \s-1UTF\-16\s0 en el archivo de entrada. El -archivo de salida se escribirá con la misma codificación \s-1UTF\-16,\s0 little o -big endian, como el archivo de entrada. Esto impide la transformación a -\&\s-1UTF\-8.\s0 En consecuencia se escribirá un \s-1BOM UTF\-16.\s0 Esta opción se puede -desactivar con la opción \f(CW\*(C`\-ascii\*(C'\fR. -.IP "\fB\-ul, \-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -Se asume que el formato de archivo de entrada es \s-1UTF\-16LE.\s0 -.Sp -Cuando existe una Marca de Orden de Bytes (\s-1BOM\s0) en el archivo de entrada, la -\&\s-1BOM\s0 tiene prioridad sobre esta opción. -.Sp -Cuando se hace una suposición incorrecta (el archivo de entrada no estaba en -formato \s-1UTF\-16LE\s0) y la conversión tiene éxito, obtendrá un archivo \s-1UTF\-8\s0 de -salida con el texto erróneo. La conversión errónea puede deshacerse con -\&\fIiconv\fR\|(1) convirtiendo el archivo \s-1UTF\-8\s0 de salida de vuelta a \s-1UTF\-16LE.\s0 Esto -restaurará el archivo original. -.Sp -El supuesto de \s-1UTF\-16LE\s0 funciona como un \fImodo de conversión\fR. Al cambiar -al modo por defecto \fIascii\fR el supuesto \s-1UTF\-16LE\s0 es deshabilitado. -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -Se asume que el formato del archivo de entrada es \s-1UTF\-16BE.\s0 -.Sp -Esta opción funciona igual que la opción \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v, \-\-verbose\fR" 4 -.IX Item "-v, --verbose" -Mostrar mensajes detallados. Se muestra información extra acerca de Marcas -de Orden de Bytes (\s-1BOM\s0) y el número de saltos de línea convertidos. -.IP "\fB\-F, \-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -Sigue los enlaces simbólicos y convierte los destinos. -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Reemplaza los enlaces simbólicos con los archivos convertidos (los archivos -destino originales no se alteran). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -No altera los enlaces simbólicos ni sus destinos (por defecto). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -Despiega la información de la versión y termina el programa. -.SH "MODO MAC" -.IX Header "MODO MAC" -En modo normal los saltos de línea son convertidos de \s-1DOS\s0 a Unix y -viceversa. Los saltos de línea Mac no son convertidos. -.PP -En modo Mac los saltos de línea son convertidos de Mac a Unix y -viceversa. Los saltos de línea \s-1DOS\s0 no son modificados. -.PP -Para ejecutar en modo Mac use el modificador \f(CW\*(C`\-c mac\*(C'\fR o use los comandos -\&\f(CW\*(C`mac2unix\*(C'\fR o \f(CW\*(C`unix2mac\*(C'\fR. -.SH "MODOS DE CONVERSIÓN" -.IX Header "MODOS DE CONVERSIÓN" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -En modo \f(CW\*(C`ascii\*(C'\fR sólo los saltos de línea son convertidos. Éste es el modo -de conversión por defecto. -.Sp -Aunque el nombre de este modo es \s-1ASCII,\s0 que es un estándar de 7 bits, éste -emplea 8 bits. Siempre use este modo cuando convierta archivos Unicode -\&\s-1UTF\-8.\s0 -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -En este modo todos los caracteres no \s-1ASCII\s0 de 8 bits (con valores de 128 a -255) son convertidos al espacio de 7 bits. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Los caracteres son convertidos entre un conjunto de caracteres \s-1DOS \s0(página -de códigos) y el conjunto de caracteres \s-1ISO\-8859\-1 \s0(Latín\-1) de Unix. Los -caracteres \s-1DOS\s0 sin equivalente \s-1ISO\-8859\-1,\s0 para los cuales la conversión es -imposible, son convertidos en un punto. Lo mismo se aplica para caracteres -\&\s-1ISO\-8859\-1\s0 sin contraparte \s-1DOS.\s0 -.Sp -Cuando sólo se emplea el parámetro \f(CW\*(C`\-iso\*(C'\fR, dos2unix intentará determinar la -página de códigos activa. Cuando esto no sea posible, dos2unix utilizará la -página de códigos 437 por defecto, la cual es empleada principalmente en -\&\s-1EE. UU.\s0 Para forzar una página de códigos específica emplee los parámetros -\&\f(CW\*(C`\-437\*(C'\fR (\s-1EE. UU.\s0), \f(CW\*(C`\-850\*(C'\fR (Europa Occidental), \f(CW\*(C`\-860\*(C'\fR (Portugués), \f(CW\*(C`\-863\*(C'\fR -(Francocanadiense), o \f(CW\*(C`\-865\*(C'\fR (Nórdico). La página de códigos Windows 1252 -(Europa Occidental) también está soportada con el parámetro \f(CW\*(C`\-1252\*(C'\fR. Para -acceder a otras páginas de códigos use dos2unix en combinación con -\&\fIiconv\fR\|(1). Iconv puede convertir entre una larga lista de codificaciones de -caracteres. -.Sp -No use la conversión \s-1ISO\s0 en archivos de texto Unicode. Esto corrompería los -archivos codificados como \s-1UTF\-8.\s0 -.Sp -Algunos ejemplos: -.Sp -Convierte de la página de códigos por defecto de \s-1DOS\s0 a Latín\-1 de Unix: -.Sp -.Vb 1 -\& dos2unix \-iso \-n in.txt out.txt -.Ve -.Sp -Convierte de \s-1DOS CP850\s0 a Unix Latín\-1: -.Sp -.Vb 1 -\& dos2unix \-850 \-n in.txt out.txt -.Ve -.Sp -Convierte de Windows \s-1CP1252\s0 a Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n in.txt out.txt -.Ve -.Sp -Convierte de Windows \s-1CP1252\s0 a Unix \s-1UTF\-8 \s0(Unicode). -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 in.txt | dos2unix > out.txt -.Ve -.Sp -Convierte de Unix Latin\-1 a la página de códigos por defecto de \s-1DOS:\s0 -.Sp -.Vb 1 -\& unix2dos \-iso \-n in.txt out.txt -.Ve -.Sp -Convierte de Unix Latin\-1 a \s-1DOS CP850:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n in.txt out.txt -.Ve -.Sp -Convierte de Unix Latin\-1 a Windows \s-1CP1252.\s0 -.Sp -.Vb 1 -\& unix2dos \-1252 \-n in.txt out.txt -.Ve -.Sp -Convierte de Unix \s-1UTF\-8 \s0(Unicode) a Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t CP1252 > out.txt -.Ve -.Sp -Véase también y -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Codificaciones" -.IX Subsection "Codificaciones" -Existen diferentes codificaciones Unicode. En Unix y Linux los archivos -Unicode son codificados comúnmente en \s-1UTF\-8.\s0 En Windows los archivos de -texto Unicode pueden estar codificados en \s-1UTF\-8, UTF\-16,\s0 o \s-1UTF\-16\s0 big -endian, pero en general son codificados en formato \s-1UTF\-16.\s0 -.SS "Conversion" -.IX Subsection "Conversion" -Los archivos de texto Unicode pueden tener saltos de línea \s-1DOS,\s0 Unix o Mac, -como cualquier archivo de texto. -.PP -Todas las versiones de dos2unix y unix2dos pueden convertir archivos -codificados como \s-1UTF\-8,\s0 debido a que \s-1UTF\-8\s0 fue diseñado para -retro-compatibilidad con \s-1ASCII.\s0 -.PP -Dos2unix y unix2dos con soporte Unicode \s-1UTF\-16,\s0 pueden leer archivos de -texto codificados como \s-1UTF\-16\s0 little y big endian. Para ver si dos2unix fue -compilado con soporte \s-1UTF\-16\s0 escriba \f(CW\*(C`dos2unix \-V\*(C'\fR. -.PP -En Unix/Linux los archivos codificados con \s-1UTF\-16\s0 se convierten a la -codificación de caracteres local. Use el comando \fIlocale\fR\|(1) para averiguar la -codificación de caracteres local. Cuando no se puede hacer la conversión se -obtendrá un error de conversión y se omitirá el archivo. -.PP -En Windows los archivos \s-1UTF\-16\s0 se convierten por defecto a \s-1UTF\-8.\s0 Los -archivos de texto forrajeados con \s-1UTF\-8\s0 están soportados tanto en Windows -como en Unix/Linux. -.PP -Las codificaciones \s-1UTF\-16\s0 y \s-1UTF\-8\s0 son totalmente compatibles, no se perderá -ningún texto en la conversión. Cuando ocurre un error de conversión de -\&\s-1UTF\-16\s0 a \s-1UTF\-8,\s0 por ejemplo cuando el archivo de entrada \s-1UTF\-16\s0 contiene un -error, se omitirá el archivo. -.PP -Cuando se usa la opción \f(CW\*(C`\-u\*(C'\fR, el archivo de salida se escribirá en la misma -codificación \s-1UTF\-16\s0 que el archivo de entrada. La opción \f(CW\*(C`\-u\*(C'\fR previene la -conversión a \s-1UTF\-8.\s0 -.PP -Dos2unix y unix2dos no tienen la opción de convertir archivos \s-1UTF\-8\s0 a -\&\s-1UTF\-16.\s0 -.PP -La conversión en modos \s-1ISO\s0 y 7\-bit no funciona en archivos \s-1UTF\-16.\s0 -.SS "Marca de orden de bytes" -.IX Subsection "Marca de orden de bytes" -En Windows los archivos de texto Unicode típicamente tienen una Marca de -Orden de Bytes (\s-1BOM\s0), debido a que muchos programas de Windows (incluyendo -el Bloc de Notas) añaden una \s-1BOM\s0 por defecto. Véase también -. -.PP -En Unix los archivos Unicode no suelen tener \s-1BOM.\s0 Se supone que los archivos -de texto son codificados en la codificación local de caracteres. -.PP -Dos2unix sólo puede detectar si un archivo está en formato \s-1UTF\-16\s0 si el -archivo tiene una \s-1BOM.\s0 Cuando un archivo \s-1UTF\-16\s0 no tiene una \s-1BOM,\s0 dos2unix -tratará el archivo como un archivo binario. -.PP -Use la opción \f(CW\*(C`\-ul\*(C'\fR o \f(CW\*(C`\-ub\*(C'\fR para convertir un archivo \s-1UTF\-16\s0 sin \s-1BOM.\s0 -.PP -Dos2Unix, por defecto, no escribe \s-1BOM\s0 en el archivo de salida. Con la opción -\&\f(CW\*(C`\-b\*(C'\fR Dos2unix escribe el \s-1BOM\s0 cuando el archivo de entrada tiene \s-1BOM.\s0 -.PP -Unix2dos escribe \s-1BOM\s0 en el archivo de salida cuando el archivo de entrada -tiene \s-1BOM.\s0 Use la opción \f(CW\*(C`\-r\*(C'\fR para eliminar la \s-1BOM.\s0 -.PP -Dos2unix y unix2dos escriben siempre \s-1BOM\s0 cuando se usa la opción \f(CW\*(C`\-m\*(C'\fR. -.SS "Ejemplos Unicode" -.IX Subsection "Ejemplos Unicode" -Convertir de Windows \s-1UTF\-16 \s0(con una \s-1BOM\s0) a Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-n in.txt out.txt -.Ve -.PP -Convertir de Windows \s-1UTF\-16LE \s0(sin una \s-1BOM\s0) a Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-ul \-n in.txt out.txt -.Ve -.PP -Convertir de Unix \s-1UTF\-8\s0 a Windows \s-1UTF\-8\s0 sin una \s-1BOM:\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n in.txt out.txt -.Ve -.PP -Convertir de Unix \s-1UTF\-8\s0 a Windows \s-1UTF\-16:\s0 -.PP -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t UTF\-16 > out.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 es un estándar del gobierno chino. Todo producto software vendido en -China está obligado por ley a contener un subconjunto del \s-1GB18030\s0 -estándar. Véase . -.PP -\&\s-1GB18030\s0 es totalmente compatible con Unicode y puede considerarse como -formato de transformación Unicode. Como ocurre con \s-1UTF\-8, GB18030\s0 es -compatible con \s-1ASCII. GB18030\s0 también es compatible con la página de códigos -de Windows 936, también conocida como \s-1GBK.\s0 -.PP -En Unix/Linux los archivos \s-1UTF\-16\s0 se convierten a \s-1GB18030\s0 cuando la -codificación local se establece en \s-1GB18030.\s0 Tenga en cuenta que esto sólo -funcionará si se establece la ubicación en China. Por ejemplo en una -configuración local English British la conversión \f(CW\*(C`en_GB.GB18030\*(C'\fR de \s-1UTF\-16\s0 -a \s-1GB18030\s0 no funcionará, pero en una configuración local China -\&\f(CW\*(C`zh_CN.GB18030\*(C'\fR sí lo hará. -.PP -Use la opción \f(CW\*(C`\-ul\*(C'\fR o \f(CW\*(C`\-ub\*(C'\fR para convertir un archivo \s-1UTF\-16\s0 sin \s-1BOM.\s0 -.PP -Los archivos codificados como \s-1GB18030\s0 pueden tener una Marca de Orden de -Bytes, como ocurre con los archivos Unicode. -.SH "EJEMPLOS" -.IX Header "EJEMPLOS" -Lee la entrada desde 'stdin' y escribe la salida a 'stdout': -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Convierte y reemplaza a.txt. Convierte y reemplaza b.txt: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Convierte y reemplaza a.txt empleando modo de conversión ascii: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Convierte y reemplaza a.txt empleando modo de conversión ascii, convierte y -reemplaza b.txt empleando modo de conversión de 7bits: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Convierte a.txt del formato de Mac a Unix: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Convierte a.txt del formato de Unix a Mac: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Convierte y reemplaza a.txt manteniendo la fecha del archivo original: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Convierte a.txt y escribe la salida en e.txt: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Convierte a.txt y escribe la salida en e.txt, manteniendo la fecha de e.txt -igual a la de a.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Convierte y reemplaza a.txt, convierte b.txt y escribe en e.txt: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Convierte c.txt y escribe en e.txt, convierte y reemplaza a.txt, convierte y -reemplaza b.txt, convierte d.txt y escribe en f.txt: -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "CONVERSIÓN RECURSIVA" -.IX Header "CONVERSIÓN RECURSIVA" -Use dos2unix en combinación con los comandos \fIfind\fR\|(1) y \fIxargs\fR\|(1) para -convertir recursivamente archivos de texto contenidos en un árbol de -directorios. Por ejemplo para convertir todos los archivos .txt en el árbol -de directorios debajo del directorio actual escriba: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "INTERNACIONALIZACIÓN" -.IX Header "INTERNACIONALIZACIÓN" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -El idioma principal se selecciona con la variable de entorno \s-1LANG.\s0 La -variable \s-1LANG\s0 consiste de varias partes. La primer parte es el código del -idioma en minúsculas. La segunda es opcional y es el código del país en -mayúsculas, precedido por un guión bajo. Existe también una tercera parte -opcional: la codificación de caracteres, precedida por un punto. Unos -cuantos ejemplos para intérpretes de comandos tipo \s-1POSIX\s0 estándar: -.Sp -.Vb 7 -\& export LANG=nl Neerlandés -\& export LANG=nl_NL Neerlandés, Países Bajos -\& export LANG=nl_BE Neerlandés, Bélgica -\& export LANG=es_ES Español, España -\& export LANG=es_MX Español, México -\& export LANG=en_US.iso88591 Ingles, EE. UU., codificación Latín\-1 -\& export LANG=en_GB.UTF\-8 Ingles, Reino Unido, codificación UTF\-8 -.Ve -.Sp -Para obtener una lista completa de códigos de idioma y país véase el manual -de gettext: - -.Sp -En sistemas Unix puede emplear el comando \fIlocale\fR\|(1) para obtener información -específica de locale. -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -Con la variable de entorno \s-1LANGUAGE\s0 puede especificar una lista de prioridad -de los idiomas, separados por dos puntos. Dos2unix da preferencia a \s-1LANGUAGE\s0 -sobre \s-1LANG.\s0 Por ejemplo, primero neerlandés y entonces alemán: -\&\f(CW\*(C`LANGUAGE=nl:de\*(C'\fR. Para usar una lista de prioridad de idiomas a través de -la variable \s-1LANGUAGE\s0 tiene que habilitar antes la internacionalización, -asignando un valor distinto de \*(L"C\*(R" a \s-1LANG \s0(o \s-1LC_ALL\s0). Véase también el -manual de gettext: - -.Sp -Si selecciona un idioma que no está disponible el programa funcionará en -ingles. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Con la variable de entorno \s-1DOS2UNIX_LOCALEDIR\s0 el \s-1LOCALEDIR\s0 asignado durante -la compilación puede ser modificado. \s-1LOCALEDIR\s0 es usado para encontrar los -archivos de idioma. El valor por defecto de \s-1GNU\s0 es -\&\f(CW\*(C`/usr/local/share/locale\*(C'\fR. El parámetro \fB\-\-version\fR mostrará el \s-1LOCALEDIR\s0 -en uso. -.Sp -Ejemplo (intérprete de comandos \s-1POSIX\s0): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "VALOR DE RETORNO" -.IX Header "VALOR DE RETORNO" -Se regresa cero cuando el programa termina exitosamente. Cuando ocurre un -error del sistema se regresará el último número de error del sistema. Para -otros errores se regresa 1. -.PP -El valor de retorno es siempre cero en modo silencioso, excepto cuando se -emplean parámetros incorrectos. -.SH "ESTÁNDARES" -.IX Header "ESTÁNDARES" - -.PP - -.PP - -.PP - -.SH "AUTORES" -.IX Header "AUTORES" -Benjamin Lin \- , Bernd Johannes Wuebben (mac2unix -mode) \- , Christian Wurll (add extra newline) \- -, Erwin Waterlander \- (maintainer) -.PP -Página del proyecto: -.PP -Página de SourceForge: -.SH "VÉASE TAMBIÉN" -.IX Header "VÉASE TAMBIÉN" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/es/man1/unix2dos.1 b/Tools/dos2unix/share/man/es/man1/unix2dos.1 deleted file mode 100644 index d820f9f..0000000 --- a/Tools/dos2unix/share/man/es/man1/unix2dos.1 +++ /dev/null @@ -1,764 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NOMBRE" -.IX Header "NOMBRE" -dos2unix \- Convertidor de archivos de texto de formato DOS/Mac a Unix y -viceversa -.SH "SINOPSIS" -.IX Header "SINOPSIS" -.Vb 2 -\& dos2unix [parámetros] [ARCHIVO ...] [\-n ARCHIVO_DE_ENTRADA ARCHIVO_DE_SALIDA ...] -\& unix2dos [parámetros] [ARCHIVO ...] [\-n ARCHIVO_DE_ENTRADA ARCHIVO_DE_SALIDA ...] -.Ve -.SH "DESCRIPCIÓN" -.IX Header "DESCRIPCIÓN" -El paquete Dos2unix incluye las herramientas \f(CW\*(C`dos2unix\*(C'\fR y \f(CW\*(C`unix2dos\*(C'\fR para -convertir archivos de texto plano en formato \s-1DOS\s0 o Mac a formato Unix y -viceversa. -.PP -En archivos de texto DOS/Windows, un salto de línea, también conocido como -nueva línea, es una combinación de dos caracteres: un retorno de carro (\s-1CR\s0) -seguido por un salto de línea (\s-1LF\s0). En archivos de texto Unix, un salto de -línea es solamente un carácter: el salto de línea (\s-1LF\s0). En archivos de texto -Mac, antes de Mac \s-1OS X,\s0 un salto de línea era sólo un carácter retorno de -carro (\s-1CR\s0). Actualmente, Mac \s-1OS\s0 usa el estilo Unix de saltos de línea (\s-1LF\s0). -.PP -Además de saltos de línea, Dos2unix puede también convertir la codificación -de archivos. Unas cuantas páginas de códigos \s-1DOS\s0 pueden ser convertidas a -Unix Latin\-1. Y archivos Unicode de Windows (\s-1UTF\-16\s0) pueden ser convertidos -a archivos Unicode de Unix (\s-1UTF\-8\s0). -.PP -Los archivos binarios son ignorados automáticamente, a menos que se fuerce -su conversión. -.PP -Los archivos no regulares, tales como directorios y \s-1FIFO,\s0 son ignorados -automáticamente. -.PP -Los enlaces simbólicos y sus destinos no son modificados por defecto. Los -enlaces simbólicos pueden opcionalmente ser reemplazados, o la salida puede -ser escrita al destino simbólico del enlace. En Windows no está soportada la -escritura a enlaces simbólicos. -.PP -Dos2unix fue modelado después de dos2unix bajo SunOS/Solaris. Hay una -importante diferencia respecto a la versión original SunOS/Solaris. Esta -versión hace, por defecto, la conversión en el mismo archivo (modo de -archivo antiguo), mientras que la versión original de SunOS/Solaris sólo es -compatible con la conversión en archivo emparejado (modo de archivo -nuevo). Véanse las opciones \f(CW\*(C`\-o\*(C'\fR y \f(CW\*(C`\-n\*(C'\fR. -.SH "PARÁMETROS" -.IX Header "PARÁMETROS" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Todos los parámetros siguientes son tratados como nombres de archivo. Use -este parámetro si desea convertir archivos cuyos nombres inician con un -guión. Por ejemplo para convertir un archivoo llamado \*(L"\-foo\*(R", use este -comando: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -O en modo de archivo nuevo: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo out.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Sólo convierte los salto de línea. Éste es el modo de conversión por -defecto. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Conversión entre el conjunto de caracteres \s-1DOS\s0 e \s-1ISO\-8859\-1.\s0 Véase también -la sección \s-1MODOS DE\s0 CONVERSIÓN. -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Usa la página de códigos Windows 1252 (Europa Occidental). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -Usa la página de códigos \s-1DOS 437 \s0(\s-1EE. UU.\s0). Está es la página de códigos -usada por defecto para conversión \s-1ISO.\s0 -.IP "\fB\-850\fR" 4 -.IX Item "-850" -Usa la página de códigos \s-1DOS 850 \s0(Europa Occidental). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -Usa la página de códigos \s-1DOS 860 \s0(Portugués). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -Usa la página de códigos \s-1DOS 863 \s0(Francocanadiense). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -Usa la página de códigos \s-1DOS 865 \s0(Nórdico). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Convierte caracteres de 8 bits al espacio de 7 bits. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Mantiene la Marca de Orden de Byte (\s-1BOM\s0). Cuando el archivo de entrada -tiene \s-1BOM,\s0 escribe \s-1BOM\s0 en el archivo de salida. Este es el comportamiento -por defecto en la conversión a saltos de línea \s-1DOS.\s0 Vea también la opción -\&\f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode \s-1CONVMODE\s0\fR" 4 -.IX Item "-c, --convmode CONVMODE" -Establece el modo de conversión, Donde \s-1CONVMODE\s0 puede ser: \fIascii\fR, -\&\fI7bit\fR, \fIiso\fR, \fImac\fR siendo ascii el valor por defecto. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -Fuerza la conversión de archivos binarios. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -En Windows los archivos \s-1UTF\-16\s0 se convierten por defecto a \s-1UTF\-8,\s0 sin tener -en cuenta la configuración local. Use esta opción para convertir archivos -\&\s-1UTF\-16\s0 a \s-1GB18030.\s0 Esta opción sólo está disponible en Windows.l Véase -también la sección \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -Despiega la ayuda y termina el programa. -.IP "\fB\-i[\s-1MARCAS\s0], \-\-info[= \s-1MARCAS\s0] \s-1ARCHIVO ...\s0\fR" 4 -.IX Item "-i[MARCAS], --info[= MARCAS] ARCHIVO ..." -Muestra la información del archivo. No se realiza ninguna conversión. -.Sp -Se muestra la siguiente información, en este orden: número de saltos de -línea \s-1DOS,\s0 número de saltos de línea Unix, número de saltos de línea Mac, -Marca de Orden de Byte, de texto o binario, nombre del archivo. -.Sp -Ejemplo de salida: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Se pueden utilizar marcas extras opcionales para modificar la salida. Se -pueden añadir una o más marcas. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Muestra el número de saltos de línea \s-1DOS.\s0 -.IP "\fBu\fR" 4 -.IX Item "u" -Muestra el número de saltos de línea Unix. -.IP "\fBm\fR" 4 -.IX Item "m" -Muestra el número de saltos de línea Mac. -.IP "\fBb\fR" 4 -.IX Item "b" -Muestra la Marca de Orden de Byte. -.IP "\fBt\fR" 4 -.IX Item "t" -Muestra si el archivo es de texto o binario. -.IP "\fBc\fR" 4 -.IX Item "c" -Muestra sólo los archivos que pueden ser convertidos. -.Sp -Con la marca \f(CW\*(C`c\*(C'\fR dos2unix sólo mostrará los archivos que contengan saltos -de línea \s-1DOS,\s0 unix2dos sólo mostrará los nombres de archivo que tengan -saltos de línea Unix. -.RE -.RS 4 -.Sp -Ejemplos: -.Sp -Muestra información para todos los archivos *.txt: -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Muestra sólo el número de saltos de línea de \s-1DOS\s0 y de Unix: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Muestra sólo la Marca de Orden de Byte. -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -Muestra los archivos que tienen saltos de línea \s-1DOS:\s0 -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -Muestra los archivos que tienen saltos de línea Unix: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -Mantiene la fecha del archivo de salida igual a la del archivo de entrada. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -Muestra la licencia del programa. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -Añade salto de línea adicional. -.Sp -\&\fBdos2unix\fR: Sólo los saltos de línea \s-1DOS\s0 son cambiados por dos saltos de -línea Unix. En modo Mac sólo los saltos de línea Mac son cambiados por dos -saltos de línea Unix. -.Sp -\&\fBunix2dos\fR: Sólo los saltos de línea Unix son cambiados por dos saltos de -línea \s-1DOS.\s0 En modo Mac los saltos de línea Unix son cambiados por dos saltos -de línea Mac. -.IP "\fB\-m, \-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -Escribe una Marca de Orden de Bytes (\s-1BOM\s0) en el archivo de salida. Por -defecto se escribe una \s-1BOM UTF\-8.\s0 -.Sp -Cuando el archivo de entrada es \s-1UTF\-16\s0 y se usa la opción \f(CW\*(C`\-u\*(C'\fR, se -escribirá un \s-1BOM UTF\-16.\s0 -.Sp -No utilice esta opción cuando la codificación de salida sea distinta de -\&\s-1UTF\-8\s0 o \s-1UTF\-16.\s0 Véase también la sección \s-1UNICODE.\s0 -.IP "\fB\-n, \-\-newfile \s-1ARCHIVO_DE_ENTRADA ARCHIVO_DE_SALIDA ...\s0\fR" 4 -.IX Item "-n, --newfile ARCHIVO_DE_ENTRADA ARCHIVO_DE_SALIDA ..." -Modo de archivo nuevo. Convierte el archivo \s-1ARCHIVO_DE_ENTRADA\s0 y escribe la -salida al archivo \s-1ARCHIVO_DE_SALIDA.\s0 Los nombres de archivo deben ser dados -en pares y los comodines \fIno\fR deben ser usados o \fIperderá\fR sus archivos. -.Sp -La persona que inicia la conversión en el modo de archivo nuevo (emparejado) -será el propietario del archivo convertido. Los permisos de -lectura/escritura del archivo nuevo serán los permisos del archivo original -menos la \fIumask\fR\|(1) de la persona que ejecute la conversión. -.IP "\fB\-o, \-\-oldfile \s-1ARCHIVO ...\s0\fR" 4 -.IX Item "-o, --oldfile ARCHIVO ..." -Modo de archivo antiguo. Convierte el archivo \s-1ARCHIVO\s0 y lo sobrescribe con -la salida. El programa por defecto se ejecuta en este modo. Se pueden -emplear comodines. -.Sp -En modo de archivo antiguo (in situ), el archivo convertido tiene el mismo -propietario, grupo y permisos de lectura/escritura que el archivo original. -Lo mismo aplica cuando el archivo es convertido por otro usuario que tiene -permiso de lectura en el archivo (p.e. usuario root). La conversión será -abortada cuando no sea posible preservar los valores originales. Cambiar el -propietario implicaría que el propietario original ya no podrá leer el -archivo. Cambiar el grupo podría ser un riesgo de seguridad, ya que el -archivo podría ser accesible a personas inadecuadas. La preservación del -propietario, grupo, y permisos de lectura/escritura sólo está soportada bajo -Unix. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Modo silencioso. Suprime todas las advertencias y mensajes. El valor -retornado es cero. Excepto cuando se emplean parámetros incorrectos. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -Elimina la Marca de Orden de Byte (\s-1BOM\s0). No escribe el \s-1BOM\s0 en el archivo de -salida. Este es el comportamiento por defecto al convertir a saltos de línea -Unix. Vea también la opción \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s, \-\-safe\fR" 4 -.IX Item "-s, --safe" -Ignora los archivos binarios (por defecto). -.IP "\fB\-u, \-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -Mantiene la codificación original \s-1UTF\-16\s0 en el archivo de entrada. El -archivo de salida se escribirá con la misma codificación \s-1UTF\-16,\s0 little o -big endian, como el archivo de entrada. Esto impide la transformación a -\&\s-1UTF\-8.\s0 En consecuencia se escribirá un \s-1BOM UTF\-16.\s0 Esta opción se puede -desactivar con la opción \f(CW\*(C`\-ascii\*(C'\fR. -.IP "\fB\-ul, \-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -Se asume que el formato de archivo de entrada es \s-1UTF\-16LE.\s0 -.Sp -Cuando existe una Marca de Orden de Bytes (\s-1BOM\s0) en el archivo de entrada, la -\&\s-1BOM\s0 tiene prioridad sobre esta opción. -.Sp -Cuando se hace una suposición incorrecta (el archivo de entrada no estaba en -formato \s-1UTF\-16LE\s0) y la conversión tiene éxito, obtendrá un archivo \s-1UTF\-8\s0 de -salida con el texto erróneo. La conversión errónea puede deshacerse con -\&\fIiconv\fR\|(1) convirtiendo el archivo \s-1UTF\-8\s0 de salida de vuelta a \s-1UTF\-16LE.\s0 Esto -restaurará el archivo original. -.Sp -El supuesto de \s-1UTF\-16LE\s0 funciona como un \fImodo de conversión\fR. Al cambiar -al modo por defecto \fIascii\fR el supuesto \s-1UTF\-16LE\s0 es deshabilitado. -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -Se asume que el formato del archivo de entrada es \s-1UTF\-16BE.\s0 -.Sp -Esta opción funciona igual que la opción \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v, \-\-verbose\fR" 4 -.IX Item "-v, --verbose" -Mostrar mensajes detallados. Se muestra información extra acerca de Marcas -de Orden de Bytes (\s-1BOM\s0) y el número de saltos de línea convertidos. -.IP "\fB\-F, \-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -Sigue los enlaces simbólicos y convierte los destinos. -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Reemplaza los enlaces simbólicos con los archivos convertidos (los archivos -destino originales no se alteran). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -No altera los enlaces simbólicos ni sus destinos (por defecto). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -Despiega la información de la versión y termina el programa. -.SH "MODO MAC" -.IX Header "MODO MAC" -En modo normal los saltos de línea son convertidos de \s-1DOS\s0 a Unix y -viceversa. Los saltos de línea Mac no son convertidos. -.PP -En modo Mac los saltos de línea son convertidos de Mac a Unix y -viceversa. Los saltos de línea \s-1DOS\s0 no son modificados. -.PP -Para ejecutar en modo Mac use el modificador \f(CW\*(C`\-c mac\*(C'\fR o use los comandos -\&\f(CW\*(C`mac2unix\*(C'\fR o \f(CW\*(C`unix2mac\*(C'\fR. -.SH "MODOS DE CONVERSIÓN" -.IX Header "MODOS DE CONVERSIÓN" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -En modo \f(CW\*(C`ascii\*(C'\fR sólo los saltos de línea son convertidos. Éste es el modo -de conversión por defecto. -.Sp -Aunque el nombre de este modo es \s-1ASCII,\s0 que es un estándar de 7 bits, éste -emplea 8 bits. Siempre use este modo cuando convierta archivos Unicode -\&\s-1UTF\-8.\s0 -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -En este modo todos los caracteres no \s-1ASCII\s0 de 8 bits (con valores de 128 a -255) son convertidos al espacio de 7 bits. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Los caracteres son convertidos entre un conjunto de caracteres \s-1DOS \s0(página -de códigos) y el conjunto de caracteres \s-1ISO\-8859\-1 \s0(Latín\-1) de Unix. Los -caracteres \s-1DOS\s0 sin equivalente \s-1ISO\-8859\-1,\s0 para los cuales la conversión es -imposible, son convertidos en un punto. Lo mismo se aplica para caracteres -\&\s-1ISO\-8859\-1\s0 sin contraparte \s-1DOS.\s0 -.Sp -Cuando sólo se emplea el parámetro \f(CW\*(C`\-iso\*(C'\fR, dos2unix intentará determinar la -página de códigos activa. Cuando esto no sea posible, dos2unix utilizará la -página de códigos 437 por defecto, la cual es empleada principalmente en -\&\s-1EE. UU.\s0 Para forzar una página de códigos específica emplee los parámetros -\&\f(CW\*(C`\-437\*(C'\fR (\s-1EE. UU.\s0), \f(CW\*(C`\-850\*(C'\fR (Europa Occidental), \f(CW\*(C`\-860\*(C'\fR (Portugués), \f(CW\*(C`\-863\*(C'\fR -(Francocanadiense), o \f(CW\*(C`\-865\*(C'\fR (Nórdico). La página de códigos Windows 1252 -(Europa Occidental) también está soportada con el parámetro \f(CW\*(C`\-1252\*(C'\fR. Para -acceder a otras páginas de códigos use dos2unix en combinación con -\&\fIiconv\fR\|(1). Iconv puede convertir entre una larga lista de codificaciones de -caracteres. -.Sp -No use la conversión \s-1ISO\s0 en archivos de texto Unicode. Esto corrompería los -archivos codificados como \s-1UTF\-8.\s0 -.Sp -Algunos ejemplos: -.Sp -Convierte de la página de códigos por defecto de \s-1DOS\s0 a Latín\-1 de Unix: -.Sp -.Vb 1 -\& dos2unix \-iso \-n in.txt out.txt -.Ve -.Sp -Convierte de \s-1DOS CP850\s0 a Unix Latín\-1: -.Sp -.Vb 1 -\& dos2unix \-850 \-n in.txt out.txt -.Ve -.Sp -Convierte de Windows \s-1CP1252\s0 a Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n in.txt out.txt -.Ve -.Sp -Convierte de Windows \s-1CP1252\s0 a Unix \s-1UTF\-8 \s0(Unicode). -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 in.txt | dos2unix > out.txt -.Ve -.Sp -Convierte de Unix Latin\-1 a la página de códigos por defecto de \s-1DOS:\s0 -.Sp -.Vb 1 -\& unix2dos \-iso \-n in.txt out.txt -.Ve -.Sp -Convierte de Unix Latin\-1 a \s-1DOS CP850:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n in.txt out.txt -.Ve -.Sp -Convierte de Unix Latin\-1 a Windows \s-1CP1252.\s0 -.Sp -.Vb 1 -\& unix2dos \-1252 \-n in.txt out.txt -.Ve -.Sp -Convierte de Unix \s-1UTF\-8 \s0(Unicode) a Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t CP1252 > out.txt -.Ve -.Sp -Véase también y -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Codificaciones" -.IX Subsection "Codificaciones" -Existen diferentes codificaciones Unicode. En Unix y Linux los archivos -Unicode son codificados comúnmente en \s-1UTF\-8.\s0 En Windows los archivos de -texto Unicode pueden estar codificados en \s-1UTF\-8, UTF\-16,\s0 o \s-1UTF\-16\s0 big -endian, pero en general son codificados en formato \s-1UTF\-16.\s0 -.SS "Conversion" -.IX Subsection "Conversion" -Los archivos de texto Unicode pueden tener saltos de línea \s-1DOS,\s0 Unix o Mac, -como cualquier archivo de texto. -.PP -Todas las versiones de dos2unix y unix2dos pueden convertir archivos -codificados como \s-1UTF\-8,\s0 debido a que \s-1UTF\-8\s0 fue diseñado para -retro-compatibilidad con \s-1ASCII.\s0 -.PP -Dos2unix y unix2dos con soporte Unicode \s-1UTF\-16,\s0 pueden leer archivos de -texto codificados como \s-1UTF\-16\s0 little y big endian. Para ver si dos2unix fue -compilado con soporte \s-1UTF\-16\s0 escriba \f(CW\*(C`dos2unix \-V\*(C'\fR. -.PP -En Unix/Linux los archivos codificados con \s-1UTF\-16\s0 se convierten a la -codificación de caracteres local. Use el comando \fIlocale\fR\|(1) para averiguar la -codificación de caracteres local. Cuando no se puede hacer la conversión se -obtendrá un error de conversión y se omitirá el archivo. -.PP -En Windows los archivos \s-1UTF\-16\s0 se convierten por defecto a \s-1UTF\-8.\s0 Los -archivos de texto forrajeados con \s-1UTF\-8\s0 están soportados tanto en Windows -como en Unix/Linux. -.PP -Las codificaciones \s-1UTF\-16\s0 y \s-1UTF\-8\s0 son totalmente compatibles, no se perderá -ningún texto en la conversión. Cuando ocurre un error de conversión de -\&\s-1UTF\-16\s0 a \s-1UTF\-8,\s0 por ejemplo cuando el archivo de entrada \s-1UTF\-16\s0 contiene un -error, se omitirá el archivo. -.PP -Cuando se usa la opción \f(CW\*(C`\-u\*(C'\fR, el archivo de salida se escribirá en la misma -codificación \s-1UTF\-16\s0 que el archivo de entrada. La opción \f(CW\*(C`\-u\*(C'\fR previene la -conversión a \s-1UTF\-8.\s0 -.PP -Dos2unix y unix2dos no tienen la opción de convertir archivos \s-1UTF\-8\s0 a -\&\s-1UTF\-16.\s0 -.PP -La conversión en modos \s-1ISO\s0 y 7\-bit no funciona en archivos \s-1UTF\-16.\s0 -.SS "Marca de orden de bytes" -.IX Subsection "Marca de orden de bytes" -En Windows los archivos de texto Unicode típicamente tienen una Marca de -Orden de Bytes (\s-1BOM\s0), debido a que muchos programas de Windows (incluyendo -el Bloc de Notas) añaden una \s-1BOM\s0 por defecto. Véase también -. -.PP -En Unix los archivos Unicode no suelen tener \s-1BOM.\s0 Se supone que los archivos -de texto son codificados en la codificación local de caracteres. -.PP -Dos2unix sólo puede detectar si un archivo está en formato \s-1UTF\-16\s0 si el -archivo tiene una \s-1BOM.\s0 Cuando un archivo \s-1UTF\-16\s0 no tiene una \s-1BOM,\s0 dos2unix -tratará el archivo como un archivo binario. -.PP -Use la opción \f(CW\*(C`\-ul\*(C'\fR o \f(CW\*(C`\-ub\*(C'\fR para convertir un archivo \s-1UTF\-16\s0 sin \s-1BOM.\s0 -.PP -Dos2Unix, por defecto, no escribe \s-1BOM\s0 en el archivo de salida. Con la opción -\&\f(CW\*(C`\-b\*(C'\fR Dos2unix escribe el \s-1BOM\s0 cuando el archivo de entrada tiene \s-1BOM.\s0 -.PP -Unix2dos escribe \s-1BOM\s0 en el archivo de salida cuando el archivo de entrada -tiene \s-1BOM.\s0 Use la opción \f(CW\*(C`\-r\*(C'\fR para eliminar la \s-1BOM.\s0 -.PP -Dos2unix y unix2dos escriben siempre \s-1BOM\s0 cuando se usa la opción \f(CW\*(C`\-m\*(C'\fR. -.SS "Ejemplos Unicode" -.IX Subsection "Ejemplos Unicode" -Convertir de Windows \s-1UTF\-16 \s0(con una \s-1BOM\s0) a Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-n in.txt out.txt -.Ve -.PP -Convertir de Windows \s-1UTF\-16LE \s0(sin una \s-1BOM\s0) a Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-ul \-n in.txt out.txt -.Ve -.PP -Convertir de Unix \s-1UTF\-8\s0 a Windows \s-1UTF\-8\s0 sin una \s-1BOM:\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n in.txt out.txt -.Ve -.PP -Convertir de Unix \s-1UTF\-8\s0 a Windows \s-1UTF\-16:\s0 -.PP -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t UTF\-16 > out.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 es un estándar del gobierno chino. Todo producto software vendido en -China está obligado por ley a contener un subconjunto del \s-1GB18030\s0 -estándar. Véase . -.PP -\&\s-1GB18030\s0 es totalmente compatible con Unicode y puede considerarse como -formato de transformación Unicode. Como ocurre con \s-1UTF\-8, GB18030\s0 es -compatible con \s-1ASCII. GB18030\s0 también es compatible con la página de códigos -de Windows 936, también conocida como \s-1GBK.\s0 -.PP -En Unix/Linux los archivos \s-1UTF\-16\s0 se convierten a \s-1GB18030\s0 cuando la -codificación local se establece en \s-1GB18030.\s0 Tenga en cuenta que esto sólo -funcionará si se establece la ubicación en China. Por ejemplo en una -configuración local English British la conversión \f(CW\*(C`en_GB.GB18030\*(C'\fR de \s-1UTF\-16\s0 -a \s-1GB18030\s0 no funcionará, pero en una configuración local China -\&\f(CW\*(C`zh_CN.GB18030\*(C'\fR sí lo hará. -.PP -Use la opción \f(CW\*(C`\-ul\*(C'\fR o \f(CW\*(C`\-ub\*(C'\fR para convertir un archivo \s-1UTF\-16\s0 sin \s-1BOM.\s0 -.PP -Los archivos codificados como \s-1GB18030\s0 pueden tener una Marca de Orden de -Bytes, como ocurre con los archivos Unicode. -.SH "EJEMPLOS" -.IX Header "EJEMPLOS" -Lee la entrada desde 'stdin' y escribe la salida a 'stdout': -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Convierte y reemplaza a.txt. Convierte y reemplaza b.txt: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Convierte y reemplaza a.txt empleando modo de conversión ascii: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Convierte y reemplaza a.txt empleando modo de conversión ascii, convierte y -reemplaza b.txt empleando modo de conversión de 7bits: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Convierte a.txt del formato de Mac a Unix: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Convierte a.txt del formato de Unix a Mac: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Convierte y reemplaza a.txt manteniendo la fecha del archivo original: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Convierte a.txt y escribe la salida en e.txt: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Convierte a.txt y escribe la salida en e.txt, manteniendo la fecha de e.txt -igual a la de a.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Convierte y reemplaza a.txt, convierte b.txt y escribe en e.txt: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Convierte c.txt y escribe en e.txt, convierte y reemplaza a.txt, convierte y -reemplaza b.txt, convierte d.txt y escribe en f.txt: -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "CONVERSIÓN RECURSIVA" -.IX Header "CONVERSIÓN RECURSIVA" -Use dos2unix en combinación con los comandos \fIfind\fR\|(1) y \fIxargs\fR\|(1) para -convertir recursivamente archivos de texto contenidos en un árbol de -directorios. Por ejemplo para convertir todos los archivos .txt en el árbol -de directorios debajo del directorio actual escriba: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "INTERNACIONALIZACIÓN" -.IX Header "INTERNACIONALIZACIÓN" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -El idioma principal se selecciona con la variable de entorno \s-1LANG.\s0 La -variable \s-1LANG\s0 consiste de varias partes. La primer parte es el código del -idioma en minúsculas. La segunda es opcional y es el código del país en -mayúsculas, precedido por un guión bajo. Existe también una tercera parte -opcional: la codificación de caracteres, precedida por un punto. Unos -cuantos ejemplos para intérpretes de comandos tipo \s-1POSIX\s0 estándar: -.Sp -.Vb 7 -\& export LANG=nl Neerlandés -\& export LANG=nl_NL Neerlandés, Países Bajos -\& export LANG=nl_BE Neerlandés, Bélgica -\& export LANG=es_ES Español, España -\& export LANG=es_MX Español, México -\& export LANG=en_US.iso88591 Ingles, EE. UU., codificación Latín\-1 -\& export LANG=en_GB.UTF\-8 Ingles, Reino Unido, codificación UTF\-8 -.Ve -.Sp -Para obtener una lista completa de códigos de idioma y país véase el manual -de gettext: - -.Sp -En sistemas Unix puede emplear el comando \fIlocale\fR\|(1) para obtener información -específica de locale. -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -Con la variable de entorno \s-1LANGUAGE\s0 puede especificar una lista de prioridad -de los idiomas, separados por dos puntos. Dos2unix da preferencia a \s-1LANGUAGE\s0 -sobre \s-1LANG.\s0 Por ejemplo, primero neerlandés y entonces alemán: -\&\f(CW\*(C`LANGUAGE=nl:de\*(C'\fR. Para usar una lista de prioridad de idiomas a través de -la variable \s-1LANGUAGE\s0 tiene que habilitar antes la internacionalización, -asignando un valor distinto de \*(L"C\*(R" a \s-1LANG \s0(o \s-1LC_ALL\s0). Véase también el -manual de gettext: - -.Sp -Si selecciona un idioma que no está disponible el programa funcionará en -ingles. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Con la variable de entorno \s-1DOS2UNIX_LOCALEDIR\s0 el \s-1LOCALEDIR\s0 asignado durante -la compilación puede ser modificado. \s-1LOCALEDIR\s0 es usado para encontrar los -archivos de idioma. El valor por defecto de \s-1GNU\s0 es -\&\f(CW\*(C`/usr/local/share/locale\*(C'\fR. El parámetro \fB\-\-version\fR mostrará el \s-1LOCALEDIR\s0 -en uso. -.Sp -Ejemplo (intérprete de comandos \s-1POSIX\s0): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "VALOR DE RETORNO" -.IX Header "VALOR DE RETORNO" -Se regresa cero cuando el programa termina exitosamente. Cuando ocurre un -error del sistema se regresará el último número de error del sistema. Para -otros errores se regresa 1. -.PP -El valor de retorno es siempre cero en modo silencioso, excepto cuando se -emplean parámetros incorrectos. -.SH "ESTÁNDARES" -.IX Header "ESTÁNDARES" - -.PP - -.PP - -.PP - -.SH "AUTORES" -.IX Header "AUTORES" -Benjamin Lin \- , Bernd Johannes Wuebben (mac2unix -mode) \- , Christian Wurll (add extra newline) \- -, Erwin Waterlander \- (maintainer) -.PP -Página del proyecto: -.PP -Página de SourceForge: -.SH "VÉASE TAMBIÉN" -.IX Header "VÉASE TAMBIÉN" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/es/man1/unix2mac.1 b/Tools/dos2unix/share/man/es/man1/unix2mac.1 deleted file mode 100644 index d820f9f..0000000 --- a/Tools/dos2unix/share/man/es/man1/unix2mac.1 +++ /dev/null @@ -1,764 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NOMBRE" -.IX Header "NOMBRE" -dos2unix \- Convertidor de archivos de texto de formato DOS/Mac a Unix y -viceversa -.SH "SINOPSIS" -.IX Header "SINOPSIS" -.Vb 2 -\& dos2unix [parámetros] [ARCHIVO ...] [\-n ARCHIVO_DE_ENTRADA ARCHIVO_DE_SALIDA ...] -\& unix2dos [parámetros] [ARCHIVO ...] [\-n ARCHIVO_DE_ENTRADA ARCHIVO_DE_SALIDA ...] -.Ve -.SH "DESCRIPCIÓN" -.IX Header "DESCRIPCIÓN" -El paquete Dos2unix incluye las herramientas \f(CW\*(C`dos2unix\*(C'\fR y \f(CW\*(C`unix2dos\*(C'\fR para -convertir archivos de texto plano en formato \s-1DOS\s0 o Mac a formato Unix y -viceversa. -.PP -En archivos de texto DOS/Windows, un salto de línea, también conocido como -nueva línea, es una combinación de dos caracteres: un retorno de carro (\s-1CR\s0) -seguido por un salto de línea (\s-1LF\s0). En archivos de texto Unix, un salto de -línea es solamente un carácter: el salto de línea (\s-1LF\s0). En archivos de texto -Mac, antes de Mac \s-1OS X,\s0 un salto de línea era sólo un carácter retorno de -carro (\s-1CR\s0). Actualmente, Mac \s-1OS\s0 usa el estilo Unix de saltos de línea (\s-1LF\s0). -.PP -Además de saltos de línea, Dos2unix puede también convertir la codificación -de archivos. Unas cuantas páginas de códigos \s-1DOS\s0 pueden ser convertidas a -Unix Latin\-1. Y archivos Unicode de Windows (\s-1UTF\-16\s0) pueden ser convertidos -a archivos Unicode de Unix (\s-1UTF\-8\s0). -.PP -Los archivos binarios son ignorados automáticamente, a menos que se fuerce -su conversión. -.PP -Los archivos no regulares, tales como directorios y \s-1FIFO,\s0 son ignorados -automáticamente. -.PP -Los enlaces simbólicos y sus destinos no son modificados por defecto. Los -enlaces simbólicos pueden opcionalmente ser reemplazados, o la salida puede -ser escrita al destino simbólico del enlace. En Windows no está soportada la -escritura a enlaces simbólicos. -.PP -Dos2unix fue modelado después de dos2unix bajo SunOS/Solaris. Hay una -importante diferencia respecto a la versión original SunOS/Solaris. Esta -versión hace, por defecto, la conversión en el mismo archivo (modo de -archivo antiguo), mientras que la versión original de SunOS/Solaris sólo es -compatible con la conversión en archivo emparejado (modo de archivo -nuevo). Véanse las opciones \f(CW\*(C`\-o\*(C'\fR y \f(CW\*(C`\-n\*(C'\fR. -.SH "PARÁMETROS" -.IX Header "PARÁMETROS" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Todos los parámetros siguientes son tratados como nombres de archivo. Use -este parámetro si desea convertir archivos cuyos nombres inician con un -guión. Por ejemplo para convertir un archivoo llamado \*(L"\-foo\*(R", use este -comando: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -O en modo de archivo nuevo: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo out.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Sólo convierte los salto de línea. Éste es el modo de conversión por -defecto. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Conversión entre el conjunto de caracteres \s-1DOS\s0 e \s-1ISO\-8859\-1.\s0 Véase también -la sección \s-1MODOS DE\s0 CONVERSIÓN. -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Usa la página de códigos Windows 1252 (Europa Occidental). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -Usa la página de códigos \s-1DOS 437 \s0(\s-1EE. UU.\s0). Está es la página de códigos -usada por defecto para conversión \s-1ISO.\s0 -.IP "\fB\-850\fR" 4 -.IX Item "-850" -Usa la página de códigos \s-1DOS 850 \s0(Europa Occidental). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -Usa la página de códigos \s-1DOS 860 \s0(Portugués). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -Usa la página de códigos \s-1DOS 863 \s0(Francocanadiense). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -Usa la página de códigos \s-1DOS 865 \s0(Nórdico). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Convierte caracteres de 8 bits al espacio de 7 bits. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Mantiene la Marca de Orden de Byte (\s-1BOM\s0). Cuando el archivo de entrada -tiene \s-1BOM,\s0 escribe \s-1BOM\s0 en el archivo de salida. Este es el comportamiento -por defecto en la conversión a saltos de línea \s-1DOS.\s0 Vea también la opción -\&\f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode \s-1CONVMODE\s0\fR" 4 -.IX Item "-c, --convmode CONVMODE" -Establece el modo de conversión, Donde \s-1CONVMODE\s0 puede ser: \fIascii\fR, -\&\fI7bit\fR, \fIiso\fR, \fImac\fR siendo ascii el valor por defecto. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -Fuerza la conversión de archivos binarios. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -En Windows los archivos \s-1UTF\-16\s0 se convierten por defecto a \s-1UTF\-8,\s0 sin tener -en cuenta la configuración local. Use esta opción para convertir archivos -\&\s-1UTF\-16\s0 a \s-1GB18030.\s0 Esta opción sólo está disponible en Windows.l Véase -también la sección \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -Despiega la ayuda y termina el programa. -.IP "\fB\-i[\s-1MARCAS\s0], \-\-info[= \s-1MARCAS\s0] \s-1ARCHIVO ...\s0\fR" 4 -.IX Item "-i[MARCAS], --info[= MARCAS] ARCHIVO ..." -Muestra la información del archivo. No se realiza ninguna conversión. -.Sp -Se muestra la siguiente información, en este orden: número de saltos de -línea \s-1DOS,\s0 número de saltos de línea Unix, número de saltos de línea Mac, -Marca de Orden de Byte, de texto o binario, nombre del archivo. -.Sp -Ejemplo de salida: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Se pueden utilizar marcas extras opcionales para modificar la salida. Se -pueden añadir una o más marcas. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Muestra el número de saltos de línea \s-1DOS.\s0 -.IP "\fBu\fR" 4 -.IX Item "u" -Muestra el número de saltos de línea Unix. -.IP "\fBm\fR" 4 -.IX Item "m" -Muestra el número de saltos de línea Mac. -.IP "\fBb\fR" 4 -.IX Item "b" -Muestra la Marca de Orden de Byte. -.IP "\fBt\fR" 4 -.IX Item "t" -Muestra si el archivo es de texto o binario. -.IP "\fBc\fR" 4 -.IX Item "c" -Muestra sólo los archivos que pueden ser convertidos. -.Sp -Con la marca \f(CW\*(C`c\*(C'\fR dos2unix sólo mostrará los archivos que contengan saltos -de línea \s-1DOS,\s0 unix2dos sólo mostrará los nombres de archivo que tengan -saltos de línea Unix. -.RE -.RS 4 -.Sp -Ejemplos: -.Sp -Muestra información para todos los archivos *.txt: -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Muestra sólo el número de saltos de línea de \s-1DOS\s0 y de Unix: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Muestra sólo la Marca de Orden de Byte. -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -Muestra los archivos que tienen saltos de línea \s-1DOS:\s0 -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -Muestra los archivos que tienen saltos de línea Unix: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -Mantiene la fecha del archivo de salida igual a la del archivo de entrada. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -Muestra la licencia del programa. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -Añade salto de línea adicional. -.Sp -\&\fBdos2unix\fR: Sólo los saltos de línea \s-1DOS\s0 son cambiados por dos saltos de -línea Unix. En modo Mac sólo los saltos de línea Mac son cambiados por dos -saltos de línea Unix. -.Sp -\&\fBunix2dos\fR: Sólo los saltos de línea Unix son cambiados por dos saltos de -línea \s-1DOS.\s0 En modo Mac los saltos de línea Unix son cambiados por dos saltos -de línea Mac. -.IP "\fB\-m, \-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -Escribe una Marca de Orden de Bytes (\s-1BOM\s0) en el archivo de salida. Por -defecto se escribe una \s-1BOM UTF\-8.\s0 -.Sp -Cuando el archivo de entrada es \s-1UTF\-16\s0 y se usa la opción \f(CW\*(C`\-u\*(C'\fR, se -escribirá un \s-1BOM UTF\-16.\s0 -.Sp -No utilice esta opción cuando la codificación de salida sea distinta de -\&\s-1UTF\-8\s0 o \s-1UTF\-16.\s0 Véase también la sección \s-1UNICODE.\s0 -.IP "\fB\-n, \-\-newfile \s-1ARCHIVO_DE_ENTRADA ARCHIVO_DE_SALIDA ...\s0\fR" 4 -.IX Item "-n, --newfile ARCHIVO_DE_ENTRADA ARCHIVO_DE_SALIDA ..." -Modo de archivo nuevo. Convierte el archivo \s-1ARCHIVO_DE_ENTRADA\s0 y escribe la -salida al archivo \s-1ARCHIVO_DE_SALIDA.\s0 Los nombres de archivo deben ser dados -en pares y los comodines \fIno\fR deben ser usados o \fIperderá\fR sus archivos. -.Sp -La persona que inicia la conversión en el modo de archivo nuevo (emparejado) -será el propietario del archivo convertido. Los permisos de -lectura/escritura del archivo nuevo serán los permisos del archivo original -menos la \fIumask\fR\|(1) de la persona que ejecute la conversión. -.IP "\fB\-o, \-\-oldfile \s-1ARCHIVO ...\s0\fR" 4 -.IX Item "-o, --oldfile ARCHIVO ..." -Modo de archivo antiguo. Convierte el archivo \s-1ARCHIVO\s0 y lo sobrescribe con -la salida. El programa por defecto se ejecuta en este modo. Se pueden -emplear comodines. -.Sp -En modo de archivo antiguo (in situ), el archivo convertido tiene el mismo -propietario, grupo y permisos de lectura/escritura que el archivo original. -Lo mismo aplica cuando el archivo es convertido por otro usuario que tiene -permiso de lectura en el archivo (p.e. usuario root). La conversión será -abortada cuando no sea posible preservar los valores originales. Cambiar el -propietario implicaría que el propietario original ya no podrá leer el -archivo. Cambiar el grupo podría ser un riesgo de seguridad, ya que el -archivo podría ser accesible a personas inadecuadas. La preservación del -propietario, grupo, y permisos de lectura/escritura sólo está soportada bajo -Unix. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Modo silencioso. Suprime todas las advertencias y mensajes. El valor -retornado es cero. Excepto cuando se emplean parámetros incorrectos. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -Elimina la Marca de Orden de Byte (\s-1BOM\s0). No escribe el \s-1BOM\s0 en el archivo de -salida. Este es el comportamiento por defecto al convertir a saltos de línea -Unix. Vea también la opción \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s, \-\-safe\fR" 4 -.IX Item "-s, --safe" -Ignora los archivos binarios (por defecto). -.IP "\fB\-u, \-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -Mantiene la codificación original \s-1UTF\-16\s0 en el archivo de entrada. El -archivo de salida se escribirá con la misma codificación \s-1UTF\-16,\s0 little o -big endian, como el archivo de entrada. Esto impide la transformación a -\&\s-1UTF\-8.\s0 En consecuencia se escribirá un \s-1BOM UTF\-16.\s0 Esta opción se puede -desactivar con la opción \f(CW\*(C`\-ascii\*(C'\fR. -.IP "\fB\-ul, \-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -Se asume que el formato de archivo de entrada es \s-1UTF\-16LE.\s0 -.Sp -Cuando existe una Marca de Orden de Bytes (\s-1BOM\s0) en el archivo de entrada, la -\&\s-1BOM\s0 tiene prioridad sobre esta opción. -.Sp -Cuando se hace una suposición incorrecta (el archivo de entrada no estaba en -formato \s-1UTF\-16LE\s0) y la conversión tiene éxito, obtendrá un archivo \s-1UTF\-8\s0 de -salida con el texto erróneo. La conversión errónea puede deshacerse con -\&\fIiconv\fR\|(1) convirtiendo el archivo \s-1UTF\-8\s0 de salida de vuelta a \s-1UTF\-16LE.\s0 Esto -restaurará el archivo original. -.Sp -El supuesto de \s-1UTF\-16LE\s0 funciona como un \fImodo de conversión\fR. Al cambiar -al modo por defecto \fIascii\fR el supuesto \s-1UTF\-16LE\s0 es deshabilitado. -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -Se asume que el formato del archivo de entrada es \s-1UTF\-16BE.\s0 -.Sp -Esta opción funciona igual que la opción \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v, \-\-verbose\fR" 4 -.IX Item "-v, --verbose" -Mostrar mensajes detallados. Se muestra información extra acerca de Marcas -de Orden de Bytes (\s-1BOM\s0) y el número de saltos de línea convertidos. -.IP "\fB\-F, \-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -Sigue los enlaces simbólicos y convierte los destinos. -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Reemplaza los enlaces simbólicos con los archivos convertidos (los archivos -destino originales no se alteran). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -No altera los enlaces simbólicos ni sus destinos (por defecto). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -Despiega la información de la versión y termina el programa. -.SH "MODO MAC" -.IX Header "MODO MAC" -En modo normal los saltos de línea son convertidos de \s-1DOS\s0 a Unix y -viceversa. Los saltos de línea Mac no son convertidos. -.PP -En modo Mac los saltos de línea son convertidos de Mac a Unix y -viceversa. Los saltos de línea \s-1DOS\s0 no son modificados. -.PP -Para ejecutar en modo Mac use el modificador \f(CW\*(C`\-c mac\*(C'\fR o use los comandos -\&\f(CW\*(C`mac2unix\*(C'\fR o \f(CW\*(C`unix2mac\*(C'\fR. -.SH "MODOS DE CONVERSIÓN" -.IX Header "MODOS DE CONVERSIÓN" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -En modo \f(CW\*(C`ascii\*(C'\fR sólo los saltos de línea son convertidos. Éste es el modo -de conversión por defecto. -.Sp -Aunque el nombre de este modo es \s-1ASCII,\s0 que es un estándar de 7 bits, éste -emplea 8 bits. Siempre use este modo cuando convierta archivos Unicode -\&\s-1UTF\-8.\s0 -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -En este modo todos los caracteres no \s-1ASCII\s0 de 8 bits (con valores de 128 a -255) son convertidos al espacio de 7 bits. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Los caracteres son convertidos entre un conjunto de caracteres \s-1DOS \s0(página -de códigos) y el conjunto de caracteres \s-1ISO\-8859\-1 \s0(Latín\-1) de Unix. Los -caracteres \s-1DOS\s0 sin equivalente \s-1ISO\-8859\-1,\s0 para los cuales la conversión es -imposible, son convertidos en un punto. Lo mismo se aplica para caracteres -\&\s-1ISO\-8859\-1\s0 sin contraparte \s-1DOS.\s0 -.Sp -Cuando sólo se emplea el parámetro \f(CW\*(C`\-iso\*(C'\fR, dos2unix intentará determinar la -página de códigos activa. Cuando esto no sea posible, dos2unix utilizará la -página de códigos 437 por defecto, la cual es empleada principalmente en -\&\s-1EE. UU.\s0 Para forzar una página de códigos específica emplee los parámetros -\&\f(CW\*(C`\-437\*(C'\fR (\s-1EE. UU.\s0), \f(CW\*(C`\-850\*(C'\fR (Europa Occidental), \f(CW\*(C`\-860\*(C'\fR (Portugués), \f(CW\*(C`\-863\*(C'\fR -(Francocanadiense), o \f(CW\*(C`\-865\*(C'\fR (Nórdico). La página de códigos Windows 1252 -(Europa Occidental) también está soportada con el parámetro \f(CW\*(C`\-1252\*(C'\fR. Para -acceder a otras páginas de códigos use dos2unix en combinación con -\&\fIiconv\fR\|(1). Iconv puede convertir entre una larga lista de codificaciones de -caracteres. -.Sp -No use la conversión \s-1ISO\s0 en archivos de texto Unicode. Esto corrompería los -archivos codificados como \s-1UTF\-8.\s0 -.Sp -Algunos ejemplos: -.Sp -Convierte de la página de códigos por defecto de \s-1DOS\s0 a Latín\-1 de Unix: -.Sp -.Vb 1 -\& dos2unix \-iso \-n in.txt out.txt -.Ve -.Sp -Convierte de \s-1DOS CP850\s0 a Unix Latín\-1: -.Sp -.Vb 1 -\& dos2unix \-850 \-n in.txt out.txt -.Ve -.Sp -Convierte de Windows \s-1CP1252\s0 a Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n in.txt out.txt -.Ve -.Sp -Convierte de Windows \s-1CP1252\s0 a Unix \s-1UTF\-8 \s0(Unicode). -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 in.txt | dos2unix > out.txt -.Ve -.Sp -Convierte de Unix Latin\-1 a la página de códigos por defecto de \s-1DOS:\s0 -.Sp -.Vb 1 -\& unix2dos \-iso \-n in.txt out.txt -.Ve -.Sp -Convierte de Unix Latin\-1 a \s-1DOS CP850:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n in.txt out.txt -.Ve -.Sp -Convierte de Unix Latin\-1 a Windows \s-1CP1252.\s0 -.Sp -.Vb 1 -\& unix2dos \-1252 \-n in.txt out.txt -.Ve -.Sp -Convierte de Unix \s-1UTF\-8 \s0(Unicode) a Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t CP1252 > out.txt -.Ve -.Sp -Véase también y -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Codificaciones" -.IX Subsection "Codificaciones" -Existen diferentes codificaciones Unicode. En Unix y Linux los archivos -Unicode son codificados comúnmente en \s-1UTF\-8.\s0 En Windows los archivos de -texto Unicode pueden estar codificados en \s-1UTF\-8, UTF\-16,\s0 o \s-1UTF\-16\s0 big -endian, pero en general son codificados en formato \s-1UTF\-16.\s0 -.SS "Conversion" -.IX Subsection "Conversion" -Los archivos de texto Unicode pueden tener saltos de línea \s-1DOS,\s0 Unix o Mac, -como cualquier archivo de texto. -.PP -Todas las versiones de dos2unix y unix2dos pueden convertir archivos -codificados como \s-1UTF\-8,\s0 debido a que \s-1UTF\-8\s0 fue diseñado para -retro-compatibilidad con \s-1ASCII.\s0 -.PP -Dos2unix y unix2dos con soporte Unicode \s-1UTF\-16,\s0 pueden leer archivos de -texto codificados como \s-1UTF\-16\s0 little y big endian. Para ver si dos2unix fue -compilado con soporte \s-1UTF\-16\s0 escriba \f(CW\*(C`dos2unix \-V\*(C'\fR. -.PP -En Unix/Linux los archivos codificados con \s-1UTF\-16\s0 se convierten a la -codificación de caracteres local. Use el comando \fIlocale\fR\|(1) para averiguar la -codificación de caracteres local. Cuando no se puede hacer la conversión se -obtendrá un error de conversión y se omitirá el archivo. -.PP -En Windows los archivos \s-1UTF\-16\s0 se convierten por defecto a \s-1UTF\-8.\s0 Los -archivos de texto forrajeados con \s-1UTF\-8\s0 están soportados tanto en Windows -como en Unix/Linux. -.PP -Las codificaciones \s-1UTF\-16\s0 y \s-1UTF\-8\s0 son totalmente compatibles, no se perderá -ningún texto en la conversión. Cuando ocurre un error de conversión de -\&\s-1UTF\-16\s0 a \s-1UTF\-8,\s0 por ejemplo cuando el archivo de entrada \s-1UTF\-16\s0 contiene un -error, se omitirá el archivo. -.PP -Cuando se usa la opción \f(CW\*(C`\-u\*(C'\fR, el archivo de salida se escribirá en la misma -codificación \s-1UTF\-16\s0 que el archivo de entrada. La opción \f(CW\*(C`\-u\*(C'\fR previene la -conversión a \s-1UTF\-8.\s0 -.PP -Dos2unix y unix2dos no tienen la opción de convertir archivos \s-1UTF\-8\s0 a -\&\s-1UTF\-16.\s0 -.PP -La conversión en modos \s-1ISO\s0 y 7\-bit no funciona en archivos \s-1UTF\-16.\s0 -.SS "Marca de orden de bytes" -.IX Subsection "Marca de orden de bytes" -En Windows los archivos de texto Unicode típicamente tienen una Marca de -Orden de Bytes (\s-1BOM\s0), debido a que muchos programas de Windows (incluyendo -el Bloc de Notas) añaden una \s-1BOM\s0 por defecto. Véase también -. -.PP -En Unix los archivos Unicode no suelen tener \s-1BOM.\s0 Se supone que los archivos -de texto son codificados en la codificación local de caracteres. -.PP -Dos2unix sólo puede detectar si un archivo está en formato \s-1UTF\-16\s0 si el -archivo tiene una \s-1BOM.\s0 Cuando un archivo \s-1UTF\-16\s0 no tiene una \s-1BOM,\s0 dos2unix -tratará el archivo como un archivo binario. -.PP -Use la opción \f(CW\*(C`\-ul\*(C'\fR o \f(CW\*(C`\-ub\*(C'\fR para convertir un archivo \s-1UTF\-16\s0 sin \s-1BOM.\s0 -.PP -Dos2Unix, por defecto, no escribe \s-1BOM\s0 en el archivo de salida. Con la opción -\&\f(CW\*(C`\-b\*(C'\fR Dos2unix escribe el \s-1BOM\s0 cuando el archivo de entrada tiene \s-1BOM.\s0 -.PP -Unix2dos escribe \s-1BOM\s0 en el archivo de salida cuando el archivo de entrada -tiene \s-1BOM.\s0 Use la opción \f(CW\*(C`\-r\*(C'\fR para eliminar la \s-1BOM.\s0 -.PP -Dos2unix y unix2dos escriben siempre \s-1BOM\s0 cuando se usa la opción \f(CW\*(C`\-m\*(C'\fR. -.SS "Ejemplos Unicode" -.IX Subsection "Ejemplos Unicode" -Convertir de Windows \s-1UTF\-16 \s0(con una \s-1BOM\s0) a Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-n in.txt out.txt -.Ve -.PP -Convertir de Windows \s-1UTF\-16LE \s0(sin una \s-1BOM\s0) a Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-ul \-n in.txt out.txt -.Ve -.PP -Convertir de Unix \s-1UTF\-8\s0 a Windows \s-1UTF\-8\s0 sin una \s-1BOM:\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n in.txt out.txt -.Ve -.PP -Convertir de Unix \s-1UTF\-8\s0 a Windows \s-1UTF\-16:\s0 -.PP -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t UTF\-16 > out.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 es un estándar del gobierno chino. Todo producto software vendido en -China está obligado por ley a contener un subconjunto del \s-1GB18030\s0 -estándar. Véase . -.PP -\&\s-1GB18030\s0 es totalmente compatible con Unicode y puede considerarse como -formato de transformación Unicode. Como ocurre con \s-1UTF\-8, GB18030\s0 es -compatible con \s-1ASCII. GB18030\s0 también es compatible con la página de códigos -de Windows 936, también conocida como \s-1GBK.\s0 -.PP -En Unix/Linux los archivos \s-1UTF\-16\s0 se convierten a \s-1GB18030\s0 cuando la -codificación local se establece en \s-1GB18030.\s0 Tenga en cuenta que esto sólo -funcionará si se establece la ubicación en China. Por ejemplo en una -configuración local English British la conversión \f(CW\*(C`en_GB.GB18030\*(C'\fR de \s-1UTF\-16\s0 -a \s-1GB18030\s0 no funcionará, pero en una configuración local China -\&\f(CW\*(C`zh_CN.GB18030\*(C'\fR sí lo hará. -.PP -Use la opción \f(CW\*(C`\-ul\*(C'\fR o \f(CW\*(C`\-ub\*(C'\fR para convertir un archivo \s-1UTF\-16\s0 sin \s-1BOM.\s0 -.PP -Los archivos codificados como \s-1GB18030\s0 pueden tener una Marca de Orden de -Bytes, como ocurre con los archivos Unicode. -.SH "EJEMPLOS" -.IX Header "EJEMPLOS" -Lee la entrada desde 'stdin' y escribe la salida a 'stdout': -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Convierte y reemplaza a.txt. Convierte y reemplaza b.txt: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Convierte y reemplaza a.txt empleando modo de conversión ascii: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Convierte y reemplaza a.txt empleando modo de conversión ascii, convierte y -reemplaza b.txt empleando modo de conversión de 7bits: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Convierte a.txt del formato de Mac a Unix: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Convierte a.txt del formato de Unix a Mac: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Convierte y reemplaza a.txt manteniendo la fecha del archivo original: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Convierte a.txt y escribe la salida en e.txt: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Convierte a.txt y escribe la salida en e.txt, manteniendo la fecha de e.txt -igual a la de a.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Convierte y reemplaza a.txt, convierte b.txt y escribe en e.txt: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Convierte c.txt y escribe en e.txt, convierte y reemplaza a.txt, convierte y -reemplaza b.txt, convierte d.txt y escribe en f.txt: -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "CONVERSIÓN RECURSIVA" -.IX Header "CONVERSIÓN RECURSIVA" -Use dos2unix en combinación con los comandos \fIfind\fR\|(1) y \fIxargs\fR\|(1) para -convertir recursivamente archivos de texto contenidos en un árbol de -directorios. Por ejemplo para convertir todos los archivos .txt en el árbol -de directorios debajo del directorio actual escriba: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "INTERNACIONALIZACIÓN" -.IX Header "INTERNACIONALIZACIÓN" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -El idioma principal se selecciona con la variable de entorno \s-1LANG.\s0 La -variable \s-1LANG\s0 consiste de varias partes. La primer parte es el código del -idioma en minúsculas. La segunda es opcional y es el código del país en -mayúsculas, precedido por un guión bajo. Existe también una tercera parte -opcional: la codificación de caracteres, precedida por un punto. Unos -cuantos ejemplos para intérpretes de comandos tipo \s-1POSIX\s0 estándar: -.Sp -.Vb 7 -\& export LANG=nl Neerlandés -\& export LANG=nl_NL Neerlandés, Países Bajos -\& export LANG=nl_BE Neerlandés, Bélgica -\& export LANG=es_ES Español, España -\& export LANG=es_MX Español, México -\& export LANG=en_US.iso88591 Ingles, EE. UU., codificación Latín\-1 -\& export LANG=en_GB.UTF\-8 Ingles, Reino Unido, codificación UTF\-8 -.Ve -.Sp -Para obtener una lista completa de códigos de idioma y país véase el manual -de gettext: - -.Sp -En sistemas Unix puede emplear el comando \fIlocale\fR\|(1) para obtener información -específica de locale. -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -Con la variable de entorno \s-1LANGUAGE\s0 puede especificar una lista de prioridad -de los idiomas, separados por dos puntos. Dos2unix da preferencia a \s-1LANGUAGE\s0 -sobre \s-1LANG.\s0 Por ejemplo, primero neerlandés y entonces alemán: -\&\f(CW\*(C`LANGUAGE=nl:de\*(C'\fR. Para usar una lista de prioridad de idiomas a través de -la variable \s-1LANGUAGE\s0 tiene que habilitar antes la internacionalización, -asignando un valor distinto de \*(L"C\*(R" a \s-1LANG \s0(o \s-1LC_ALL\s0). Véase también el -manual de gettext: - -.Sp -Si selecciona un idioma que no está disponible el programa funcionará en -ingles. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Con la variable de entorno \s-1DOS2UNIX_LOCALEDIR\s0 el \s-1LOCALEDIR\s0 asignado durante -la compilación puede ser modificado. \s-1LOCALEDIR\s0 es usado para encontrar los -archivos de idioma. El valor por defecto de \s-1GNU\s0 es -\&\f(CW\*(C`/usr/local/share/locale\*(C'\fR. El parámetro \fB\-\-version\fR mostrará el \s-1LOCALEDIR\s0 -en uso. -.Sp -Ejemplo (intérprete de comandos \s-1POSIX\s0): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "VALOR DE RETORNO" -.IX Header "VALOR DE RETORNO" -Se regresa cero cuando el programa termina exitosamente. Cuando ocurre un -error del sistema se regresará el último número de error del sistema. Para -otros errores se regresa 1. -.PP -El valor de retorno es siempre cero en modo silencioso, excepto cuando se -emplean parámetros incorrectos. -.SH "ESTÁNDARES" -.IX Header "ESTÁNDARES" - -.PP - -.PP - -.PP - -.SH "AUTORES" -.IX Header "AUTORES" -Benjamin Lin \- , Bernd Johannes Wuebben (mac2unix -mode) \- , Christian Wurll (add extra newline) \- -, Erwin Waterlander \- (maintainer) -.PP -Página del proyecto: -.PP -Página de SourceForge: -.SH "VÉASE TAMBIÉN" -.IX Header "VÉASE TAMBIÉN" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/fr/man1/dos2unix.1 b/Tools/dos2unix/share/man/fr/man1/dos2unix.1 deleted file mode 100644 index 069326a..0000000 --- a/Tools/dos2unix/share/man/fr/man1/dos2unix.1 +++ /dev/null @@ -1,775 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NOM" -.IX Header "NOM" -dos2unix \- Convertit les fichiers textes du format DOS/Mac vers Unix et -inversement -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -.Vb 2 -\& dos2unix [options] [FICHIER …] [\-n FICHIER_ENTRÉE FICHIER_SORTIE …] -\& unix2dos [options] [FICHIER …] [\-n FICHIER_ENTRÉE FICHIER_SORTIE …] -.Ve -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -Le package Dos2unix inclut les utilitaires \f(CW\*(C`dos2unix\*(C'\fR et \f(CW\*(C`unix2dos\*(C'\fR pour -convertir des fichiers textes au format \s-1DOS\s0 ou Mac vers le format Unix et -inversement. -.PP -Dans les fichiers textes DOS/Windows, un saut de ligne est une combinaison -de deux caractères: un retour de chariot (\s-1CR\s0) suivi d'un saut de ligne -(\s-1LF\s0). Dans les fichiers textes Unix, le saut de ligne est un seul caractère: -le saut de ligne (\s-1LF\s0). Les fichiers textes Mac, avant Mac \s-1OS X,\s0 utilisaient -le retour chariot (\s-1CR\s0) comme seul caractère. De nos jours, Mac \s-1OS\s0 utilise le -même style de saut de ligne que Unix (\s-1LF\s0). -.PP -Outre les sauts de lignes, Dos2unix convertit aussi le codage des -fichiers. Quelques codes page \s-1DOS\s0 peuvent être convertis en Latin\-1 sous -Unix. L'Unicode des fichiers Windows (\s-1UTF\-16\s0) peut être converti en Unicode -Unix (\s-1UTF\-8\s0). -.PP -Les fichiers binaires sont automatiquement ignorés à moins que la conversion -soit forcée. -.PP -Les fichiers non réguliers tels que les répertoires et les FIFOs sont -automatiquement ignorés. -.PP -Les liens symboliques et leur cible sont, par défaut, inchangés. En option, -les liens symboliques peuvent être remplacés ou, au choix, la sortie peut -être écrite dans la cible du lien symbolique. Écrire dans la cible d'un lien -symbolique n'est pas supporté sous Windows. -.PP -Dos2unix a été conçu comme dos2unix sous SunOS/Solaris. Il y a une -différence importante avec la version originale de SunOS/Solaris. Cette -version effectue les conversions en place (ancien mode de fichiers) tandis -que la version originale de SunOS/Solaris ne supporte que la conversion par -paire (nouveau mode de fichier). Voyez aussi les options \f(CW\*(C`\-o\*(C'\fR et \f(CW\*(C`\-n\*(C'\fR. -.SH "OPTIONS" -.IX Header "OPTIONS" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Traites toutes les options à sa suite comme étant des noms de -fichiers. Utilisez cette option si vous voulez convertir des fichiers dont -le nom commence par un tiret. Par exemple, pour convertir un fichier nommé -« \-foo », vous pouvez utiliser cette commande: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -Ou dans le style des nouveaux fichiers: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo sortie.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Convertit uniquement les sauts de lignes. C'est le mode de conversion par -défaut. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Convertit le jeu de caractères du \s-1DOS\s0 vers \s-1ISO\-8859\-1.\s0 Voyez aussi la -section des \s-1MODES DE CONVERSION.\s0 -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Utilise le code page 1252 de Windows (Europe de l'ouest). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -Utilise le code page 437 du \s-1DOS \s0(\s-1US\s0). C'est le code page par défaut pour les -conversions \s-1ISO.\s0 -.IP "\fB\-850\fR" 4 -.IX Item "-850" -Utilise le code page 850 du \s-1DOS \s0(Europe de l'ouest). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -Utilise le code page 860 du \s-1DOS \s0(portugais). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -Utilise le code page 863 du \s-1DOS \s0(français canadien). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -Utilise le code page 865 du \s-1DOS \s0(nordique). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Convertit les caractères 8 bits vers l'espace 7 bits. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Conserve la marque d'ordre des octets (\s-1BOM\s0). Si le fichier d'entrée a une -\&\s-1BOM,\s0 elle est écrite dans le fichier de sortie. C'est le comportement par -défaut quand les sauts de lignes sont convertis au format \s-1DOS.\s0 Consultez -aussi l'option \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode \s-1MODE_CONV\s0\fR" 4 -.IX Item "-c, --convmode MODE_CONV" -Change le mode de conversion. \s-1MODE_CONV\s0 prend l'une des valeurs: \fIascii\fR, -\&\fI7bit\fR, \fIiso\fR, \fImac\fR. Ascii est la valeur par défaut. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -Force la conversion de fichiers binaires. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -Sous Windows, les fichiers \s-1UTF\-16\s0 sont convertis en \s-1UTF\-8\s0 par défaut sans -considération pour les paramètres de la localisation. Utilisez cette option -pour convertir \s-1UTF\-16\s0 en \s-1GB18030.\s0 Cette option n'est disponible que sous -Windows. Consultez aussi la section \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -Affiche l'aide et s'arrête. -.IP "\fB\-i[\s-1FANIONS\s0], \-\-info[=FANIONS] \s-1FICHIER\s0 …\fR" 4 -.IX Item "-i[FANIONS], --info[=FANIONS] FICHIER …" -Affiche les informations du fichier. Aucune conversion n'est réalisée. -.Sp -Les informations suivantes sont affichées dans cet ordre: le nombre de sauts -de ligne \s-1DOS,\s0 le nombre de sauts de ligne Unix, le nombre de sauts de ligne -Mac, la marque d'ordre des octets, texte ou binaire, nom du fichier. -.Sp -Exemple de sortie : -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Des fanions facultatifs peuvent être ajoutés pour changer la sortie. Un ou -plusieurs fanions peuvent être ajoutés. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Affiche le nombre de sauts de ligne \s-1DOS.\s0 -.IP "\fBu\fR" 4 -.IX Item "u" -Affiche le nombre de sauts de ligne Unix. -.IP "\fBm\fR" 4 -.IX Item "m" -Affiche le nombre de sauts de ligne Mac. -.IP "\fBb\fR" 4 -.IX Item "b" -Afficher la marque d'ordre des octets. -.IP "\fBt\fR" 4 -.IX Item "t" -Affiche si le fichier est texte ou binaire. -.IP "\fBc\fR" 4 -.IX Item "c" -Affiche uniquement les fichiers qui seraient convertis. -.Sp -Avec le fanion \f(CW\*(C`c\*(C'\fR, dos2unix n'affichera que les fichiers contenant des -sauts de ligne \s-1DOS\s0 alors que unix2dos n'affichera que les noms des fichiers -aillant des sauts de ligne Unix. -.RE -.RS 4 -.Sp -Exemples: -.Sp -Afficher les informations pour tous les fichier *.txt : -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Afficher uniquement le nombre de sauts de ligne \s-1DOS\s0 et Unix : -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Montrer uniquement la marque d'ordre des octets : -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -Liste les fichiers qui ont des sauts de ligne \s-1DOS :\s0 -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -Liste les fichiers qui ont des sauts de ligne Unix : -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -La date du fichier de sortie est la même que celle du fichier d'entrée. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -Affiche la licence du programme. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -Ajoute des sauts de lignes additionnels. -.Sp -\&\fBdos2unix\fR: Seuls les sauts de lignes du \s-1DOS\s0 sont changés en deux sauts de -lignes de Unix. En mode Mac, seuls les sauts de lignes Mac sont changés en -deux sauts de lignes Unix. -.Sp -\&\fBunix2dos\fR: Seuls les sauts de lignes Unix sont changés en deux sauts de -lignes du \s-1DOS.\s0 En mode Mac, les sauts de lignes Unix sont remplacés par deux -sauts de lignes Mac. -.IP "\fB\-m, \-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -Écrit une marque d'ordre des octets (\s-1BOM\s0) dans le fichier de sortie. Par -défaut une \s-1BOM UTF\-8\s0 est écrite. -.Sp -Lorsque le fichier d'entrée est en \s-1UTF\-16\s0 et que l'option \f(CW\*(C`\-u\*(C'\fR est -utilisée, une \s-1BOM UTF\-16\s0 est écrite. -.Sp -N'utilisez jamais cette option quand l'encodage du fichier de sortie n'est -ni \s-1UTF\-8\s0 ni \s-1UTF\-16.\s0 Consultez également la section \s-1UNICODE.\s0 -.IP "\fB\-n, \-\-newline FICHIER_ENTRÉE \s-1FICHIER_SORTIE\s0 …\fR" 4 -.IX Item "-n, --newline FICHIER_ENTRÉE FICHIER_SORTIE …" -Nouveau mode de fichiers. Convertit le fichier FICHER_ENTRÉE et écrit la -sortie dans le fichier \s-1FICHIER_SORTIE.\s0 Les noms des fichiers doivent être -indiqués par paires. Les jokers \fIne\fR doivent \fIpas\fR être utilisés ou vous -\&\fIperdrez\fR vos fichiers. -.Sp -La personne qui démarre la conversion dans le nouveau mode (pairé) des -fichiers sera le propriétaire du fichier converti. Les permissions de -lecture/écriture du nouveau fichier seront les permissions du fichier -original moins le \fIumask\fR\|(1) de la personne qui exécute la conversion. -.IP "\fB\-o, \-\-oldfile \s-1FICHIER\s0 …\fR" 4 -.IX Item "-o, --oldfile FICHIER …" -Ancien mode de fichiers. Convertit le fichier \s-1FICHIER\s0 et écrit la sortie -dedans. Le programme fonctionne dans ce mode par défaut. Les jokers peuvent -être utilisés. -.Sp -Dans l'ancien mode (en place) des fichiers, les fichiers convertis ont le -même propriétaire, groupe et permissions lecture/écriture que le fichier -original. Idem quand le fichier est converti par un utilisateur qui a la -permission d'écrire dans le fichier (par exemple, root). La conversion est -interrompue si il n'est pas possible de conserver les valeurs d'origine. Le -changement de propriétaire pourrait signifier que le propriétaire original -n'est plus en mesure de lire le fichier. Le changement de groupe pourrait -être un risque pour la sécurité. Le fichier pourrait être rendu accessible -en lecture par des personnes à qui il n'est pas destiné. La conservation du -propriétaire, du groupe et des permissions de lecture/écriture n'est -supportée que sous Unix. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Mode silencieux. Supprime les avertissements et les messages. La valeur de -sortie est zéro sauf quand de mauvaises options sont utilisées sur la ligne -de commande. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -Supprime la marque d'ordre des octets (\s-1BOM\s0). N'écrit pas la \s-1BOM\s0 dans le -fichier de sortie. Ceci est le comportement par défaut lorsque les sauts de -lignes sont convertis au format Unix. Consultez aussi l'option \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s, \-\-safe\fR" 4 -.IX Item "-s, --safe" -Ignore les fichiers binaires (par défaut). -.IP "\fB\-u, \-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -Conserve l'encodage \s-1UTF\-16\s0 original du fichier d'entrée. Le fichier de -sortie sera écrit dans le même encodage \s-1UTF\-16 \s0(petit ou grand boutien) que -le fichier d'entrée. Ceci évite la transformation en \s-1UTF\-8.\s0 Une \s-1BOM UTF\-16\s0 -sera écrite en conséquent. Cette option peut être désactivée avec l'option -\&\f(CW\*(C`\-ascii\*(C'\fR. -.IP "\fB\-ul, \-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -Suppose que le fichier d'entrée est au format \s-1UTF\-16LE.\s0 -.Sp -Quand il y a un indicateur d'ordre des octets dans le fichier d'entrée, -l'indicateur a priorité sur cette option. -.Sp -Si vous vous êtes trompé sur le format du fichier d'entrée (par exemple, ce -n'était pas un fichier \s-1UTF16\-LE\s0) et que la conversion réussi, vous -obtiendrez un fichier \s-1UTF\-8\s0 contenant le mauvais texte. Vous pouvez -récupérer le fichier original avec \fIiconv\fR\|(1) en convertissant le fichier de -sortie \s-1UTF\-8\s0 vers du \s-1UTF\-16LE.\s0 -.Sp -La présupposition de l'\s-1UTF\-16LE\s0 fonctionne comme un \fImode de -conversion\fR. En utilisant le mode \fIascii\fR par défaut, \s-1UTF\-16LE\s0 n'est plus -présupposé. -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -Suppose que le fichier d'entrée est au format \s-1UTF\-16BE.\s0 -.Sp -Cette option fonctionne comme l'option \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v, \-\-verbose\fR" 4 -.IX Item "-v, --verbose" -Affiche des messages verbeux. Des informations supplémentaires sont -affichées à propos des marques d'ordre des octets et du nombre de sauts de -lignes convertis. -.IP "\fB\-F, \-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -Suit les liens symboliques et convertit les cibles. -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Remplace les liens symboliques par les fichiers convertis (les fichiers -cibles originaux restent inchangés). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -Ne change pas les liens symboliques ni les cibles (par défaut). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -Affiche les informations de version puis arrête. -.SH "MODE MAC" -.IX Header "MODE MAC" -En mode normal, les sauts de lignes sont convertis du \s-1DOS\s0 vers Unix et -inversement. Les sauts de lignes Mac ne sont pas convertis. -.PP -En mode Mac, les sauts de lignes sont convertis du format Mac au format Unix -et inversement. Les sauts de lignes \s-1DOS\s0 ne sont pas changés. -.PP -Pour fonctionner en mode Mac, utilisez l'option en ligne de commande \f(CW\*(C`\-c -mac\*(C'\fR ou utilisez les commandes \f(CW\*(C`mac2unix\*(C'\fR ou \f(CW\*(C`unix2mac\*(C'\fR. -.SH "MODES DE CONVERSION" -.IX Header "MODES DE CONVERSION" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -En mode \f(CW\*(C`ascii\*(C'\fR, seuls les sauts de lignes sont convertis. Ceci est le mode -de conversion par défaut. -.Sp -Bien que le nom de ce mode soit \s-1ASCII,\s0 qui est un standard 7 bits, ce mode -travail en réalité sur 8 bits. Utilisez toujours ce mode lorsque vous -convertissez des fichiers Unicode \s-1UTF\-8.\s0 -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -Dans ce mode, tous les caractères 8 bits non \s-1ASCII \s0(avec des valeurs entre -128 et 255) sont remplacés par une espace 7 bits. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Les caractères sont convertis entre un jeu de caractères \s-1DOS \s0(code page) et -le jeu de caractères \s-1ISO\-8859\-1 \s0(Latin\-1) de Unix. Les caractères \s-1DOS\s0 sans -équivalent \s-1ISO\-8859\-1,\s0 pour lesquels la conversion n'est pas possible, sont -remplacés par un point. La même chose est valable pour les caractères -\&\s-1ISO\-8859\-1\s0 sans équivalent \s-1DOS.\s0 -.Sp -Quand seule l'option \f(CW\*(C`\-iso\*(C'\fR est utilisée, dos2unix essaie de déterminer le -code page actif. Quand ce n'est pas possible, dos2unix utilise le code page -\&\s-1CP437\s0 par défaut qui est surtout utilisé aux \s-1USA.\s0 Pour forcer l'utilisation -d'un code page spécifique, utilisez les options \f(CW\*(C`\-437\*(C'\fR (\s-1US\s0), \f(CW\*(C`\-850\*(C'\fR -(Europe de l'ouest), \f(CW\*(C`\-860\*(C'\fR (portugais), \f(CW\*(C`\-863\*(C'\fR (français canadien) ou -\&\f(CW\*(C`\-865\*(C'\fR (nordique). Le code page \s-1CP1252\s0 de Windows (Europe de l'ouest) est -également supporté avec l'option \f(CW\*(C`\-1252\*(C'\fR. Pour d'autres codes pages, -utilisez dos2unix avec \fIiconv\fR\|(1). Iconv supporte une longue liste de codages -de caractères. -.Sp -N'utilisez jamais la conversion \s-1ISO\s0 sur des fichiers textes Unicode. Cela va -corrompre les fichiers encodés en \s-1UTF\-8.\s0 -.Sp -Quelques exemples: -.Sp -Convertir du code page par défaut du \s-1DOS\s0 au Latin\-1 Unix : -.Sp -.Vb 1 -\& dos2unix \-iso \-n entrée.txt sortie.txt -.Ve -.Sp -Convertir du \s-1CP850\s0 du \s-1DOS\s0 au Latin\-1 Unix : -.Sp -.Vb 1 -\& dos2unix \-850 \-n entrée.txt sortie.txt -.Ve -.Sp -Convertir du \s-1CP1252\s0 de Windows au Latin\-1 de Unix : -.Sp -.Vb 1 -\& dos2unix \-1252 \-n entrée.txt sortie.txt -.Ve -.Sp -Convertir le \s-1CP1252\s0 de Windows en \s-1UTF\-8\s0 de Unix (Unicode) : -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 entrée.txt | dos2unix > sortie.txt -.Ve -.Sp -Convertir du Latin\-1 de Unix au code page par défaut de \s-1DOS :\s0 -.Sp -.Vb 1 -\& unix2dos \-iso \-n entrée.txt sortie.txt -.Ve -.Sp -Convertir le Latin\-1 de Unix en \s-1CP850\s0 du \s-1DOS :\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n entrée.txt sortie.txt -.Ve -.Sp -Convertir le Latin\-1 de Unix en \s-1CP1252\s0 de Windows : -.Sp -.Vb 1 -\& unix2dos \-1252 \-n entrée.txt sortie.txt -.Ve -.Sp -Convertir le \s-1UTF\-8\s0 de Unix (Unicode) en \s-1CP1252\s0 de Windows : -.Sp -.Vb 1 -\& unix2dos < entrée.txt | iconv \-f UTF\-8 \-t CP1252 > sortie.txt -.Ve -.Sp -Consultez aussi et -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Codages" -.IX Subsection "Codages" -Il existe plusieurs codages Unicode. Sous Unix et Linux, les fichiers sont -généralement codés en \s-1UTF\-8.\s0 Sous Windows, les fichiers textes Unicode -peuvent être codés en \s-1UTF\-8, UTF\-16\s0 ou \s-1UTF\-16\s0 gros boutien mais ils sont -majoritairement codés au format \s-1UTF\-16.\s0 -.SS "Conversion" -.IX Subsection "Conversion" -Les fichiers textes Unicode peuvent avoir des sauts de lignes \s-1DOS,\s0 Unix ou -Mac, tout comme les fichiers textes normaux. -.PP -Toutes les versions de dos2unix et unix2dos peuvent convertir des fichiers -codés en \s-1UTF\-8\s0 car \s-1UTF\-8\s0 a été conçu pour être rétro\-compatible avec -l'\s-1ASCII.\s0 -.PP -Dos2unix et unix2dos, avec le support pour l'Unicode \s-1UTF\-16,\s0 peuvent lire -les fichiers textes codés sous forme petit boutien ou gros boutien. Pour -savoir si dos2unix a été compilé avec le support \s-1UTF\-16\s0 tapez \f(CW\*(C`dos2unix -\&\-V\*(C'\fR. -.PP -Sous Unix/Linux, les fichiers encodés en \s-1UTF\-16\s0 sont convertis vers -l'encodage des caractères de la localisation. Utilisez \fIlocale\fR\|(1) pour -découvrir quel encodage de caractères est utilisé. Lorsque la conversion -n'est pas possible, une erreur de conversion est produite et le fichier est -abandonné. -.PP -Sous Windows, les fichiers \s-1UTF\-16\s0 sont convertis par défaut en \s-1UTF\-8.\s0 Les -fichiers textes formatés en \s-1UTF\-8\s0 sont bien supportés sous Windows et -Unix/Linux. -.PP -Les codages \s-1UTF\-16\s0 et \s-1UTF\-8\s0 sont parfaitement compatibles. Il n'y a pas de -pertes lors de la conversion. Lorsqu'une erreur de conversion \s-1UTF\-16\s0 vers -\&\s-1UTF\-8\s0 survient, par exemple, quand le fichier d'entrée \s-1UTF\-16\s0 contient une -erreur, le fichier est ignoré. -.PP -Quand l'option \f(CW\*(C`\-u\*(C'\fR est utilisée, le fichier de sortie est écrit dans le -même encodage \s-1UTF\-16\s0 que le fichier d'entrée. L'option \f(CW\*(C`\-u\*(C'\fR empêche la -conversion en \s-1UTF\-8.\s0 -.PP -Dos2unix et unix2dos n'ont pas d'option pour convertir des fichiers \s-1UTF\-8\s0 en -\&\s-1UTF\-16.\s0 -.PP -Les modes de conversion \s-1ISO\s0 et 7 bits ne fonctionnent pas sur des fichiers -\&\s-1UTF\-16.\s0 -.SS "Marque d'ordre des octets" -.IX Subsection "Marque d'ordre des octets" -Les fichiers textes Unicode sous Windows on généralement un indicateur -d'ordre des octets (\s-1BOM\s0) car de nombreux programmes Windows (y compris -Notepad) ajoutent cet indicateur par défaut. Consultez aussi -. -.PP -Sous Unix, les fichiers Unicodes n'ont habituellement pas de \s-1BOM.\s0 Il est -supposé que les fichiers textes sont codés selon le codage de -l'environnement linguistique. -.PP -Dos2unix ne peut détecter que le fichier est au format \s-1UTF\-16\s0 si le fichier -n'a pas de \s-1BOM.\s0 Quand le fichier \s-1UTF\-16\s0 n'a pas cet indicateur, dos2unix -voit le fichier comme un fichier binaire. -.PP -Utilisez l'option \f(CW\*(C`\-ul\*(C'\fR ou \f(CW\*(C`\-ub\*(C'\fR pour convertir un fichier \s-1UTF\-16\s0 sans -\&\s-1BOM.\s0 -.PP -Dos2unix, par défaut, n'écrit pas de \s-1BOM\s0 dans le fichier de sortie. Avec -l'option \f(CW\*(C`\-b\*(C'\fR, Dos2unix écrit une \s-1BOM\s0 quand le fichier d'entrée a une \s-1BOM.\s0 -.PP -Unix2dos écrit par défaut une \s-1BOM\s0 dans le fichier de sortie quand le fichier -d'entrée a une \s-1BOM.\s0 Utilisez l'option \f(CW\*(C`\-r\*(C'\fR pour supprimer la \s-1BOM.\s0 -.PP -Dos2unix et unix2dos écrivent toujours une \s-1BOM\s0 quand l'option \f(CW\*(C`\-m\*(C'\fR est -utilisée. -.SS "Exemples Unicode" -.IX Subsection "Exemples Unicode" -Convertir de l'\s-1UTF\-16\s0 Windows (avec \s-1BOM\s0) vers l'\s-1UTF\-8\s0 de Unix : -.PP -.Vb 1 -\& dos2unix \-n entrée.txt sortie.txt -.Ve -.PP -Convertir de l'\s-1UTF\-16LE\s0 de Windows (sans \s-1BOM\s0) vers l'\s-1UTF\-8\s0 de Unix : -.PP -.Vb 1 -\& dos2unix \-ul \-n entrée.txt sortie.txt -.Ve -.PP -Convertir de l'\s-1UTF\-8\s0 de Unix vers l'\s-1UTF\-8\s0 de Windows avec \s-1BOM :\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n entrée.txt sortie.txt -.Ve -.PP -Convertir de l'\s-1UTF\-8\s0 de Unix vers l'\s-1UTF\-16\s0 de Windows : -.PP -.Vb 1 -\& unix2dos < entrée.txt | iconv \-f UTF\-8 \-t UTF\-16 > sortie.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 est un standard du gouvernement chinois. Tout logiciel vendu en -Chine doit officiellement supporter un sous ensemble obligatoire du standard -\&\s-1GB18030.\s0 Consultez . -.PP -\&\s-1GB18030\s0 est entièrement compatible avec Unicode et peut être considéré comme -étant un format de transformation unicode. Comme \s-1UTF\-8, GB18030\s0 est -compatible avec \s-1ASCII. GB18030\s0 est aussi compatible avec le code page 936 de -Windows aussi connu comme \s-1GBK.\s0 -.PP -Sous Unix/Linux, les fichiers \s-1UTF\-16\s0 sont convertis en \s-1GB18030\s0 quand -l'encodage de la localisation est \s-1GB18030.\s0 Notez que cela ne fonctionnera -que si l'emplacement est en Chine. Autrement dit, dans la localisation -anglaise britannique \f(CW\*(C`en_GB.GB18030\*(C'\fR, la conversion de \s-1UTF\-16\s0 vers \s-1GB18030\s0 -ne fonctionnera pas mais une localisation chinoise \f(CW\*(C`zh_CN.GB18030\*(C'\fR -fonctionnera. -.PP -Sous Windows, vous avez besoin de l'option \f(CW\*(C`\-gb\*(C'\fR pour convertir \s-1UTF\-16\s0 en -\&\s-1GB18030.\s0 -.PP -Les fichiers encodés en \s-1GB18030\s0 peuvent avoir une marque d'ordre des octets, -comme les fichiers Unicode. -.SH "EXEMPLES" -.IX Header "EXEMPLES" -Lire l'entrée depuis « stdin » et écrire la sortie vers « stdout » : -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Convertir et remplacer a.txt. Convertir et remplace b.txt : -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Convertir et remplacer a.txt en mode de conversion ascii : -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Convertir et remplacer a.txt en mode de conversion ascii. Convertir et -remplacer b.txt en mode de conversion 7 bits : -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Convertir a.txt depuis le format Mac vers le format Unix : -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Convertir a.txt du format Unix au format Mac : -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Convertir et remplacer a.txt tout en conservant la date originale : -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Convertir a.txt et écrire dans e.txt : -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Convertir a.txt et écrire dans e.txt. La date de e.txt est la même que celle -de a.txt : -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Convertir et remplacer a.txt. Convertir b.txt et écrire dans e.txt : -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Convertir c.txt et écrire dans e.txt. Convertir et remplacer -a.txt. Convertir et remplacer b.txt. Convertir d.txt et écrire dans f.txt : -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "CONVERSIONS RÉCURSIVES" -.IX Header "CONVERSIONS RÉCURSIVES" -Utilisez dos2unix avec les commandes \fIfind\fR\|(1) et \fIxargs\fR\|(1) pour convertir -récursivement des fichiers textes dans une arborescence de répertoires. Par -exemple, pour convertir tous les fichiers .txt dans les répertoires sous le -répertoire courant, tapez: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "PARAMÈTRES LINGUISTIQUES" -.IX Header "PARAMÈTRES LINGUISTIQUES" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -La langue principale est sélectionnée par la variable d'environnement -\&\s-1LANG.\s0 La variable \s-1LANG\s0 est composée de plusieurs parties. La première partie -est le code de la langue en minuscules. La deuxième partie est le code du -pays en majuscules précédé d'un souligné. Elle est facultative. Il y a aussi -une troisième partie facultative qui est le codage des caractères précédé -par un point. Voici quelques exemples pour un shell au standard \s-1POSIX:\s0 -.Sp -.Vb 7 -\& export LANG=fr Français -\& export LANG=fr_CA Français, Canada -\& export LANG=fr_BE Français, Belgique -\& export LANG=es_ES Espagnol, Espagne -\& export LANG=es_MX Espagnol, Mexique -\& export LANG=en_US.iso88591 Anglais, USA, codage Latin\-1 -\& export LANG=en_GB.UTF\-8 Anglais, UK, codage UTF\-8 -.Ve -.Sp -La liste complète des codes de langues et de pays est dans le manuel de -gettext: - -.Sp -Sur les systèmes Unix, vous pouvez utiliser la commande \fIlocale\fR\|(1) pour -obtenir des informations sur l'environnement linguistique. -.IP "\fB\s-1LANGUE\s0\fR" 4 -.IX Item "LANGUE" -Avec la variable d'environnement \s-1LANGUAGE,\s0 vous pouvez spécifier une liste -de langues prioritaires séparées par des deux-points. Dos2unix fait passer -\&\s-1LANGUAGE\s0 avant \s-1LANG.\s0 Par exemple, pour utiliser le français avant l'anglais: -\&\f(CW\*(C`LANGUAGE=fr:en\*(C'\fR. Vous devez d'abord activer l'environnement linguistique -en assignant une valeur autre que « C » à \s-1LANG \s0(ou \s-1LC_ALL\s0). Ensuite, vous -pourrez utiliser la liste de priorité avec la variable \s-1LANGUAGE.\s0 Voyez -également le manuel de gettext: - -.Sp -Si vous sélectionnez une langue qui n'est pas disponible, vous obtiendrez -des messages en anglais standard. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Grâce à la variable d'environnement \s-1DOS2UNIX_LOCALEDIR,\s0 la variable -\&\s-1LOCALEDIR\s0 compilée dans l'application peut être remplacée. \s-1LOCALEDIR\s0 est -utilisée pour trouver les fichiers de langue. La valeur par défaut de \s-1GNU\s0 -est \f(CW\*(C`/usr/local/share/locale\*(C'\fR. L'option \fB\-\-version\fR affiche la valeur de -\&\s-1LOCALEDIR\s0 utilisée. -.Sp -Exemple (shell \s-1POSIX\s0): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "VALEUR DE RETOUR" -.IX Header "VALEUR DE RETOUR" -Zéro est retourné en cas de succès. Si une erreur système se produit, la -dernière erreur système est retournée. Pour les autres erreurs, 1 est -renvoyé. -.PP -La valeur de sortie est toujours zéro en mode silencieux sauf quand de -mauvaises options sont utilisées sur la ligne de commande. -.SH "STANDARDS" -.IX Header "STANDARDS" - -.PP - -.PP - -.PP - -.SH "AUTEURS" -.IX Header "AUTEURS" -Benjamin Lin \- , Bernd Johannes Wuebben (mode -mac2unix) \- , Christian Wurll (ajout de saut de ligne -supplémentaire) \- , Erwin Waterlander \- - (Mainteneur) -.PP -Page du projet: -.PP -Page SourceForge: -.SH "VOIR AUSSI" -.IX Header "VOIR AUSSI" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/fr/man1/mac2unix.1 b/Tools/dos2unix/share/man/fr/man1/mac2unix.1 deleted file mode 100644 index 069326a..0000000 --- a/Tools/dos2unix/share/man/fr/man1/mac2unix.1 +++ /dev/null @@ -1,775 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NOM" -.IX Header "NOM" -dos2unix \- Convertit les fichiers textes du format DOS/Mac vers Unix et -inversement -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -.Vb 2 -\& dos2unix [options] [FICHIER …] [\-n FICHIER_ENTRÉE FICHIER_SORTIE …] -\& unix2dos [options] [FICHIER …] [\-n FICHIER_ENTRÉE FICHIER_SORTIE …] -.Ve -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -Le package Dos2unix inclut les utilitaires \f(CW\*(C`dos2unix\*(C'\fR et \f(CW\*(C`unix2dos\*(C'\fR pour -convertir des fichiers textes au format \s-1DOS\s0 ou Mac vers le format Unix et -inversement. -.PP -Dans les fichiers textes DOS/Windows, un saut de ligne est une combinaison -de deux caractères: un retour de chariot (\s-1CR\s0) suivi d'un saut de ligne -(\s-1LF\s0). Dans les fichiers textes Unix, le saut de ligne est un seul caractère: -le saut de ligne (\s-1LF\s0). Les fichiers textes Mac, avant Mac \s-1OS X,\s0 utilisaient -le retour chariot (\s-1CR\s0) comme seul caractère. De nos jours, Mac \s-1OS\s0 utilise le -même style de saut de ligne que Unix (\s-1LF\s0). -.PP -Outre les sauts de lignes, Dos2unix convertit aussi le codage des -fichiers. Quelques codes page \s-1DOS\s0 peuvent être convertis en Latin\-1 sous -Unix. L'Unicode des fichiers Windows (\s-1UTF\-16\s0) peut être converti en Unicode -Unix (\s-1UTF\-8\s0). -.PP -Les fichiers binaires sont automatiquement ignorés à moins que la conversion -soit forcée. -.PP -Les fichiers non réguliers tels que les répertoires et les FIFOs sont -automatiquement ignorés. -.PP -Les liens symboliques et leur cible sont, par défaut, inchangés. En option, -les liens symboliques peuvent être remplacés ou, au choix, la sortie peut -être écrite dans la cible du lien symbolique. Écrire dans la cible d'un lien -symbolique n'est pas supporté sous Windows. -.PP -Dos2unix a été conçu comme dos2unix sous SunOS/Solaris. Il y a une -différence importante avec la version originale de SunOS/Solaris. Cette -version effectue les conversions en place (ancien mode de fichiers) tandis -que la version originale de SunOS/Solaris ne supporte que la conversion par -paire (nouveau mode de fichier). Voyez aussi les options \f(CW\*(C`\-o\*(C'\fR et \f(CW\*(C`\-n\*(C'\fR. -.SH "OPTIONS" -.IX Header "OPTIONS" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Traites toutes les options à sa suite comme étant des noms de -fichiers. Utilisez cette option si vous voulez convertir des fichiers dont -le nom commence par un tiret. Par exemple, pour convertir un fichier nommé -« \-foo », vous pouvez utiliser cette commande: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -Ou dans le style des nouveaux fichiers: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo sortie.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Convertit uniquement les sauts de lignes. C'est le mode de conversion par -défaut. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Convertit le jeu de caractères du \s-1DOS\s0 vers \s-1ISO\-8859\-1.\s0 Voyez aussi la -section des \s-1MODES DE CONVERSION.\s0 -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Utilise le code page 1252 de Windows (Europe de l'ouest). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -Utilise le code page 437 du \s-1DOS \s0(\s-1US\s0). C'est le code page par défaut pour les -conversions \s-1ISO.\s0 -.IP "\fB\-850\fR" 4 -.IX Item "-850" -Utilise le code page 850 du \s-1DOS \s0(Europe de l'ouest). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -Utilise le code page 860 du \s-1DOS \s0(portugais). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -Utilise le code page 863 du \s-1DOS \s0(français canadien). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -Utilise le code page 865 du \s-1DOS \s0(nordique). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Convertit les caractères 8 bits vers l'espace 7 bits. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Conserve la marque d'ordre des octets (\s-1BOM\s0). Si le fichier d'entrée a une -\&\s-1BOM,\s0 elle est écrite dans le fichier de sortie. C'est le comportement par -défaut quand les sauts de lignes sont convertis au format \s-1DOS.\s0 Consultez -aussi l'option \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode \s-1MODE_CONV\s0\fR" 4 -.IX Item "-c, --convmode MODE_CONV" -Change le mode de conversion. \s-1MODE_CONV\s0 prend l'une des valeurs: \fIascii\fR, -\&\fI7bit\fR, \fIiso\fR, \fImac\fR. Ascii est la valeur par défaut. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -Force la conversion de fichiers binaires. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -Sous Windows, les fichiers \s-1UTF\-16\s0 sont convertis en \s-1UTF\-8\s0 par défaut sans -considération pour les paramètres de la localisation. Utilisez cette option -pour convertir \s-1UTF\-16\s0 en \s-1GB18030.\s0 Cette option n'est disponible que sous -Windows. Consultez aussi la section \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -Affiche l'aide et s'arrête. -.IP "\fB\-i[\s-1FANIONS\s0], \-\-info[=FANIONS] \s-1FICHIER\s0 …\fR" 4 -.IX Item "-i[FANIONS], --info[=FANIONS] FICHIER …" -Affiche les informations du fichier. Aucune conversion n'est réalisée. -.Sp -Les informations suivantes sont affichées dans cet ordre: le nombre de sauts -de ligne \s-1DOS,\s0 le nombre de sauts de ligne Unix, le nombre de sauts de ligne -Mac, la marque d'ordre des octets, texte ou binaire, nom du fichier. -.Sp -Exemple de sortie : -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Des fanions facultatifs peuvent être ajoutés pour changer la sortie. Un ou -plusieurs fanions peuvent être ajoutés. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Affiche le nombre de sauts de ligne \s-1DOS.\s0 -.IP "\fBu\fR" 4 -.IX Item "u" -Affiche le nombre de sauts de ligne Unix. -.IP "\fBm\fR" 4 -.IX Item "m" -Affiche le nombre de sauts de ligne Mac. -.IP "\fBb\fR" 4 -.IX Item "b" -Afficher la marque d'ordre des octets. -.IP "\fBt\fR" 4 -.IX Item "t" -Affiche si le fichier est texte ou binaire. -.IP "\fBc\fR" 4 -.IX Item "c" -Affiche uniquement les fichiers qui seraient convertis. -.Sp -Avec le fanion \f(CW\*(C`c\*(C'\fR, dos2unix n'affichera que les fichiers contenant des -sauts de ligne \s-1DOS\s0 alors que unix2dos n'affichera que les noms des fichiers -aillant des sauts de ligne Unix. -.RE -.RS 4 -.Sp -Exemples: -.Sp -Afficher les informations pour tous les fichier *.txt : -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Afficher uniquement le nombre de sauts de ligne \s-1DOS\s0 et Unix : -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Montrer uniquement la marque d'ordre des octets : -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -Liste les fichiers qui ont des sauts de ligne \s-1DOS :\s0 -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -Liste les fichiers qui ont des sauts de ligne Unix : -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -La date du fichier de sortie est la même que celle du fichier d'entrée. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -Affiche la licence du programme. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -Ajoute des sauts de lignes additionnels. -.Sp -\&\fBdos2unix\fR: Seuls les sauts de lignes du \s-1DOS\s0 sont changés en deux sauts de -lignes de Unix. En mode Mac, seuls les sauts de lignes Mac sont changés en -deux sauts de lignes Unix. -.Sp -\&\fBunix2dos\fR: Seuls les sauts de lignes Unix sont changés en deux sauts de -lignes du \s-1DOS.\s0 En mode Mac, les sauts de lignes Unix sont remplacés par deux -sauts de lignes Mac. -.IP "\fB\-m, \-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -Écrit une marque d'ordre des octets (\s-1BOM\s0) dans le fichier de sortie. Par -défaut une \s-1BOM UTF\-8\s0 est écrite. -.Sp -Lorsque le fichier d'entrée est en \s-1UTF\-16\s0 et que l'option \f(CW\*(C`\-u\*(C'\fR est -utilisée, une \s-1BOM UTF\-16\s0 est écrite. -.Sp -N'utilisez jamais cette option quand l'encodage du fichier de sortie n'est -ni \s-1UTF\-8\s0 ni \s-1UTF\-16.\s0 Consultez également la section \s-1UNICODE.\s0 -.IP "\fB\-n, \-\-newline FICHIER_ENTRÉE \s-1FICHIER_SORTIE\s0 …\fR" 4 -.IX Item "-n, --newline FICHIER_ENTRÉE FICHIER_SORTIE …" -Nouveau mode de fichiers. Convertit le fichier FICHER_ENTRÉE et écrit la -sortie dans le fichier \s-1FICHIER_SORTIE.\s0 Les noms des fichiers doivent être -indiqués par paires. Les jokers \fIne\fR doivent \fIpas\fR être utilisés ou vous -\&\fIperdrez\fR vos fichiers. -.Sp -La personne qui démarre la conversion dans le nouveau mode (pairé) des -fichiers sera le propriétaire du fichier converti. Les permissions de -lecture/écriture du nouveau fichier seront les permissions du fichier -original moins le \fIumask\fR\|(1) de la personne qui exécute la conversion. -.IP "\fB\-o, \-\-oldfile \s-1FICHIER\s0 …\fR" 4 -.IX Item "-o, --oldfile FICHIER …" -Ancien mode de fichiers. Convertit le fichier \s-1FICHIER\s0 et écrit la sortie -dedans. Le programme fonctionne dans ce mode par défaut. Les jokers peuvent -être utilisés. -.Sp -Dans l'ancien mode (en place) des fichiers, les fichiers convertis ont le -même propriétaire, groupe et permissions lecture/écriture que le fichier -original. Idem quand le fichier est converti par un utilisateur qui a la -permission d'écrire dans le fichier (par exemple, root). La conversion est -interrompue si il n'est pas possible de conserver les valeurs d'origine. Le -changement de propriétaire pourrait signifier que le propriétaire original -n'est plus en mesure de lire le fichier. Le changement de groupe pourrait -être un risque pour la sécurité. Le fichier pourrait être rendu accessible -en lecture par des personnes à qui il n'est pas destiné. La conservation du -propriétaire, du groupe et des permissions de lecture/écriture n'est -supportée que sous Unix. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Mode silencieux. Supprime les avertissements et les messages. La valeur de -sortie est zéro sauf quand de mauvaises options sont utilisées sur la ligne -de commande. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -Supprime la marque d'ordre des octets (\s-1BOM\s0). N'écrit pas la \s-1BOM\s0 dans le -fichier de sortie. Ceci est le comportement par défaut lorsque les sauts de -lignes sont convertis au format Unix. Consultez aussi l'option \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s, \-\-safe\fR" 4 -.IX Item "-s, --safe" -Ignore les fichiers binaires (par défaut). -.IP "\fB\-u, \-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -Conserve l'encodage \s-1UTF\-16\s0 original du fichier d'entrée. Le fichier de -sortie sera écrit dans le même encodage \s-1UTF\-16 \s0(petit ou grand boutien) que -le fichier d'entrée. Ceci évite la transformation en \s-1UTF\-8.\s0 Une \s-1BOM UTF\-16\s0 -sera écrite en conséquent. Cette option peut être désactivée avec l'option -\&\f(CW\*(C`\-ascii\*(C'\fR. -.IP "\fB\-ul, \-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -Suppose que le fichier d'entrée est au format \s-1UTF\-16LE.\s0 -.Sp -Quand il y a un indicateur d'ordre des octets dans le fichier d'entrée, -l'indicateur a priorité sur cette option. -.Sp -Si vous vous êtes trompé sur le format du fichier d'entrée (par exemple, ce -n'était pas un fichier \s-1UTF16\-LE\s0) et que la conversion réussi, vous -obtiendrez un fichier \s-1UTF\-8\s0 contenant le mauvais texte. Vous pouvez -récupérer le fichier original avec \fIiconv\fR\|(1) en convertissant le fichier de -sortie \s-1UTF\-8\s0 vers du \s-1UTF\-16LE.\s0 -.Sp -La présupposition de l'\s-1UTF\-16LE\s0 fonctionne comme un \fImode de -conversion\fR. En utilisant le mode \fIascii\fR par défaut, \s-1UTF\-16LE\s0 n'est plus -présupposé. -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -Suppose que le fichier d'entrée est au format \s-1UTF\-16BE.\s0 -.Sp -Cette option fonctionne comme l'option \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v, \-\-verbose\fR" 4 -.IX Item "-v, --verbose" -Affiche des messages verbeux. Des informations supplémentaires sont -affichées à propos des marques d'ordre des octets et du nombre de sauts de -lignes convertis. -.IP "\fB\-F, \-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -Suit les liens symboliques et convertit les cibles. -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Remplace les liens symboliques par les fichiers convertis (les fichiers -cibles originaux restent inchangés). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -Ne change pas les liens symboliques ni les cibles (par défaut). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -Affiche les informations de version puis arrête. -.SH "MODE MAC" -.IX Header "MODE MAC" -En mode normal, les sauts de lignes sont convertis du \s-1DOS\s0 vers Unix et -inversement. Les sauts de lignes Mac ne sont pas convertis. -.PP -En mode Mac, les sauts de lignes sont convertis du format Mac au format Unix -et inversement. Les sauts de lignes \s-1DOS\s0 ne sont pas changés. -.PP -Pour fonctionner en mode Mac, utilisez l'option en ligne de commande \f(CW\*(C`\-c -mac\*(C'\fR ou utilisez les commandes \f(CW\*(C`mac2unix\*(C'\fR ou \f(CW\*(C`unix2mac\*(C'\fR. -.SH "MODES DE CONVERSION" -.IX Header "MODES DE CONVERSION" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -En mode \f(CW\*(C`ascii\*(C'\fR, seuls les sauts de lignes sont convertis. Ceci est le mode -de conversion par défaut. -.Sp -Bien que le nom de ce mode soit \s-1ASCII,\s0 qui est un standard 7 bits, ce mode -travail en réalité sur 8 bits. Utilisez toujours ce mode lorsque vous -convertissez des fichiers Unicode \s-1UTF\-8.\s0 -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -Dans ce mode, tous les caractères 8 bits non \s-1ASCII \s0(avec des valeurs entre -128 et 255) sont remplacés par une espace 7 bits. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Les caractères sont convertis entre un jeu de caractères \s-1DOS \s0(code page) et -le jeu de caractères \s-1ISO\-8859\-1 \s0(Latin\-1) de Unix. Les caractères \s-1DOS\s0 sans -équivalent \s-1ISO\-8859\-1,\s0 pour lesquels la conversion n'est pas possible, sont -remplacés par un point. La même chose est valable pour les caractères -\&\s-1ISO\-8859\-1\s0 sans équivalent \s-1DOS.\s0 -.Sp -Quand seule l'option \f(CW\*(C`\-iso\*(C'\fR est utilisée, dos2unix essaie de déterminer le -code page actif. Quand ce n'est pas possible, dos2unix utilise le code page -\&\s-1CP437\s0 par défaut qui est surtout utilisé aux \s-1USA.\s0 Pour forcer l'utilisation -d'un code page spécifique, utilisez les options \f(CW\*(C`\-437\*(C'\fR (\s-1US\s0), \f(CW\*(C`\-850\*(C'\fR -(Europe de l'ouest), \f(CW\*(C`\-860\*(C'\fR (portugais), \f(CW\*(C`\-863\*(C'\fR (français canadien) ou -\&\f(CW\*(C`\-865\*(C'\fR (nordique). Le code page \s-1CP1252\s0 de Windows (Europe de l'ouest) est -également supporté avec l'option \f(CW\*(C`\-1252\*(C'\fR. Pour d'autres codes pages, -utilisez dos2unix avec \fIiconv\fR\|(1). Iconv supporte une longue liste de codages -de caractères. -.Sp -N'utilisez jamais la conversion \s-1ISO\s0 sur des fichiers textes Unicode. Cela va -corrompre les fichiers encodés en \s-1UTF\-8.\s0 -.Sp -Quelques exemples: -.Sp -Convertir du code page par défaut du \s-1DOS\s0 au Latin\-1 Unix : -.Sp -.Vb 1 -\& dos2unix \-iso \-n entrée.txt sortie.txt -.Ve -.Sp -Convertir du \s-1CP850\s0 du \s-1DOS\s0 au Latin\-1 Unix : -.Sp -.Vb 1 -\& dos2unix \-850 \-n entrée.txt sortie.txt -.Ve -.Sp -Convertir du \s-1CP1252\s0 de Windows au Latin\-1 de Unix : -.Sp -.Vb 1 -\& dos2unix \-1252 \-n entrée.txt sortie.txt -.Ve -.Sp -Convertir le \s-1CP1252\s0 de Windows en \s-1UTF\-8\s0 de Unix (Unicode) : -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 entrée.txt | dos2unix > sortie.txt -.Ve -.Sp -Convertir du Latin\-1 de Unix au code page par défaut de \s-1DOS :\s0 -.Sp -.Vb 1 -\& unix2dos \-iso \-n entrée.txt sortie.txt -.Ve -.Sp -Convertir le Latin\-1 de Unix en \s-1CP850\s0 du \s-1DOS :\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n entrée.txt sortie.txt -.Ve -.Sp -Convertir le Latin\-1 de Unix en \s-1CP1252\s0 de Windows : -.Sp -.Vb 1 -\& unix2dos \-1252 \-n entrée.txt sortie.txt -.Ve -.Sp -Convertir le \s-1UTF\-8\s0 de Unix (Unicode) en \s-1CP1252\s0 de Windows : -.Sp -.Vb 1 -\& unix2dos < entrée.txt | iconv \-f UTF\-8 \-t CP1252 > sortie.txt -.Ve -.Sp -Consultez aussi et -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Codages" -.IX Subsection "Codages" -Il existe plusieurs codages Unicode. Sous Unix et Linux, les fichiers sont -généralement codés en \s-1UTF\-8.\s0 Sous Windows, les fichiers textes Unicode -peuvent être codés en \s-1UTF\-8, UTF\-16\s0 ou \s-1UTF\-16\s0 gros boutien mais ils sont -majoritairement codés au format \s-1UTF\-16.\s0 -.SS "Conversion" -.IX Subsection "Conversion" -Les fichiers textes Unicode peuvent avoir des sauts de lignes \s-1DOS,\s0 Unix ou -Mac, tout comme les fichiers textes normaux. -.PP -Toutes les versions de dos2unix et unix2dos peuvent convertir des fichiers -codés en \s-1UTF\-8\s0 car \s-1UTF\-8\s0 a été conçu pour être rétro\-compatible avec -l'\s-1ASCII.\s0 -.PP -Dos2unix et unix2dos, avec le support pour l'Unicode \s-1UTF\-16,\s0 peuvent lire -les fichiers textes codés sous forme petit boutien ou gros boutien. Pour -savoir si dos2unix a été compilé avec le support \s-1UTF\-16\s0 tapez \f(CW\*(C`dos2unix -\&\-V\*(C'\fR. -.PP -Sous Unix/Linux, les fichiers encodés en \s-1UTF\-16\s0 sont convertis vers -l'encodage des caractères de la localisation. Utilisez \fIlocale\fR\|(1) pour -découvrir quel encodage de caractères est utilisé. Lorsque la conversion -n'est pas possible, une erreur de conversion est produite et le fichier est -abandonné. -.PP -Sous Windows, les fichiers \s-1UTF\-16\s0 sont convertis par défaut en \s-1UTF\-8.\s0 Les -fichiers textes formatés en \s-1UTF\-8\s0 sont bien supportés sous Windows et -Unix/Linux. -.PP -Les codages \s-1UTF\-16\s0 et \s-1UTF\-8\s0 sont parfaitement compatibles. Il n'y a pas de -pertes lors de la conversion. Lorsqu'une erreur de conversion \s-1UTF\-16\s0 vers -\&\s-1UTF\-8\s0 survient, par exemple, quand le fichier d'entrée \s-1UTF\-16\s0 contient une -erreur, le fichier est ignoré. -.PP -Quand l'option \f(CW\*(C`\-u\*(C'\fR est utilisée, le fichier de sortie est écrit dans le -même encodage \s-1UTF\-16\s0 que le fichier d'entrée. L'option \f(CW\*(C`\-u\*(C'\fR empêche la -conversion en \s-1UTF\-8.\s0 -.PP -Dos2unix et unix2dos n'ont pas d'option pour convertir des fichiers \s-1UTF\-8\s0 en -\&\s-1UTF\-16.\s0 -.PP -Les modes de conversion \s-1ISO\s0 et 7 bits ne fonctionnent pas sur des fichiers -\&\s-1UTF\-16.\s0 -.SS "Marque d'ordre des octets" -.IX Subsection "Marque d'ordre des octets" -Les fichiers textes Unicode sous Windows on généralement un indicateur -d'ordre des octets (\s-1BOM\s0) car de nombreux programmes Windows (y compris -Notepad) ajoutent cet indicateur par défaut. Consultez aussi -. -.PP -Sous Unix, les fichiers Unicodes n'ont habituellement pas de \s-1BOM.\s0 Il est -supposé que les fichiers textes sont codés selon le codage de -l'environnement linguistique. -.PP -Dos2unix ne peut détecter que le fichier est au format \s-1UTF\-16\s0 si le fichier -n'a pas de \s-1BOM.\s0 Quand le fichier \s-1UTF\-16\s0 n'a pas cet indicateur, dos2unix -voit le fichier comme un fichier binaire. -.PP -Utilisez l'option \f(CW\*(C`\-ul\*(C'\fR ou \f(CW\*(C`\-ub\*(C'\fR pour convertir un fichier \s-1UTF\-16\s0 sans -\&\s-1BOM.\s0 -.PP -Dos2unix, par défaut, n'écrit pas de \s-1BOM\s0 dans le fichier de sortie. Avec -l'option \f(CW\*(C`\-b\*(C'\fR, Dos2unix écrit une \s-1BOM\s0 quand le fichier d'entrée a une \s-1BOM.\s0 -.PP -Unix2dos écrit par défaut une \s-1BOM\s0 dans le fichier de sortie quand le fichier -d'entrée a une \s-1BOM.\s0 Utilisez l'option \f(CW\*(C`\-r\*(C'\fR pour supprimer la \s-1BOM.\s0 -.PP -Dos2unix et unix2dos écrivent toujours une \s-1BOM\s0 quand l'option \f(CW\*(C`\-m\*(C'\fR est -utilisée. -.SS "Exemples Unicode" -.IX Subsection "Exemples Unicode" -Convertir de l'\s-1UTF\-16\s0 Windows (avec \s-1BOM\s0) vers l'\s-1UTF\-8\s0 de Unix : -.PP -.Vb 1 -\& dos2unix \-n entrée.txt sortie.txt -.Ve -.PP -Convertir de l'\s-1UTF\-16LE\s0 de Windows (sans \s-1BOM\s0) vers l'\s-1UTF\-8\s0 de Unix : -.PP -.Vb 1 -\& dos2unix \-ul \-n entrée.txt sortie.txt -.Ve -.PP -Convertir de l'\s-1UTF\-8\s0 de Unix vers l'\s-1UTF\-8\s0 de Windows avec \s-1BOM :\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n entrée.txt sortie.txt -.Ve -.PP -Convertir de l'\s-1UTF\-8\s0 de Unix vers l'\s-1UTF\-16\s0 de Windows : -.PP -.Vb 1 -\& unix2dos < entrée.txt | iconv \-f UTF\-8 \-t UTF\-16 > sortie.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 est un standard du gouvernement chinois. Tout logiciel vendu en -Chine doit officiellement supporter un sous ensemble obligatoire du standard -\&\s-1GB18030.\s0 Consultez . -.PP -\&\s-1GB18030\s0 est entièrement compatible avec Unicode et peut être considéré comme -étant un format de transformation unicode. Comme \s-1UTF\-8, GB18030\s0 est -compatible avec \s-1ASCII. GB18030\s0 est aussi compatible avec le code page 936 de -Windows aussi connu comme \s-1GBK.\s0 -.PP -Sous Unix/Linux, les fichiers \s-1UTF\-16\s0 sont convertis en \s-1GB18030\s0 quand -l'encodage de la localisation est \s-1GB18030.\s0 Notez que cela ne fonctionnera -que si l'emplacement est en Chine. Autrement dit, dans la localisation -anglaise britannique \f(CW\*(C`en_GB.GB18030\*(C'\fR, la conversion de \s-1UTF\-16\s0 vers \s-1GB18030\s0 -ne fonctionnera pas mais une localisation chinoise \f(CW\*(C`zh_CN.GB18030\*(C'\fR -fonctionnera. -.PP -Sous Windows, vous avez besoin de l'option \f(CW\*(C`\-gb\*(C'\fR pour convertir \s-1UTF\-16\s0 en -\&\s-1GB18030.\s0 -.PP -Les fichiers encodés en \s-1GB18030\s0 peuvent avoir une marque d'ordre des octets, -comme les fichiers Unicode. -.SH "EXEMPLES" -.IX Header "EXEMPLES" -Lire l'entrée depuis « stdin » et écrire la sortie vers « stdout » : -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Convertir et remplacer a.txt. Convertir et remplace b.txt : -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Convertir et remplacer a.txt en mode de conversion ascii : -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Convertir et remplacer a.txt en mode de conversion ascii. Convertir et -remplacer b.txt en mode de conversion 7 bits : -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Convertir a.txt depuis le format Mac vers le format Unix : -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Convertir a.txt du format Unix au format Mac : -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Convertir et remplacer a.txt tout en conservant la date originale : -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Convertir a.txt et écrire dans e.txt : -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Convertir a.txt et écrire dans e.txt. La date de e.txt est la même que celle -de a.txt : -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Convertir et remplacer a.txt. Convertir b.txt et écrire dans e.txt : -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Convertir c.txt et écrire dans e.txt. Convertir et remplacer -a.txt. Convertir et remplacer b.txt. Convertir d.txt et écrire dans f.txt : -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "CONVERSIONS RÉCURSIVES" -.IX Header "CONVERSIONS RÉCURSIVES" -Utilisez dos2unix avec les commandes \fIfind\fR\|(1) et \fIxargs\fR\|(1) pour convertir -récursivement des fichiers textes dans une arborescence de répertoires. Par -exemple, pour convertir tous les fichiers .txt dans les répertoires sous le -répertoire courant, tapez: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "PARAMÈTRES LINGUISTIQUES" -.IX Header "PARAMÈTRES LINGUISTIQUES" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -La langue principale est sélectionnée par la variable d'environnement -\&\s-1LANG.\s0 La variable \s-1LANG\s0 est composée de plusieurs parties. La première partie -est le code de la langue en minuscules. La deuxième partie est le code du -pays en majuscules précédé d'un souligné. Elle est facultative. Il y a aussi -une troisième partie facultative qui est le codage des caractères précédé -par un point. Voici quelques exemples pour un shell au standard \s-1POSIX:\s0 -.Sp -.Vb 7 -\& export LANG=fr Français -\& export LANG=fr_CA Français, Canada -\& export LANG=fr_BE Français, Belgique -\& export LANG=es_ES Espagnol, Espagne -\& export LANG=es_MX Espagnol, Mexique -\& export LANG=en_US.iso88591 Anglais, USA, codage Latin\-1 -\& export LANG=en_GB.UTF\-8 Anglais, UK, codage UTF\-8 -.Ve -.Sp -La liste complète des codes de langues et de pays est dans le manuel de -gettext: - -.Sp -Sur les systèmes Unix, vous pouvez utiliser la commande \fIlocale\fR\|(1) pour -obtenir des informations sur l'environnement linguistique. -.IP "\fB\s-1LANGUE\s0\fR" 4 -.IX Item "LANGUE" -Avec la variable d'environnement \s-1LANGUAGE,\s0 vous pouvez spécifier une liste -de langues prioritaires séparées par des deux-points. Dos2unix fait passer -\&\s-1LANGUAGE\s0 avant \s-1LANG.\s0 Par exemple, pour utiliser le français avant l'anglais: -\&\f(CW\*(C`LANGUAGE=fr:en\*(C'\fR. Vous devez d'abord activer l'environnement linguistique -en assignant une valeur autre que « C » à \s-1LANG \s0(ou \s-1LC_ALL\s0). Ensuite, vous -pourrez utiliser la liste de priorité avec la variable \s-1LANGUAGE.\s0 Voyez -également le manuel de gettext: - -.Sp -Si vous sélectionnez une langue qui n'est pas disponible, vous obtiendrez -des messages en anglais standard. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Grâce à la variable d'environnement \s-1DOS2UNIX_LOCALEDIR,\s0 la variable -\&\s-1LOCALEDIR\s0 compilée dans l'application peut être remplacée. \s-1LOCALEDIR\s0 est -utilisée pour trouver les fichiers de langue. La valeur par défaut de \s-1GNU\s0 -est \f(CW\*(C`/usr/local/share/locale\*(C'\fR. L'option \fB\-\-version\fR affiche la valeur de -\&\s-1LOCALEDIR\s0 utilisée. -.Sp -Exemple (shell \s-1POSIX\s0): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "VALEUR DE RETOUR" -.IX Header "VALEUR DE RETOUR" -Zéro est retourné en cas de succès. Si une erreur système se produit, la -dernière erreur système est retournée. Pour les autres erreurs, 1 est -renvoyé. -.PP -La valeur de sortie est toujours zéro en mode silencieux sauf quand de -mauvaises options sont utilisées sur la ligne de commande. -.SH "STANDARDS" -.IX Header "STANDARDS" - -.PP - -.PP - -.PP - -.SH "AUTEURS" -.IX Header "AUTEURS" -Benjamin Lin \- , Bernd Johannes Wuebben (mode -mac2unix) \- , Christian Wurll (ajout de saut de ligne -supplémentaire) \- , Erwin Waterlander \- - (Mainteneur) -.PP -Page du projet: -.PP -Page SourceForge: -.SH "VOIR AUSSI" -.IX Header "VOIR AUSSI" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/fr/man1/unix2dos.1 b/Tools/dos2unix/share/man/fr/man1/unix2dos.1 deleted file mode 100644 index 069326a..0000000 --- a/Tools/dos2unix/share/man/fr/man1/unix2dos.1 +++ /dev/null @@ -1,775 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NOM" -.IX Header "NOM" -dos2unix \- Convertit les fichiers textes du format DOS/Mac vers Unix et -inversement -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -.Vb 2 -\& dos2unix [options] [FICHIER …] [\-n FICHIER_ENTRÉE FICHIER_SORTIE …] -\& unix2dos [options] [FICHIER …] [\-n FICHIER_ENTRÉE FICHIER_SORTIE …] -.Ve -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -Le package Dos2unix inclut les utilitaires \f(CW\*(C`dos2unix\*(C'\fR et \f(CW\*(C`unix2dos\*(C'\fR pour -convertir des fichiers textes au format \s-1DOS\s0 ou Mac vers le format Unix et -inversement. -.PP -Dans les fichiers textes DOS/Windows, un saut de ligne est une combinaison -de deux caractères: un retour de chariot (\s-1CR\s0) suivi d'un saut de ligne -(\s-1LF\s0). Dans les fichiers textes Unix, le saut de ligne est un seul caractère: -le saut de ligne (\s-1LF\s0). Les fichiers textes Mac, avant Mac \s-1OS X,\s0 utilisaient -le retour chariot (\s-1CR\s0) comme seul caractère. De nos jours, Mac \s-1OS\s0 utilise le -même style de saut de ligne que Unix (\s-1LF\s0). -.PP -Outre les sauts de lignes, Dos2unix convertit aussi le codage des -fichiers. Quelques codes page \s-1DOS\s0 peuvent être convertis en Latin\-1 sous -Unix. L'Unicode des fichiers Windows (\s-1UTF\-16\s0) peut être converti en Unicode -Unix (\s-1UTF\-8\s0). -.PP -Les fichiers binaires sont automatiquement ignorés à moins que la conversion -soit forcée. -.PP -Les fichiers non réguliers tels que les répertoires et les FIFOs sont -automatiquement ignorés. -.PP -Les liens symboliques et leur cible sont, par défaut, inchangés. En option, -les liens symboliques peuvent être remplacés ou, au choix, la sortie peut -être écrite dans la cible du lien symbolique. Écrire dans la cible d'un lien -symbolique n'est pas supporté sous Windows. -.PP -Dos2unix a été conçu comme dos2unix sous SunOS/Solaris. Il y a une -différence importante avec la version originale de SunOS/Solaris. Cette -version effectue les conversions en place (ancien mode de fichiers) tandis -que la version originale de SunOS/Solaris ne supporte que la conversion par -paire (nouveau mode de fichier). Voyez aussi les options \f(CW\*(C`\-o\*(C'\fR et \f(CW\*(C`\-n\*(C'\fR. -.SH "OPTIONS" -.IX Header "OPTIONS" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Traites toutes les options à sa suite comme étant des noms de -fichiers. Utilisez cette option si vous voulez convertir des fichiers dont -le nom commence par un tiret. Par exemple, pour convertir un fichier nommé -« \-foo », vous pouvez utiliser cette commande: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -Ou dans le style des nouveaux fichiers: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo sortie.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Convertit uniquement les sauts de lignes. C'est le mode de conversion par -défaut. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Convertit le jeu de caractères du \s-1DOS\s0 vers \s-1ISO\-8859\-1.\s0 Voyez aussi la -section des \s-1MODES DE CONVERSION.\s0 -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Utilise le code page 1252 de Windows (Europe de l'ouest). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -Utilise le code page 437 du \s-1DOS \s0(\s-1US\s0). C'est le code page par défaut pour les -conversions \s-1ISO.\s0 -.IP "\fB\-850\fR" 4 -.IX Item "-850" -Utilise le code page 850 du \s-1DOS \s0(Europe de l'ouest). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -Utilise le code page 860 du \s-1DOS \s0(portugais). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -Utilise le code page 863 du \s-1DOS \s0(français canadien). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -Utilise le code page 865 du \s-1DOS \s0(nordique). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Convertit les caractères 8 bits vers l'espace 7 bits. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Conserve la marque d'ordre des octets (\s-1BOM\s0). Si le fichier d'entrée a une -\&\s-1BOM,\s0 elle est écrite dans le fichier de sortie. C'est le comportement par -défaut quand les sauts de lignes sont convertis au format \s-1DOS.\s0 Consultez -aussi l'option \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode \s-1MODE_CONV\s0\fR" 4 -.IX Item "-c, --convmode MODE_CONV" -Change le mode de conversion. \s-1MODE_CONV\s0 prend l'une des valeurs: \fIascii\fR, -\&\fI7bit\fR, \fIiso\fR, \fImac\fR. Ascii est la valeur par défaut. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -Force la conversion de fichiers binaires. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -Sous Windows, les fichiers \s-1UTF\-16\s0 sont convertis en \s-1UTF\-8\s0 par défaut sans -considération pour les paramètres de la localisation. Utilisez cette option -pour convertir \s-1UTF\-16\s0 en \s-1GB18030.\s0 Cette option n'est disponible que sous -Windows. Consultez aussi la section \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -Affiche l'aide et s'arrête. -.IP "\fB\-i[\s-1FANIONS\s0], \-\-info[=FANIONS] \s-1FICHIER\s0 …\fR" 4 -.IX Item "-i[FANIONS], --info[=FANIONS] FICHIER …" -Affiche les informations du fichier. Aucune conversion n'est réalisée. -.Sp -Les informations suivantes sont affichées dans cet ordre: le nombre de sauts -de ligne \s-1DOS,\s0 le nombre de sauts de ligne Unix, le nombre de sauts de ligne -Mac, la marque d'ordre des octets, texte ou binaire, nom du fichier. -.Sp -Exemple de sortie : -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Des fanions facultatifs peuvent être ajoutés pour changer la sortie. Un ou -plusieurs fanions peuvent être ajoutés. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Affiche le nombre de sauts de ligne \s-1DOS.\s0 -.IP "\fBu\fR" 4 -.IX Item "u" -Affiche le nombre de sauts de ligne Unix. -.IP "\fBm\fR" 4 -.IX Item "m" -Affiche le nombre de sauts de ligne Mac. -.IP "\fBb\fR" 4 -.IX Item "b" -Afficher la marque d'ordre des octets. -.IP "\fBt\fR" 4 -.IX Item "t" -Affiche si le fichier est texte ou binaire. -.IP "\fBc\fR" 4 -.IX Item "c" -Affiche uniquement les fichiers qui seraient convertis. -.Sp -Avec le fanion \f(CW\*(C`c\*(C'\fR, dos2unix n'affichera que les fichiers contenant des -sauts de ligne \s-1DOS\s0 alors que unix2dos n'affichera que les noms des fichiers -aillant des sauts de ligne Unix. -.RE -.RS 4 -.Sp -Exemples: -.Sp -Afficher les informations pour tous les fichier *.txt : -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Afficher uniquement le nombre de sauts de ligne \s-1DOS\s0 et Unix : -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Montrer uniquement la marque d'ordre des octets : -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -Liste les fichiers qui ont des sauts de ligne \s-1DOS :\s0 -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -Liste les fichiers qui ont des sauts de ligne Unix : -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -La date du fichier de sortie est la même que celle du fichier d'entrée. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -Affiche la licence du programme. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -Ajoute des sauts de lignes additionnels. -.Sp -\&\fBdos2unix\fR: Seuls les sauts de lignes du \s-1DOS\s0 sont changés en deux sauts de -lignes de Unix. En mode Mac, seuls les sauts de lignes Mac sont changés en -deux sauts de lignes Unix. -.Sp -\&\fBunix2dos\fR: Seuls les sauts de lignes Unix sont changés en deux sauts de -lignes du \s-1DOS.\s0 En mode Mac, les sauts de lignes Unix sont remplacés par deux -sauts de lignes Mac. -.IP "\fB\-m, \-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -Écrit une marque d'ordre des octets (\s-1BOM\s0) dans le fichier de sortie. Par -défaut une \s-1BOM UTF\-8\s0 est écrite. -.Sp -Lorsque le fichier d'entrée est en \s-1UTF\-16\s0 et que l'option \f(CW\*(C`\-u\*(C'\fR est -utilisée, une \s-1BOM UTF\-16\s0 est écrite. -.Sp -N'utilisez jamais cette option quand l'encodage du fichier de sortie n'est -ni \s-1UTF\-8\s0 ni \s-1UTF\-16.\s0 Consultez également la section \s-1UNICODE.\s0 -.IP "\fB\-n, \-\-newline FICHIER_ENTRÉE \s-1FICHIER_SORTIE\s0 …\fR" 4 -.IX Item "-n, --newline FICHIER_ENTRÉE FICHIER_SORTIE …" -Nouveau mode de fichiers. Convertit le fichier FICHER_ENTRÉE et écrit la -sortie dans le fichier \s-1FICHIER_SORTIE.\s0 Les noms des fichiers doivent être -indiqués par paires. Les jokers \fIne\fR doivent \fIpas\fR être utilisés ou vous -\&\fIperdrez\fR vos fichiers. -.Sp -La personne qui démarre la conversion dans le nouveau mode (pairé) des -fichiers sera le propriétaire du fichier converti. Les permissions de -lecture/écriture du nouveau fichier seront les permissions du fichier -original moins le \fIumask\fR\|(1) de la personne qui exécute la conversion. -.IP "\fB\-o, \-\-oldfile \s-1FICHIER\s0 …\fR" 4 -.IX Item "-o, --oldfile FICHIER …" -Ancien mode de fichiers. Convertit le fichier \s-1FICHIER\s0 et écrit la sortie -dedans. Le programme fonctionne dans ce mode par défaut. Les jokers peuvent -être utilisés. -.Sp -Dans l'ancien mode (en place) des fichiers, les fichiers convertis ont le -même propriétaire, groupe et permissions lecture/écriture que le fichier -original. Idem quand le fichier est converti par un utilisateur qui a la -permission d'écrire dans le fichier (par exemple, root). La conversion est -interrompue si il n'est pas possible de conserver les valeurs d'origine. Le -changement de propriétaire pourrait signifier que le propriétaire original -n'est plus en mesure de lire le fichier. Le changement de groupe pourrait -être un risque pour la sécurité. Le fichier pourrait être rendu accessible -en lecture par des personnes à qui il n'est pas destiné. La conservation du -propriétaire, du groupe et des permissions de lecture/écriture n'est -supportée que sous Unix. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Mode silencieux. Supprime les avertissements et les messages. La valeur de -sortie est zéro sauf quand de mauvaises options sont utilisées sur la ligne -de commande. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -Supprime la marque d'ordre des octets (\s-1BOM\s0). N'écrit pas la \s-1BOM\s0 dans le -fichier de sortie. Ceci est le comportement par défaut lorsque les sauts de -lignes sont convertis au format Unix. Consultez aussi l'option \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s, \-\-safe\fR" 4 -.IX Item "-s, --safe" -Ignore les fichiers binaires (par défaut). -.IP "\fB\-u, \-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -Conserve l'encodage \s-1UTF\-16\s0 original du fichier d'entrée. Le fichier de -sortie sera écrit dans le même encodage \s-1UTF\-16 \s0(petit ou grand boutien) que -le fichier d'entrée. Ceci évite la transformation en \s-1UTF\-8.\s0 Une \s-1BOM UTF\-16\s0 -sera écrite en conséquent. Cette option peut être désactivée avec l'option -\&\f(CW\*(C`\-ascii\*(C'\fR. -.IP "\fB\-ul, \-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -Suppose que le fichier d'entrée est au format \s-1UTF\-16LE.\s0 -.Sp -Quand il y a un indicateur d'ordre des octets dans le fichier d'entrée, -l'indicateur a priorité sur cette option. -.Sp -Si vous vous êtes trompé sur le format du fichier d'entrée (par exemple, ce -n'était pas un fichier \s-1UTF16\-LE\s0) et que la conversion réussi, vous -obtiendrez un fichier \s-1UTF\-8\s0 contenant le mauvais texte. Vous pouvez -récupérer le fichier original avec \fIiconv\fR\|(1) en convertissant le fichier de -sortie \s-1UTF\-8\s0 vers du \s-1UTF\-16LE.\s0 -.Sp -La présupposition de l'\s-1UTF\-16LE\s0 fonctionne comme un \fImode de -conversion\fR. En utilisant le mode \fIascii\fR par défaut, \s-1UTF\-16LE\s0 n'est plus -présupposé. -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -Suppose que le fichier d'entrée est au format \s-1UTF\-16BE.\s0 -.Sp -Cette option fonctionne comme l'option \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v, \-\-verbose\fR" 4 -.IX Item "-v, --verbose" -Affiche des messages verbeux. Des informations supplémentaires sont -affichées à propos des marques d'ordre des octets et du nombre de sauts de -lignes convertis. -.IP "\fB\-F, \-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -Suit les liens symboliques et convertit les cibles. -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Remplace les liens symboliques par les fichiers convertis (les fichiers -cibles originaux restent inchangés). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -Ne change pas les liens symboliques ni les cibles (par défaut). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -Affiche les informations de version puis arrête. -.SH "MODE MAC" -.IX Header "MODE MAC" -En mode normal, les sauts de lignes sont convertis du \s-1DOS\s0 vers Unix et -inversement. Les sauts de lignes Mac ne sont pas convertis. -.PP -En mode Mac, les sauts de lignes sont convertis du format Mac au format Unix -et inversement. Les sauts de lignes \s-1DOS\s0 ne sont pas changés. -.PP -Pour fonctionner en mode Mac, utilisez l'option en ligne de commande \f(CW\*(C`\-c -mac\*(C'\fR ou utilisez les commandes \f(CW\*(C`mac2unix\*(C'\fR ou \f(CW\*(C`unix2mac\*(C'\fR. -.SH "MODES DE CONVERSION" -.IX Header "MODES DE CONVERSION" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -En mode \f(CW\*(C`ascii\*(C'\fR, seuls les sauts de lignes sont convertis. Ceci est le mode -de conversion par défaut. -.Sp -Bien que le nom de ce mode soit \s-1ASCII,\s0 qui est un standard 7 bits, ce mode -travail en réalité sur 8 bits. Utilisez toujours ce mode lorsque vous -convertissez des fichiers Unicode \s-1UTF\-8.\s0 -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -Dans ce mode, tous les caractères 8 bits non \s-1ASCII \s0(avec des valeurs entre -128 et 255) sont remplacés par une espace 7 bits. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Les caractères sont convertis entre un jeu de caractères \s-1DOS \s0(code page) et -le jeu de caractères \s-1ISO\-8859\-1 \s0(Latin\-1) de Unix. Les caractères \s-1DOS\s0 sans -équivalent \s-1ISO\-8859\-1,\s0 pour lesquels la conversion n'est pas possible, sont -remplacés par un point. La même chose est valable pour les caractères -\&\s-1ISO\-8859\-1\s0 sans équivalent \s-1DOS.\s0 -.Sp -Quand seule l'option \f(CW\*(C`\-iso\*(C'\fR est utilisée, dos2unix essaie de déterminer le -code page actif. Quand ce n'est pas possible, dos2unix utilise le code page -\&\s-1CP437\s0 par défaut qui est surtout utilisé aux \s-1USA.\s0 Pour forcer l'utilisation -d'un code page spécifique, utilisez les options \f(CW\*(C`\-437\*(C'\fR (\s-1US\s0), \f(CW\*(C`\-850\*(C'\fR -(Europe de l'ouest), \f(CW\*(C`\-860\*(C'\fR (portugais), \f(CW\*(C`\-863\*(C'\fR (français canadien) ou -\&\f(CW\*(C`\-865\*(C'\fR (nordique). Le code page \s-1CP1252\s0 de Windows (Europe de l'ouest) est -également supporté avec l'option \f(CW\*(C`\-1252\*(C'\fR. Pour d'autres codes pages, -utilisez dos2unix avec \fIiconv\fR\|(1). Iconv supporte une longue liste de codages -de caractères. -.Sp -N'utilisez jamais la conversion \s-1ISO\s0 sur des fichiers textes Unicode. Cela va -corrompre les fichiers encodés en \s-1UTF\-8.\s0 -.Sp -Quelques exemples: -.Sp -Convertir du code page par défaut du \s-1DOS\s0 au Latin\-1 Unix : -.Sp -.Vb 1 -\& dos2unix \-iso \-n entrée.txt sortie.txt -.Ve -.Sp -Convertir du \s-1CP850\s0 du \s-1DOS\s0 au Latin\-1 Unix : -.Sp -.Vb 1 -\& dos2unix \-850 \-n entrée.txt sortie.txt -.Ve -.Sp -Convertir du \s-1CP1252\s0 de Windows au Latin\-1 de Unix : -.Sp -.Vb 1 -\& dos2unix \-1252 \-n entrée.txt sortie.txt -.Ve -.Sp -Convertir le \s-1CP1252\s0 de Windows en \s-1UTF\-8\s0 de Unix (Unicode) : -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 entrée.txt | dos2unix > sortie.txt -.Ve -.Sp -Convertir du Latin\-1 de Unix au code page par défaut de \s-1DOS :\s0 -.Sp -.Vb 1 -\& unix2dos \-iso \-n entrée.txt sortie.txt -.Ve -.Sp -Convertir le Latin\-1 de Unix en \s-1CP850\s0 du \s-1DOS :\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n entrée.txt sortie.txt -.Ve -.Sp -Convertir le Latin\-1 de Unix en \s-1CP1252\s0 de Windows : -.Sp -.Vb 1 -\& unix2dos \-1252 \-n entrée.txt sortie.txt -.Ve -.Sp -Convertir le \s-1UTF\-8\s0 de Unix (Unicode) en \s-1CP1252\s0 de Windows : -.Sp -.Vb 1 -\& unix2dos < entrée.txt | iconv \-f UTF\-8 \-t CP1252 > sortie.txt -.Ve -.Sp -Consultez aussi et -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Codages" -.IX Subsection "Codages" -Il existe plusieurs codages Unicode. Sous Unix et Linux, les fichiers sont -généralement codés en \s-1UTF\-8.\s0 Sous Windows, les fichiers textes Unicode -peuvent être codés en \s-1UTF\-8, UTF\-16\s0 ou \s-1UTF\-16\s0 gros boutien mais ils sont -majoritairement codés au format \s-1UTF\-16.\s0 -.SS "Conversion" -.IX Subsection "Conversion" -Les fichiers textes Unicode peuvent avoir des sauts de lignes \s-1DOS,\s0 Unix ou -Mac, tout comme les fichiers textes normaux. -.PP -Toutes les versions de dos2unix et unix2dos peuvent convertir des fichiers -codés en \s-1UTF\-8\s0 car \s-1UTF\-8\s0 a été conçu pour être rétro\-compatible avec -l'\s-1ASCII.\s0 -.PP -Dos2unix et unix2dos, avec le support pour l'Unicode \s-1UTF\-16,\s0 peuvent lire -les fichiers textes codés sous forme petit boutien ou gros boutien. Pour -savoir si dos2unix a été compilé avec le support \s-1UTF\-16\s0 tapez \f(CW\*(C`dos2unix -\&\-V\*(C'\fR. -.PP -Sous Unix/Linux, les fichiers encodés en \s-1UTF\-16\s0 sont convertis vers -l'encodage des caractères de la localisation. Utilisez \fIlocale\fR\|(1) pour -découvrir quel encodage de caractères est utilisé. Lorsque la conversion -n'est pas possible, une erreur de conversion est produite et le fichier est -abandonné. -.PP -Sous Windows, les fichiers \s-1UTF\-16\s0 sont convertis par défaut en \s-1UTF\-8.\s0 Les -fichiers textes formatés en \s-1UTF\-8\s0 sont bien supportés sous Windows et -Unix/Linux. -.PP -Les codages \s-1UTF\-16\s0 et \s-1UTF\-8\s0 sont parfaitement compatibles. Il n'y a pas de -pertes lors de la conversion. Lorsqu'une erreur de conversion \s-1UTF\-16\s0 vers -\&\s-1UTF\-8\s0 survient, par exemple, quand le fichier d'entrée \s-1UTF\-16\s0 contient une -erreur, le fichier est ignoré. -.PP -Quand l'option \f(CW\*(C`\-u\*(C'\fR est utilisée, le fichier de sortie est écrit dans le -même encodage \s-1UTF\-16\s0 que le fichier d'entrée. L'option \f(CW\*(C`\-u\*(C'\fR empêche la -conversion en \s-1UTF\-8.\s0 -.PP -Dos2unix et unix2dos n'ont pas d'option pour convertir des fichiers \s-1UTF\-8\s0 en -\&\s-1UTF\-16.\s0 -.PP -Les modes de conversion \s-1ISO\s0 et 7 bits ne fonctionnent pas sur des fichiers -\&\s-1UTF\-16.\s0 -.SS "Marque d'ordre des octets" -.IX Subsection "Marque d'ordre des octets" -Les fichiers textes Unicode sous Windows on généralement un indicateur -d'ordre des octets (\s-1BOM\s0) car de nombreux programmes Windows (y compris -Notepad) ajoutent cet indicateur par défaut. Consultez aussi -. -.PP -Sous Unix, les fichiers Unicodes n'ont habituellement pas de \s-1BOM.\s0 Il est -supposé que les fichiers textes sont codés selon le codage de -l'environnement linguistique. -.PP -Dos2unix ne peut détecter que le fichier est au format \s-1UTF\-16\s0 si le fichier -n'a pas de \s-1BOM.\s0 Quand le fichier \s-1UTF\-16\s0 n'a pas cet indicateur, dos2unix -voit le fichier comme un fichier binaire. -.PP -Utilisez l'option \f(CW\*(C`\-ul\*(C'\fR ou \f(CW\*(C`\-ub\*(C'\fR pour convertir un fichier \s-1UTF\-16\s0 sans -\&\s-1BOM.\s0 -.PP -Dos2unix, par défaut, n'écrit pas de \s-1BOM\s0 dans le fichier de sortie. Avec -l'option \f(CW\*(C`\-b\*(C'\fR, Dos2unix écrit une \s-1BOM\s0 quand le fichier d'entrée a une \s-1BOM.\s0 -.PP -Unix2dos écrit par défaut une \s-1BOM\s0 dans le fichier de sortie quand le fichier -d'entrée a une \s-1BOM.\s0 Utilisez l'option \f(CW\*(C`\-r\*(C'\fR pour supprimer la \s-1BOM.\s0 -.PP -Dos2unix et unix2dos écrivent toujours une \s-1BOM\s0 quand l'option \f(CW\*(C`\-m\*(C'\fR est -utilisée. -.SS "Exemples Unicode" -.IX Subsection "Exemples Unicode" -Convertir de l'\s-1UTF\-16\s0 Windows (avec \s-1BOM\s0) vers l'\s-1UTF\-8\s0 de Unix : -.PP -.Vb 1 -\& dos2unix \-n entrée.txt sortie.txt -.Ve -.PP -Convertir de l'\s-1UTF\-16LE\s0 de Windows (sans \s-1BOM\s0) vers l'\s-1UTF\-8\s0 de Unix : -.PP -.Vb 1 -\& dos2unix \-ul \-n entrée.txt sortie.txt -.Ve -.PP -Convertir de l'\s-1UTF\-8\s0 de Unix vers l'\s-1UTF\-8\s0 de Windows avec \s-1BOM :\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n entrée.txt sortie.txt -.Ve -.PP -Convertir de l'\s-1UTF\-8\s0 de Unix vers l'\s-1UTF\-16\s0 de Windows : -.PP -.Vb 1 -\& unix2dos < entrée.txt | iconv \-f UTF\-8 \-t UTF\-16 > sortie.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 est un standard du gouvernement chinois. Tout logiciel vendu en -Chine doit officiellement supporter un sous ensemble obligatoire du standard -\&\s-1GB18030.\s0 Consultez . -.PP -\&\s-1GB18030\s0 est entièrement compatible avec Unicode et peut être considéré comme -étant un format de transformation unicode. Comme \s-1UTF\-8, GB18030\s0 est -compatible avec \s-1ASCII. GB18030\s0 est aussi compatible avec le code page 936 de -Windows aussi connu comme \s-1GBK.\s0 -.PP -Sous Unix/Linux, les fichiers \s-1UTF\-16\s0 sont convertis en \s-1GB18030\s0 quand -l'encodage de la localisation est \s-1GB18030.\s0 Notez que cela ne fonctionnera -que si l'emplacement est en Chine. Autrement dit, dans la localisation -anglaise britannique \f(CW\*(C`en_GB.GB18030\*(C'\fR, la conversion de \s-1UTF\-16\s0 vers \s-1GB18030\s0 -ne fonctionnera pas mais une localisation chinoise \f(CW\*(C`zh_CN.GB18030\*(C'\fR -fonctionnera. -.PP -Sous Windows, vous avez besoin de l'option \f(CW\*(C`\-gb\*(C'\fR pour convertir \s-1UTF\-16\s0 en -\&\s-1GB18030.\s0 -.PP -Les fichiers encodés en \s-1GB18030\s0 peuvent avoir une marque d'ordre des octets, -comme les fichiers Unicode. -.SH "EXEMPLES" -.IX Header "EXEMPLES" -Lire l'entrée depuis « stdin » et écrire la sortie vers « stdout » : -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Convertir et remplacer a.txt. Convertir et remplace b.txt : -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Convertir et remplacer a.txt en mode de conversion ascii : -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Convertir et remplacer a.txt en mode de conversion ascii. Convertir et -remplacer b.txt en mode de conversion 7 bits : -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Convertir a.txt depuis le format Mac vers le format Unix : -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Convertir a.txt du format Unix au format Mac : -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Convertir et remplacer a.txt tout en conservant la date originale : -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Convertir a.txt et écrire dans e.txt : -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Convertir a.txt et écrire dans e.txt. La date de e.txt est la même que celle -de a.txt : -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Convertir et remplacer a.txt. Convertir b.txt et écrire dans e.txt : -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Convertir c.txt et écrire dans e.txt. Convertir et remplacer -a.txt. Convertir et remplacer b.txt. Convertir d.txt et écrire dans f.txt : -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "CONVERSIONS RÉCURSIVES" -.IX Header "CONVERSIONS RÉCURSIVES" -Utilisez dos2unix avec les commandes \fIfind\fR\|(1) et \fIxargs\fR\|(1) pour convertir -récursivement des fichiers textes dans une arborescence de répertoires. Par -exemple, pour convertir tous les fichiers .txt dans les répertoires sous le -répertoire courant, tapez: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "PARAMÈTRES LINGUISTIQUES" -.IX Header "PARAMÈTRES LINGUISTIQUES" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -La langue principale est sélectionnée par la variable d'environnement -\&\s-1LANG.\s0 La variable \s-1LANG\s0 est composée de plusieurs parties. La première partie -est le code de la langue en minuscules. La deuxième partie est le code du -pays en majuscules précédé d'un souligné. Elle est facultative. Il y a aussi -une troisième partie facultative qui est le codage des caractères précédé -par un point. Voici quelques exemples pour un shell au standard \s-1POSIX:\s0 -.Sp -.Vb 7 -\& export LANG=fr Français -\& export LANG=fr_CA Français, Canada -\& export LANG=fr_BE Français, Belgique -\& export LANG=es_ES Espagnol, Espagne -\& export LANG=es_MX Espagnol, Mexique -\& export LANG=en_US.iso88591 Anglais, USA, codage Latin\-1 -\& export LANG=en_GB.UTF\-8 Anglais, UK, codage UTF\-8 -.Ve -.Sp -La liste complète des codes de langues et de pays est dans le manuel de -gettext: - -.Sp -Sur les systèmes Unix, vous pouvez utiliser la commande \fIlocale\fR\|(1) pour -obtenir des informations sur l'environnement linguistique. -.IP "\fB\s-1LANGUE\s0\fR" 4 -.IX Item "LANGUE" -Avec la variable d'environnement \s-1LANGUAGE,\s0 vous pouvez spécifier une liste -de langues prioritaires séparées par des deux-points. Dos2unix fait passer -\&\s-1LANGUAGE\s0 avant \s-1LANG.\s0 Par exemple, pour utiliser le français avant l'anglais: -\&\f(CW\*(C`LANGUAGE=fr:en\*(C'\fR. Vous devez d'abord activer l'environnement linguistique -en assignant une valeur autre que « C » à \s-1LANG \s0(ou \s-1LC_ALL\s0). Ensuite, vous -pourrez utiliser la liste de priorité avec la variable \s-1LANGUAGE.\s0 Voyez -également le manuel de gettext: - -.Sp -Si vous sélectionnez une langue qui n'est pas disponible, vous obtiendrez -des messages en anglais standard. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Grâce à la variable d'environnement \s-1DOS2UNIX_LOCALEDIR,\s0 la variable -\&\s-1LOCALEDIR\s0 compilée dans l'application peut être remplacée. \s-1LOCALEDIR\s0 est -utilisée pour trouver les fichiers de langue. La valeur par défaut de \s-1GNU\s0 -est \f(CW\*(C`/usr/local/share/locale\*(C'\fR. L'option \fB\-\-version\fR affiche la valeur de -\&\s-1LOCALEDIR\s0 utilisée. -.Sp -Exemple (shell \s-1POSIX\s0): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "VALEUR DE RETOUR" -.IX Header "VALEUR DE RETOUR" -Zéro est retourné en cas de succès. Si une erreur système se produit, la -dernière erreur système est retournée. Pour les autres erreurs, 1 est -renvoyé. -.PP -La valeur de sortie est toujours zéro en mode silencieux sauf quand de -mauvaises options sont utilisées sur la ligne de commande. -.SH "STANDARDS" -.IX Header "STANDARDS" - -.PP - -.PP - -.PP - -.SH "AUTEURS" -.IX Header "AUTEURS" -Benjamin Lin \- , Bernd Johannes Wuebben (mode -mac2unix) \- , Christian Wurll (ajout de saut de ligne -supplémentaire) \- , Erwin Waterlander \- - (Mainteneur) -.PP -Page du projet: -.PP -Page SourceForge: -.SH "VOIR AUSSI" -.IX Header "VOIR AUSSI" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/fr/man1/unix2mac.1 b/Tools/dos2unix/share/man/fr/man1/unix2mac.1 deleted file mode 100644 index 069326a..0000000 --- a/Tools/dos2unix/share/man/fr/man1/unix2mac.1 +++ /dev/null @@ -1,775 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NOM" -.IX Header "NOM" -dos2unix \- Convertit les fichiers textes du format DOS/Mac vers Unix et -inversement -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -.Vb 2 -\& dos2unix [options] [FICHIER …] [\-n FICHIER_ENTRÉE FICHIER_SORTIE …] -\& unix2dos [options] [FICHIER …] [\-n FICHIER_ENTRÉE FICHIER_SORTIE …] -.Ve -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -Le package Dos2unix inclut les utilitaires \f(CW\*(C`dos2unix\*(C'\fR et \f(CW\*(C`unix2dos\*(C'\fR pour -convertir des fichiers textes au format \s-1DOS\s0 ou Mac vers le format Unix et -inversement. -.PP -Dans les fichiers textes DOS/Windows, un saut de ligne est une combinaison -de deux caractères: un retour de chariot (\s-1CR\s0) suivi d'un saut de ligne -(\s-1LF\s0). Dans les fichiers textes Unix, le saut de ligne est un seul caractère: -le saut de ligne (\s-1LF\s0). Les fichiers textes Mac, avant Mac \s-1OS X,\s0 utilisaient -le retour chariot (\s-1CR\s0) comme seul caractère. De nos jours, Mac \s-1OS\s0 utilise le -même style de saut de ligne que Unix (\s-1LF\s0). -.PP -Outre les sauts de lignes, Dos2unix convertit aussi le codage des -fichiers. Quelques codes page \s-1DOS\s0 peuvent être convertis en Latin\-1 sous -Unix. L'Unicode des fichiers Windows (\s-1UTF\-16\s0) peut être converti en Unicode -Unix (\s-1UTF\-8\s0). -.PP -Les fichiers binaires sont automatiquement ignorés à moins que la conversion -soit forcée. -.PP -Les fichiers non réguliers tels que les répertoires et les FIFOs sont -automatiquement ignorés. -.PP -Les liens symboliques et leur cible sont, par défaut, inchangés. En option, -les liens symboliques peuvent être remplacés ou, au choix, la sortie peut -être écrite dans la cible du lien symbolique. Écrire dans la cible d'un lien -symbolique n'est pas supporté sous Windows. -.PP -Dos2unix a été conçu comme dos2unix sous SunOS/Solaris. Il y a une -différence importante avec la version originale de SunOS/Solaris. Cette -version effectue les conversions en place (ancien mode de fichiers) tandis -que la version originale de SunOS/Solaris ne supporte que la conversion par -paire (nouveau mode de fichier). Voyez aussi les options \f(CW\*(C`\-o\*(C'\fR et \f(CW\*(C`\-n\*(C'\fR. -.SH "OPTIONS" -.IX Header "OPTIONS" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Traites toutes les options à sa suite comme étant des noms de -fichiers. Utilisez cette option si vous voulez convertir des fichiers dont -le nom commence par un tiret. Par exemple, pour convertir un fichier nommé -« \-foo », vous pouvez utiliser cette commande: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -Ou dans le style des nouveaux fichiers: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo sortie.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Convertit uniquement les sauts de lignes. C'est le mode de conversion par -défaut. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Convertit le jeu de caractères du \s-1DOS\s0 vers \s-1ISO\-8859\-1.\s0 Voyez aussi la -section des \s-1MODES DE CONVERSION.\s0 -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Utilise le code page 1252 de Windows (Europe de l'ouest). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -Utilise le code page 437 du \s-1DOS \s0(\s-1US\s0). C'est le code page par défaut pour les -conversions \s-1ISO.\s0 -.IP "\fB\-850\fR" 4 -.IX Item "-850" -Utilise le code page 850 du \s-1DOS \s0(Europe de l'ouest). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -Utilise le code page 860 du \s-1DOS \s0(portugais). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -Utilise le code page 863 du \s-1DOS \s0(français canadien). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -Utilise le code page 865 du \s-1DOS \s0(nordique). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Convertit les caractères 8 bits vers l'espace 7 bits. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Conserve la marque d'ordre des octets (\s-1BOM\s0). Si le fichier d'entrée a une -\&\s-1BOM,\s0 elle est écrite dans le fichier de sortie. C'est le comportement par -défaut quand les sauts de lignes sont convertis au format \s-1DOS.\s0 Consultez -aussi l'option \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode \s-1MODE_CONV\s0\fR" 4 -.IX Item "-c, --convmode MODE_CONV" -Change le mode de conversion. \s-1MODE_CONV\s0 prend l'une des valeurs: \fIascii\fR, -\&\fI7bit\fR, \fIiso\fR, \fImac\fR. Ascii est la valeur par défaut. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -Force la conversion de fichiers binaires. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -Sous Windows, les fichiers \s-1UTF\-16\s0 sont convertis en \s-1UTF\-8\s0 par défaut sans -considération pour les paramètres de la localisation. Utilisez cette option -pour convertir \s-1UTF\-16\s0 en \s-1GB18030.\s0 Cette option n'est disponible que sous -Windows. Consultez aussi la section \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -Affiche l'aide et s'arrête. -.IP "\fB\-i[\s-1FANIONS\s0], \-\-info[=FANIONS] \s-1FICHIER\s0 …\fR" 4 -.IX Item "-i[FANIONS], --info[=FANIONS] FICHIER …" -Affiche les informations du fichier. Aucune conversion n'est réalisée. -.Sp -Les informations suivantes sont affichées dans cet ordre: le nombre de sauts -de ligne \s-1DOS,\s0 le nombre de sauts de ligne Unix, le nombre de sauts de ligne -Mac, la marque d'ordre des octets, texte ou binaire, nom du fichier. -.Sp -Exemple de sortie : -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Des fanions facultatifs peuvent être ajoutés pour changer la sortie. Un ou -plusieurs fanions peuvent être ajoutés. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Affiche le nombre de sauts de ligne \s-1DOS.\s0 -.IP "\fBu\fR" 4 -.IX Item "u" -Affiche le nombre de sauts de ligne Unix. -.IP "\fBm\fR" 4 -.IX Item "m" -Affiche le nombre de sauts de ligne Mac. -.IP "\fBb\fR" 4 -.IX Item "b" -Afficher la marque d'ordre des octets. -.IP "\fBt\fR" 4 -.IX Item "t" -Affiche si le fichier est texte ou binaire. -.IP "\fBc\fR" 4 -.IX Item "c" -Affiche uniquement les fichiers qui seraient convertis. -.Sp -Avec le fanion \f(CW\*(C`c\*(C'\fR, dos2unix n'affichera que les fichiers contenant des -sauts de ligne \s-1DOS\s0 alors que unix2dos n'affichera que les noms des fichiers -aillant des sauts de ligne Unix. -.RE -.RS 4 -.Sp -Exemples: -.Sp -Afficher les informations pour tous les fichier *.txt : -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Afficher uniquement le nombre de sauts de ligne \s-1DOS\s0 et Unix : -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Montrer uniquement la marque d'ordre des octets : -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -Liste les fichiers qui ont des sauts de ligne \s-1DOS :\s0 -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -Liste les fichiers qui ont des sauts de ligne Unix : -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -La date du fichier de sortie est la même que celle du fichier d'entrée. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -Affiche la licence du programme. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -Ajoute des sauts de lignes additionnels. -.Sp -\&\fBdos2unix\fR: Seuls les sauts de lignes du \s-1DOS\s0 sont changés en deux sauts de -lignes de Unix. En mode Mac, seuls les sauts de lignes Mac sont changés en -deux sauts de lignes Unix. -.Sp -\&\fBunix2dos\fR: Seuls les sauts de lignes Unix sont changés en deux sauts de -lignes du \s-1DOS.\s0 En mode Mac, les sauts de lignes Unix sont remplacés par deux -sauts de lignes Mac. -.IP "\fB\-m, \-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -Écrit une marque d'ordre des octets (\s-1BOM\s0) dans le fichier de sortie. Par -défaut une \s-1BOM UTF\-8\s0 est écrite. -.Sp -Lorsque le fichier d'entrée est en \s-1UTF\-16\s0 et que l'option \f(CW\*(C`\-u\*(C'\fR est -utilisée, une \s-1BOM UTF\-16\s0 est écrite. -.Sp -N'utilisez jamais cette option quand l'encodage du fichier de sortie n'est -ni \s-1UTF\-8\s0 ni \s-1UTF\-16.\s0 Consultez également la section \s-1UNICODE.\s0 -.IP "\fB\-n, \-\-newline FICHIER_ENTRÉE \s-1FICHIER_SORTIE\s0 …\fR" 4 -.IX Item "-n, --newline FICHIER_ENTRÉE FICHIER_SORTIE …" -Nouveau mode de fichiers. Convertit le fichier FICHER_ENTRÉE et écrit la -sortie dans le fichier \s-1FICHIER_SORTIE.\s0 Les noms des fichiers doivent être -indiqués par paires. Les jokers \fIne\fR doivent \fIpas\fR être utilisés ou vous -\&\fIperdrez\fR vos fichiers. -.Sp -La personne qui démarre la conversion dans le nouveau mode (pairé) des -fichiers sera le propriétaire du fichier converti. Les permissions de -lecture/écriture du nouveau fichier seront les permissions du fichier -original moins le \fIumask\fR\|(1) de la personne qui exécute la conversion. -.IP "\fB\-o, \-\-oldfile \s-1FICHIER\s0 …\fR" 4 -.IX Item "-o, --oldfile FICHIER …" -Ancien mode de fichiers. Convertit le fichier \s-1FICHIER\s0 et écrit la sortie -dedans. Le programme fonctionne dans ce mode par défaut. Les jokers peuvent -être utilisés. -.Sp -Dans l'ancien mode (en place) des fichiers, les fichiers convertis ont le -même propriétaire, groupe et permissions lecture/écriture que le fichier -original. Idem quand le fichier est converti par un utilisateur qui a la -permission d'écrire dans le fichier (par exemple, root). La conversion est -interrompue si il n'est pas possible de conserver les valeurs d'origine. Le -changement de propriétaire pourrait signifier que le propriétaire original -n'est plus en mesure de lire le fichier. Le changement de groupe pourrait -être un risque pour la sécurité. Le fichier pourrait être rendu accessible -en lecture par des personnes à qui il n'est pas destiné. La conservation du -propriétaire, du groupe et des permissions de lecture/écriture n'est -supportée que sous Unix. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Mode silencieux. Supprime les avertissements et les messages. La valeur de -sortie est zéro sauf quand de mauvaises options sont utilisées sur la ligne -de commande. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -Supprime la marque d'ordre des octets (\s-1BOM\s0). N'écrit pas la \s-1BOM\s0 dans le -fichier de sortie. Ceci est le comportement par défaut lorsque les sauts de -lignes sont convertis au format Unix. Consultez aussi l'option \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s, \-\-safe\fR" 4 -.IX Item "-s, --safe" -Ignore les fichiers binaires (par défaut). -.IP "\fB\-u, \-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -Conserve l'encodage \s-1UTF\-16\s0 original du fichier d'entrée. Le fichier de -sortie sera écrit dans le même encodage \s-1UTF\-16 \s0(petit ou grand boutien) que -le fichier d'entrée. Ceci évite la transformation en \s-1UTF\-8.\s0 Une \s-1BOM UTF\-16\s0 -sera écrite en conséquent. Cette option peut être désactivée avec l'option -\&\f(CW\*(C`\-ascii\*(C'\fR. -.IP "\fB\-ul, \-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -Suppose que le fichier d'entrée est au format \s-1UTF\-16LE.\s0 -.Sp -Quand il y a un indicateur d'ordre des octets dans le fichier d'entrée, -l'indicateur a priorité sur cette option. -.Sp -Si vous vous êtes trompé sur le format du fichier d'entrée (par exemple, ce -n'était pas un fichier \s-1UTF16\-LE\s0) et que la conversion réussi, vous -obtiendrez un fichier \s-1UTF\-8\s0 contenant le mauvais texte. Vous pouvez -récupérer le fichier original avec \fIiconv\fR\|(1) en convertissant le fichier de -sortie \s-1UTF\-8\s0 vers du \s-1UTF\-16LE.\s0 -.Sp -La présupposition de l'\s-1UTF\-16LE\s0 fonctionne comme un \fImode de -conversion\fR. En utilisant le mode \fIascii\fR par défaut, \s-1UTF\-16LE\s0 n'est plus -présupposé. -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -Suppose que le fichier d'entrée est au format \s-1UTF\-16BE.\s0 -.Sp -Cette option fonctionne comme l'option \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v, \-\-verbose\fR" 4 -.IX Item "-v, --verbose" -Affiche des messages verbeux. Des informations supplémentaires sont -affichées à propos des marques d'ordre des octets et du nombre de sauts de -lignes convertis. -.IP "\fB\-F, \-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -Suit les liens symboliques et convertit les cibles. -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Remplace les liens symboliques par les fichiers convertis (les fichiers -cibles originaux restent inchangés). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -Ne change pas les liens symboliques ni les cibles (par défaut). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -Affiche les informations de version puis arrête. -.SH "MODE MAC" -.IX Header "MODE MAC" -En mode normal, les sauts de lignes sont convertis du \s-1DOS\s0 vers Unix et -inversement. Les sauts de lignes Mac ne sont pas convertis. -.PP -En mode Mac, les sauts de lignes sont convertis du format Mac au format Unix -et inversement. Les sauts de lignes \s-1DOS\s0 ne sont pas changés. -.PP -Pour fonctionner en mode Mac, utilisez l'option en ligne de commande \f(CW\*(C`\-c -mac\*(C'\fR ou utilisez les commandes \f(CW\*(C`mac2unix\*(C'\fR ou \f(CW\*(C`unix2mac\*(C'\fR. -.SH "MODES DE CONVERSION" -.IX Header "MODES DE CONVERSION" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -En mode \f(CW\*(C`ascii\*(C'\fR, seuls les sauts de lignes sont convertis. Ceci est le mode -de conversion par défaut. -.Sp -Bien que le nom de ce mode soit \s-1ASCII,\s0 qui est un standard 7 bits, ce mode -travail en réalité sur 8 bits. Utilisez toujours ce mode lorsque vous -convertissez des fichiers Unicode \s-1UTF\-8.\s0 -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -Dans ce mode, tous les caractères 8 bits non \s-1ASCII \s0(avec des valeurs entre -128 et 255) sont remplacés par une espace 7 bits. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Les caractères sont convertis entre un jeu de caractères \s-1DOS \s0(code page) et -le jeu de caractères \s-1ISO\-8859\-1 \s0(Latin\-1) de Unix. Les caractères \s-1DOS\s0 sans -équivalent \s-1ISO\-8859\-1,\s0 pour lesquels la conversion n'est pas possible, sont -remplacés par un point. La même chose est valable pour les caractères -\&\s-1ISO\-8859\-1\s0 sans équivalent \s-1DOS.\s0 -.Sp -Quand seule l'option \f(CW\*(C`\-iso\*(C'\fR est utilisée, dos2unix essaie de déterminer le -code page actif. Quand ce n'est pas possible, dos2unix utilise le code page -\&\s-1CP437\s0 par défaut qui est surtout utilisé aux \s-1USA.\s0 Pour forcer l'utilisation -d'un code page spécifique, utilisez les options \f(CW\*(C`\-437\*(C'\fR (\s-1US\s0), \f(CW\*(C`\-850\*(C'\fR -(Europe de l'ouest), \f(CW\*(C`\-860\*(C'\fR (portugais), \f(CW\*(C`\-863\*(C'\fR (français canadien) ou -\&\f(CW\*(C`\-865\*(C'\fR (nordique). Le code page \s-1CP1252\s0 de Windows (Europe de l'ouest) est -également supporté avec l'option \f(CW\*(C`\-1252\*(C'\fR. Pour d'autres codes pages, -utilisez dos2unix avec \fIiconv\fR\|(1). Iconv supporte une longue liste de codages -de caractères. -.Sp -N'utilisez jamais la conversion \s-1ISO\s0 sur des fichiers textes Unicode. Cela va -corrompre les fichiers encodés en \s-1UTF\-8.\s0 -.Sp -Quelques exemples: -.Sp -Convertir du code page par défaut du \s-1DOS\s0 au Latin\-1 Unix : -.Sp -.Vb 1 -\& dos2unix \-iso \-n entrée.txt sortie.txt -.Ve -.Sp -Convertir du \s-1CP850\s0 du \s-1DOS\s0 au Latin\-1 Unix : -.Sp -.Vb 1 -\& dos2unix \-850 \-n entrée.txt sortie.txt -.Ve -.Sp -Convertir du \s-1CP1252\s0 de Windows au Latin\-1 de Unix : -.Sp -.Vb 1 -\& dos2unix \-1252 \-n entrée.txt sortie.txt -.Ve -.Sp -Convertir le \s-1CP1252\s0 de Windows en \s-1UTF\-8\s0 de Unix (Unicode) : -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 entrée.txt | dos2unix > sortie.txt -.Ve -.Sp -Convertir du Latin\-1 de Unix au code page par défaut de \s-1DOS :\s0 -.Sp -.Vb 1 -\& unix2dos \-iso \-n entrée.txt sortie.txt -.Ve -.Sp -Convertir le Latin\-1 de Unix en \s-1CP850\s0 du \s-1DOS :\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n entrée.txt sortie.txt -.Ve -.Sp -Convertir le Latin\-1 de Unix en \s-1CP1252\s0 de Windows : -.Sp -.Vb 1 -\& unix2dos \-1252 \-n entrée.txt sortie.txt -.Ve -.Sp -Convertir le \s-1UTF\-8\s0 de Unix (Unicode) en \s-1CP1252\s0 de Windows : -.Sp -.Vb 1 -\& unix2dos < entrée.txt | iconv \-f UTF\-8 \-t CP1252 > sortie.txt -.Ve -.Sp -Consultez aussi et -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Codages" -.IX Subsection "Codages" -Il existe plusieurs codages Unicode. Sous Unix et Linux, les fichiers sont -généralement codés en \s-1UTF\-8.\s0 Sous Windows, les fichiers textes Unicode -peuvent être codés en \s-1UTF\-8, UTF\-16\s0 ou \s-1UTF\-16\s0 gros boutien mais ils sont -majoritairement codés au format \s-1UTF\-16.\s0 -.SS "Conversion" -.IX Subsection "Conversion" -Les fichiers textes Unicode peuvent avoir des sauts de lignes \s-1DOS,\s0 Unix ou -Mac, tout comme les fichiers textes normaux. -.PP -Toutes les versions de dos2unix et unix2dos peuvent convertir des fichiers -codés en \s-1UTF\-8\s0 car \s-1UTF\-8\s0 a été conçu pour être rétro\-compatible avec -l'\s-1ASCII.\s0 -.PP -Dos2unix et unix2dos, avec le support pour l'Unicode \s-1UTF\-16,\s0 peuvent lire -les fichiers textes codés sous forme petit boutien ou gros boutien. Pour -savoir si dos2unix a été compilé avec le support \s-1UTF\-16\s0 tapez \f(CW\*(C`dos2unix -\&\-V\*(C'\fR. -.PP -Sous Unix/Linux, les fichiers encodés en \s-1UTF\-16\s0 sont convertis vers -l'encodage des caractères de la localisation. Utilisez \fIlocale\fR\|(1) pour -découvrir quel encodage de caractères est utilisé. Lorsque la conversion -n'est pas possible, une erreur de conversion est produite et le fichier est -abandonné. -.PP -Sous Windows, les fichiers \s-1UTF\-16\s0 sont convertis par défaut en \s-1UTF\-8.\s0 Les -fichiers textes formatés en \s-1UTF\-8\s0 sont bien supportés sous Windows et -Unix/Linux. -.PP -Les codages \s-1UTF\-16\s0 et \s-1UTF\-8\s0 sont parfaitement compatibles. Il n'y a pas de -pertes lors de la conversion. Lorsqu'une erreur de conversion \s-1UTF\-16\s0 vers -\&\s-1UTF\-8\s0 survient, par exemple, quand le fichier d'entrée \s-1UTF\-16\s0 contient une -erreur, le fichier est ignoré. -.PP -Quand l'option \f(CW\*(C`\-u\*(C'\fR est utilisée, le fichier de sortie est écrit dans le -même encodage \s-1UTF\-16\s0 que le fichier d'entrée. L'option \f(CW\*(C`\-u\*(C'\fR empêche la -conversion en \s-1UTF\-8.\s0 -.PP -Dos2unix et unix2dos n'ont pas d'option pour convertir des fichiers \s-1UTF\-8\s0 en -\&\s-1UTF\-16.\s0 -.PP -Les modes de conversion \s-1ISO\s0 et 7 bits ne fonctionnent pas sur des fichiers -\&\s-1UTF\-16.\s0 -.SS "Marque d'ordre des octets" -.IX Subsection "Marque d'ordre des octets" -Les fichiers textes Unicode sous Windows on généralement un indicateur -d'ordre des octets (\s-1BOM\s0) car de nombreux programmes Windows (y compris -Notepad) ajoutent cet indicateur par défaut. Consultez aussi -. -.PP -Sous Unix, les fichiers Unicodes n'ont habituellement pas de \s-1BOM.\s0 Il est -supposé que les fichiers textes sont codés selon le codage de -l'environnement linguistique. -.PP -Dos2unix ne peut détecter que le fichier est au format \s-1UTF\-16\s0 si le fichier -n'a pas de \s-1BOM.\s0 Quand le fichier \s-1UTF\-16\s0 n'a pas cet indicateur, dos2unix -voit le fichier comme un fichier binaire. -.PP -Utilisez l'option \f(CW\*(C`\-ul\*(C'\fR ou \f(CW\*(C`\-ub\*(C'\fR pour convertir un fichier \s-1UTF\-16\s0 sans -\&\s-1BOM.\s0 -.PP -Dos2unix, par défaut, n'écrit pas de \s-1BOM\s0 dans le fichier de sortie. Avec -l'option \f(CW\*(C`\-b\*(C'\fR, Dos2unix écrit une \s-1BOM\s0 quand le fichier d'entrée a une \s-1BOM.\s0 -.PP -Unix2dos écrit par défaut une \s-1BOM\s0 dans le fichier de sortie quand le fichier -d'entrée a une \s-1BOM.\s0 Utilisez l'option \f(CW\*(C`\-r\*(C'\fR pour supprimer la \s-1BOM.\s0 -.PP -Dos2unix et unix2dos écrivent toujours une \s-1BOM\s0 quand l'option \f(CW\*(C`\-m\*(C'\fR est -utilisée. -.SS "Exemples Unicode" -.IX Subsection "Exemples Unicode" -Convertir de l'\s-1UTF\-16\s0 Windows (avec \s-1BOM\s0) vers l'\s-1UTF\-8\s0 de Unix : -.PP -.Vb 1 -\& dos2unix \-n entrée.txt sortie.txt -.Ve -.PP -Convertir de l'\s-1UTF\-16LE\s0 de Windows (sans \s-1BOM\s0) vers l'\s-1UTF\-8\s0 de Unix : -.PP -.Vb 1 -\& dos2unix \-ul \-n entrée.txt sortie.txt -.Ve -.PP -Convertir de l'\s-1UTF\-8\s0 de Unix vers l'\s-1UTF\-8\s0 de Windows avec \s-1BOM :\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n entrée.txt sortie.txt -.Ve -.PP -Convertir de l'\s-1UTF\-8\s0 de Unix vers l'\s-1UTF\-16\s0 de Windows : -.PP -.Vb 1 -\& unix2dos < entrée.txt | iconv \-f UTF\-8 \-t UTF\-16 > sortie.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 est un standard du gouvernement chinois. Tout logiciel vendu en -Chine doit officiellement supporter un sous ensemble obligatoire du standard -\&\s-1GB18030.\s0 Consultez . -.PP -\&\s-1GB18030\s0 est entièrement compatible avec Unicode et peut être considéré comme -étant un format de transformation unicode. Comme \s-1UTF\-8, GB18030\s0 est -compatible avec \s-1ASCII. GB18030\s0 est aussi compatible avec le code page 936 de -Windows aussi connu comme \s-1GBK.\s0 -.PP -Sous Unix/Linux, les fichiers \s-1UTF\-16\s0 sont convertis en \s-1GB18030\s0 quand -l'encodage de la localisation est \s-1GB18030.\s0 Notez que cela ne fonctionnera -que si l'emplacement est en Chine. Autrement dit, dans la localisation -anglaise britannique \f(CW\*(C`en_GB.GB18030\*(C'\fR, la conversion de \s-1UTF\-16\s0 vers \s-1GB18030\s0 -ne fonctionnera pas mais une localisation chinoise \f(CW\*(C`zh_CN.GB18030\*(C'\fR -fonctionnera. -.PP -Sous Windows, vous avez besoin de l'option \f(CW\*(C`\-gb\*(C'\fR pour convertir \s-1UTF\-16\s0 en -\&\s-1GB18030.\s0 -.PP -Les fichiers encodés en \s-1GB18030\s0 peuvent avoir une marque d'ordre des octets, -comme les fichiers Unicode. -.SH "EXEMPLES" -.IX Header "EXEMPLES" -Lire l'entrée depuis « stdin » et écrire la sortie vers « stdout » : -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Convertir et remplacer a.txt. Convertir et remplace b.txt : -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Convertir et remplacer a.txt en mode de conversion ascii : -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Convertir et remplacer a.txt en mode de conversion ascii. Convertir et -remplacer b.txt en mode de conversion 7 bits : -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Convertir a.txt depuis le format Mac vers le format Unix : -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Convertir a.txt du format Unix au format Mac : -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Convertir et remplacer a.txt tout en conservant la date originale : -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Convertir a.txt et écrire dans e.txt : -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Convertir a.txt et écrire dans e.txt. La date de e.txt est la même que celle -de a.txt : -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Convertir et remplacer a.txt. Convertir b.txt et écrire dans e.txt : -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Convertir c.txt et écrire dans e.txt. Convertir et remplacer -a.txt. Convertir et remplacer b.txt. Convertir d.txt et écrire dans f.txt : -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "CONVERSIONS RÉCURSIVES" -.IX Header "CONVERSIONS RÉCURSIVES" -Utilisez dos2unix avec les commandes \fIfind\fR\|(1) et \fIxargs\fR\|(1) pour convertir -récursivement des fichiers textes dans une arborescence de répertoires. Par -exemple, pour convertir tous les fichiers .txt dans les répertoires sous le -répertoire courant, tapez: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "PARAMÈTRES LINGUISTIQUES" -.IX Header "PARAMÈTRES LINGUISTIQUES" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -La langue principale est sélectionnée par la variable d'environnement -\&\s-1LANG.\s0 La variable \s-1LANG\s0 est composée de plusieurs parties. La première partie -est le code de la langue en minuscules. La deuxième partie est le code du -pays en majuscules précédé d'un souligné. Elle est facultative. Il y a aussi -une troisième partie facultative qui est le codage des caractères précédé -par un point. Voici quelques exemples pour un shell au standard \s-1POSIX:\s0 -.Sp -.Vb 7 -\& export LANG=fr Français -\& export LANG=fr_CA Français, Canada -\& export LANG=fr_BE Français, Belgique -\& export LANG=es_ES Espagnol, Espagne -\& export LANG=es_MX Espagnol, Mexique -\& export LANG=en_US.iso88591 Anglais, USA, codage Latin\-1 -\& export LANG=en_GB.UTF\-8 Anglais, UK, codage UTF\-8 -.Ve -.Sp -La liste complète des codes de langues et de pays est dans le manuel de -gettext: - -.Sp -Sur les systèmes Unix, vous pouvez utiliser la commande \fIlocale\fR\|(1) pour -obtenir des informations sur l'environnement linguistique. -.IP "\fB\s-1LANGUE\s0\fR" 4 -.IX Item "LANGUE" -Avec la variable d'environnement \s-1LANGUAGE,\s0 vous pouvez spécifier une liste -de langues prioritaires séparées par des deux-points. Dos2unix fait passer -\&\s-1LANGUAGE\s0 avant \s-1LANG.\s0 Par exemple, pour utiliser le français avant l'anglais: -\&\f(CW\*(C`LANGUAGE=fr:en\*(C'\fR. Vous devez d'abord activer l'environnement linguistique -en assignant une valeur autre que « C » à \s-1LANG \s0(ou \s-1LC_ALL\s0). Ensuite, vous -pourrez utiliser la liste de priorité avec la variable \s-1LANGUAGE.\s0 Voyez -également le manuel de gettext: - -.Sp -Si vous sélectionnez une langue qui n'est pas disponible, vous obtiendrez -des messages en anglais standard. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Grâce à la variable d'environnement \s-1DOS2UNIX_LOCALEDIR,\s0 la variable -\&\s-1LOCALEDIR\s0 compilée dans l'application peut être remplacée. \s-1LOCALEDIR\s0 est -utilisée pour trouver les fichiers de langue. La valeur par défaut de \s-1GNU\s0 -est \f(CW\*(C`/usr/local/share/locale\*(C'\fR. L'option \fB\-\-version\fR affiche la valeur de -\&\s-1LOCALEDIR\s0 utilisée. -.Sp -Exemple (shell \s-1POSIX\s0): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "VALEUR DE RETOUR" -.IX Header "VALEUR DE RETOUR" -Zéro est retourné en cas de succès. Si une erreur système se produit, la -dernière erreur système est retournée. Pour les autres erreurs, 1 est -renvoyé. -.PP -La valeur de sortie est toujours zéro en mode silencieux sauf quand de -mauvaises options sont utilisées sur la ligne de commande. -.SH "STANDARDS" -.IX Header "STANDARDS" - -.PP - -.PP - -.PP - -.SH "AUTEURS" -.IX Header "AUTEURS" -Benjamin Lin \- , Bernd Johannes Wuebben (mode -mac2unix) \- , Christian Wurll (ajout de saut de ligne -supplémentaire) \- , Erwin Waterlander \- - (Mainteneur) -.PP -Page du projet: -.PP -Page SourceForge: -.SH "VOIR AUSSI" -.IX Header "VOIR AUSSI" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/man1/dos2unix.1 b/Tools/dos2unix/share/man/man1/dos2unix.1 deleted file mode 100644 index 2933558..0000000 --- a/Tools/dos2unix/share/man/man1/dos2unix.1 +++ /dev/null @@ -1,730 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-01-02" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NAME" -dos2unix \- DOS/Mac to Unix and vice versa text file format converter -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -.Vb 2 -\& dos2unix [options] [FILE ...] [\-n INFILE OUTFILE ...] -\& unix2dos [options] [FILE ...] [\-n INFILE OUTFILE ...] -.Ve -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -The Dos2unix package includes utilities \f(CW\*(C`dos2unix\*(C'\fR and \f(CW\*(C`unix2dos\*(C'\fR to convert -plain text files in \s-1DOS\s0 or Mac format to Unix format and vice versa. -.PP -In DOS/Windows text files a line break, also known as newline, is a combination -of two characters: a Carriage Return (\s-1CR\s0) followed by a Line Feed (\s-1LF\s0). In Unix -text files a line break is a single character: the Line Feed (\s-1LF\s0). In Mac text -files, prior to Mac \s-1OS X,\s0 a line break was single Carriage Return (\s-1CR\s0) -character. Nowadays Mac \s-1OS\s0 uses Unix style (\s-1LF\s0) line breaks. -.PP -Besides line breaks Dos2unix can also convert the encoding of files. A few -\&\s-1DOS\s0 code pages can be converted to Unix Latin\-1. And Windows Unicode (\s-1UTF\-16\s0) -files can be converted to Unix Unicode (\s-1UTF\-8\s0) files. -.PP -Binary files are automatically skipped, unless conversion is forced. -.PP -Non-regular files, such as directories and FIFOs, are automatically skipped. -.PP -Symbolic links and their targets are by default kept untouched. Symbolic links -can optionally be replaced, or the output can be written to the symbolic link -target. Writing to a symbolic link target is not supported on Windows. -.PP -Dos2unix was modelled after dos2unix under SunOS/Solaris. There is one -important difference with the original SunOS/Solaris version. This version does -by default in-place conversion (old file mode), while the original -SunOS/Solaris version only supports paired conversion (new file mode). See also -options \f(CW\*(C`\-o\*(C'\fR and \f(CW\*(C`\-n\*(C'\fR. -.SH "OPTIONS" -.IX Header "OPTIONS" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Treat all following options as file names. Use this option if you want to -convert files whose names start with a dash. For instance to convert -a file named \*(L"\-foo\*(R", you can use this command: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -Or in new file mode: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo out.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Convert only line breaks. This is the default conversion mode. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Conversion between \s-1DOS\s0 and \s-1ISO\-8859\-1\s0 character set. See also section -\&\s-1CONVERSION MODES.\s0 -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Use Windows code page 1252 (Western European). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -Use \s-1DOS\s0 code page 437 (\s-1US\s0). This is the default code page used for \s-1ISO\s0 conversion. -.IP "\fB\-850\fR" 4 -.IX Item "-850" -Use \s-1DOS\s0 code page 850 (Western European). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -Use \s-1DOS\s0 code page 860 (Portuguese). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -Use \s-1DOS\s0 code page 863 (French Canadian). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -Use \s-1DOS\s0 code page 865 (Nordic). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Convert 8 bit characters to 7 bit space. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Keep Byte Order Mark (\s-1BOM\s0). When the input file has a \s-1BOM,\s0 write a \s-1BOM\s0 in -the output file. This is the default behavior when converting to \s-1DOS\s0 line -breaks. See also option \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode \s-1CONVMODE\s0\fR" 4 -.IX Item "-c, --convmode CONVMODE" -Set conversion mode. Where \s-1CONVMODE\s0 is one of: -\&\fIascii\fR, \fI7bit\fR, \fIiso\fR, \fImac\fR -with ascii being the default. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -Force conversion of binary files. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -On Windows \s-1UTF\-16\s0 files are by default converted to \s-1UTF\-8,\s0 regardless of the -locale setting. Use this option to convert \s-1UTF\-16\s0 files to \s-1GB18030.\s0 This option -is only available on Windows. See also section \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -Display help and exit. -.IP "\fB\-i[\s-1FLAGS\s0], \-\-info[=FLAGS] \s-1FILE ...\s0\fR" 4 -.IX Item "-i[FLAGS], --info[=FLAGS] FILE ..." -Display file information. No conversion is done. -.Sp -The following information is printed, in this order: number of \s-1DOS\s0 line breaks, -number of Unix line breaks, number of Mac line breaks, byte order mark, text -or binary, file name. -.Sp -Example output: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Optionally extra flags can be set to change the output. One or more flags -can be added. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Print number of \s-1DOS\s0 line breaks. -.IP "\fBu\fR" 4 -.IX Item "u" -Print number of Unix line breaks. -.IP "\fBm\fR" 4 -.IX Item "m" -Print number of Mac line breaks. -.IP "\fBb\fR" 4 -.IX Item "b" -Print the byte order mark. -.IP "\fBt\fR" 4 -.IX Item "t" -Print if file is text or binary. -.IP "\fBc\fR" 4 -.IX Item "c" -Print only the files that would be converted. -.Sp -With the \f(CW\*(C`c\*(C'\fR flag dos2unix will print only the files that contain \s-1DOS\s0 line breaks, -unix2dos will print only file names that have Unix line breaks. -.RE -.RS 4 -.Sp -Examples: -.Sp -Show information for all *.txt files: -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Show only the number of \s-1DOS\s0 line breaks and Unix line breaks: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Show only the byte order mark: -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -List the files that have \s-1DOS\s0 line breaks: -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -List the files that have Unix line breaks: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -Keep the date stamp of output file same as input file. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -Display program's license. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -Add additional newline. -.Sp -\&\fBdos2unix\fR: Only \s-1DOS\s0 line breaks are changed to two Unix line breaks. -In Mac mode only Mac line breaks are changed to two Unix -line breaks. -.Sp -\&\fBunix2dos\fR: Only Unix line breaks are changed to two \s-1DOS\s0 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 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 -File names must be given in pairs and wildcard names should \fInot\fR be -used or you \fIwill\fR lose your files. -.Sp -The person who starts the conversion in new file (paired) mode will be the owner -of the converted file. The read/write permissions of the new file will be the -permissions of the original file minus the \fIumask\fR\|(1) of the person who runs the -conversion. -.IP "\fB\-o, \-\-oldfile \s-1FILE ...\s0\fR" 4 -.IX Item "-o, --oldfile FILE ..." -Old file mode. Convert file \s-1FILE\s0 and overwrite output to it. The program -defaults to run in this mode. Wildcard names may be used. -.Sp -In old file (in-place) mode the converted file gets the same owner, group, and -read/write permissions as the original file. Also when the file is converted by -another user who has write permissions on the file (e.g. user root). The -conversion will be aborted when it is not possible to preserve the original -values. Change of owner could mean that the original owner is not able to read -the file any more. Change of group could be a security risk, the file could be -made readable for persons for whom it is not intended. Preservation of owner, -group, and read/write permissions is only supported on Unix. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Quiet mode. Suppress all warnings and messages. The return value is zero. -Except when wrong command-line options are used. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -Remove Byte Order Mark (\s-1BOM\s0). Do not write a \s-1BOM\s0 in the output file. -This is the default behavior when converting to Unix line breaks. -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 -.Sp -When there is a Byte Order Mark in the input file the \s-1BOM\s0 has priority over -this option. -.Sp -When you made a wrong assumption (the input file was not in \s-1UTF\-16LE\s0 format) and -the conversion succeeded, you will get an \s-1UTF\-8\s0 output file with wrong text. -You can undo the wrong conversion with \fIiconv\fR\|(1) by converting the \s-1UTF\-8\s0 output -file back to \s-1UTF\-16LE.\s0 This will bring back the original file. -.Sp -The assumption of \s-1UTF\-16LE\s0 works as a \fIconversion mode\fR. By switching to the default -\&\fIascii\fR mode the \s-1UTF\-16LE\s0 assumption is turned off. -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -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. -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Replace symbolic links with converted files -(original target files remain unchanged). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -Keep symbolic links and targets unchanged (default). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -Display version information and exit. -.SH "MAC MODE" -.IX Header "MAC MODE" -In normal mode line breaks are converted from \s-1DOS\s0 to Unix and vice versa. -Mac line breaks are not converted. -.PP -In Mac mode line breaks are converted from Mac to Unix and vice versa. \s-1DOS\s0 -line breaks are not changed. -.PP -To run in Mac mode use the command-line option \f(CW\*(C`\-c mac\*(C'\fR or use the -commands \f(CW\*(C`mac2unix\*(C'\fR or \f(CW\*(C`unix2mac\*(C'\fR. -.SH "CONVERSION MODES" -.IX Header "CONVERSION MODES" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -In mode \f(CW\*(C`ascii\*(C'\fR only line breaks are converted. This is the default conversion -mode. -.Sp -Although the name of this mode is \s-1ASCII,\s0 which is a 7 bit standard, the -actual mode is 8 bit. Use always this mode when converting Unicode \s-1UTF\-8\s0 -files. -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -In this mode all 8 bit non-ASCII characters (with values from 128 to 255) -are converted to a 7 bit space. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Characters are converted between a \s-1DOS\s0 character set (code page) and \s-1ISO\s0 -character set \s-1ISO\-8859\-1 \s0(Latin\-1) on Unix. \s-1DOS\s0 characters without \s-1ISO\-8859\-1\s0 -equivalent, for which conversion is not possible, are converted to a dot. The -same counts for \s-1ISO\-8859\-1\s0 characters without \s-1DOS\s0 counterpart. -.Sp -When only option \f(CW\*(C`\-iso\*(C'\fR is used dos2unix will try to determine the active code -page. When this is not possible dos2unix will use default code page \s-1CP437,\s0 -which is mainly used in the \s-1USA. \s0 To force a specific code page use options -\&\f(CW\*(C`\-437\*(C'\fR (\s-1US\s0), \f(CW\*(C`\-850\*(C'\fR (Western European), \f(CW\*(C`\-860\*(C'\fR (Portuguese), \f(CW\*(C`\-863\*(C'\fR (French -Canadian), or \f(CW\*(C`\-865\*(C'\fR (Nordic). Windows code page \s-1CP1252 \s0(Western European) is -also supported with option \f(CW\*(C`\-1252\*(C'\fR. For other code pages use dos2unix in -combination with \fIiconv\fR\|(1). Iconv can convert between a long list of character -encodings. -.Sp -Never use \s-1ISO\s0 conversion on Unicode text files. It will corrupt \s-1UTF\-8\s0 encoded files. -.Sp -Some examples: -.Sp -Convert from \s-1DOS\s0 default code page to Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-iso \-n in.txt out.txt -.Ve -.Sp -Convert from \s-1DOS CP850\s0 to Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-850 \-n in.txt out.txt -.Ve -.Sp -Convert from Windows \s-1CP1252\s0 to Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n in.txt out.txt -.Ve -.Sp -Convert from Windows \s-1CP1252\s0 to Unix \s-1UTF\-8 \s0(Unicode): -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 in.txt | dos2unix > out.txt -.Ve -.Sp -Convert from Unix Latin\-1 to \s-1DOS\s0 default code page: -.Sp -.Vb 1 -\& unix2dos \-iso \-n in.txt out.txt -.Ve -.Sp -Convert from Unix Latin\-1 to \s-1DOS CP850:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n in.txt out.txt -.Ve -.Sp -Convert from Unix Latin\-1 to Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos \-1252 \-n in.txt out.txt -.Ve -.Sp -Convert from Unix \s-1UTF\-8 \s0(Unicode) to Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t CP1252 > out.txt -.Ve -.Sp -See also -and . -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Encodings" -.IX Subsection "Encodings" -There exist different Unicode encodings. On Unix and Linux Unicode files are -typically encoded in \s-1UTF\-8\s0 encoding. On Windows Unicode text files can be -encoded in \s-1UTF\-8, UTF\-16,\s0 or \s-1UTF\-16\s0 big endian, but are mostly encoded in -\&\s-1UTF\-16\s0 format. -.SS "Conversion" -.IX Subsection "Conversion" -Unicode text files can have \s-1DOS,\s0 Unix or Mac line breaks, like regular text -files. -.PP -All versions of dos2unix and unix2dos can convert \s-1UTF\-8\s0 encoded files, because -\&\s-1UTF\-8\s0 was designed for backward compatibility with \s-1ASCII.\s0 -.PP -Dos2unix and unix2dos with Unicode \s-1UTF\-16\s0 support, can read little and big -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 -On Unix/Linux \s-1UTF\-16\s0 encoded files are converted to the locale character -encoding. Use the \fIlocale\fR\|(1) command to find out what the locale character -encoding is. When conversion is not possible a conversion error will occur and -the file will be skipped. -.PP -On Windows \s-1UTF\-16\s0 files are by default converted to \s-1UTF\-8. UTF\-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 -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" -.IX Subsection "Byte Order Mark" -On Windows Unicode text files typically have a Byte Order Mark (\s-1BOM\s0), because -many Windows programs (including Notepad) add BOMs by default. See also -. -.PP -On Unix Unicode files typically don't have a \s-1BOM.\s0 It is assumed that text files -are encoded in the locale character encoding. -.PP -Dos2unix can only detect if a file is in \s-1UTF\-16\s0 format if the file has a \s-1BOM.\s0 -When an \s-1UTF\-16\s0 file doesn't have a \s-1BOM,\s0 dos2unix will see the file as a binary -file. -.PP -Use option \f(CW\*(C`\-ul\*(C'\fR or \f(CW\*(C`\-ub\*(C'\fR to convert an \s-1UTF\-16\s0 file without \s-1BOM.\s0 -.PP -Dos2unix writes by default no \s-1BOM\s0 in the output file. With option \f(CW\*(C`\-b\*(C'\fR -Dos2unix writes a \s-1BOM\s0 when the input file has a \s-1BOM.\s0 -.PP -Unix2dos writes by default a \s-1BOM\s0 in the output file when the input file has a -\&\s-1BOM.\s0 Use option \f(CW\*(C`\-r\*(C'\fR to remove the \s-1BOM.\s0 -.PP -Dos2unix and unix2dos write always a \s-1BOM\s0 when option \f(CW\*(C`\-m\*(C'\fR is used. -.SS "Unicode examples" -.IX Subsection "Unicode examples" -Convert from Windows \s-1UTF\-16 \s0(with \s-1BOM\s0) to Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-n in.txt out.txt -.Ve -.PP -Convert from Windows \s-1UTF\-16LE \s0(without \s-1BOM\s0) to Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-ul \-n in.txt out.txt -.Ve -.PP -Convert from Unix \s-1UTF\-8\s0 to Windows \s-1UTF\-8\s0 with \s-1BOM:\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n in.txt out.txt -.Ve -.PP -Convert from Unix \s-1UTF\-8\s0 to Windows \s-1UTF\-16:\s0 -.PP -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t UTF\-16 > out.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 is a Chinese government standard. A mandatory subset of the \s-1GB18030\s0 -standard is officially required for all software products sold in China. See -also . -.PP -\&\s-1GB18030\s0 is fully compatible with Unicode, and can be considered an unicode -transformation format. Like \s-1UTF\-8, GB18030\s0 is compatible with \s-1ASCII. GB18030\s0 -is also compatible with Windows code page 936, also known as \s-1GBK.\s0 -.PP -On Unix/Linux \s-1UTF\-16\s0 files are converted to \s-1GB18030\s0 when the locale encoding is -set to \s-1GB18030.\s0 Note that this will only work if the location is set to China. -E.g. in an English British locale setting \f(CW\*(C`en_GB.GB18030\*(C'\fR conversion of \s-1UTF\-16\s0 -to \s-1GB18030\s0 will not work, but in a Chinese \f(CW\*(C`zh_CN.GB18030\*(C'\fR locale setting it -will work. -.PP -On Windows you need to use option \f(CW\*(C`\-gb\*(C'\fR to convert \s-1UTF\-16\s0 files to \s-1GB18030.\s0 -.PP -\&\s-1GB18030\s0 encoded files can have a Byte Order Mark, like Unicode files. -.SH "EXAMPLES" -.IX Header "EXAMPLES" -Read input from 'stdin' and write output to 'stdout': -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Convert and replace a.txt. Convert and replace b.txt: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Convert and replace a.txt in ascii conversion mode: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Convert and replace a.txt in ascii conversion mode, -convert and replace b.txt in 7bit conversion mode: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Convert a.txt from Mac to Unix format: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Convert a.txt from Unix to Mac format: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Convert and replace a.txt while keeping original date stamp: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Convert a.txt and write to e.txt: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Convert a.txt and write to e.txt, keep date stamp of e.txt same as a.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Convert and replace a.txt, convert b.txt and write to e.txt: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Convert c.txt and write to e.txt, convert and replace a.txt, -convert and replace b.txt, convert d.txt and write to f.txt: -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "RECURSIVE CONVERSION" -.IX Header "RECURSIVE CONVERSION" -Use dos2unix in combination with the \fIfind\fR\|(1) and \fIxargs\fR\|(1) commands to -recursively convert text files in a directory tree structure. For instance to -convert all .txt files in the directory tree under the current directory type: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "LOCALIZATION" -.IX Header "LOCALIZATION" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -The primary language is selected with the environment variable \s-1LANG.\s0 The \s-1LANG\s0 -variable consists out of several parts. The first part is in small letters the -language code. The second is optional and is the country code in capital -letters, preceded with an underscore. There is also an optional third part: -character encoding, preceded with a dot. A few examples for \s-1POSIX\s0 standard type -shells: -.Sp -.Vb 7 -\& export LANG=nl Dutch -\& export LANG=nl_NL Dutch, The Netherlands -\& export LANG=nl_BE Dutch, Belgium -\& export LANG=es_ES Spanish, Spain -\& export LANG=es_MX Spanish, Mexico -\& export LANG=en_US.iso88591 English, USA, Latin\-1 encoding -\& export LANG=en_GB.UTF\-8 English, UK, UTF\-8 encoding -.Ve -.Sp -For a complete list of language and country codes see the gettext manual: - -.Sp -On Unix systems you can use the command \fIlocale\fR\|(1) to get locale specific -information. -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -With the \s-1LANGUAGE\s0 environment variable you can specify a priority list of -languages, separated by colons. Dos2unix gives preference to \s-1LANGUAGE\s0 over \s-1LANG.\s0 -For instance, first Dutch and then German: \f(CW\*(C`LANGUAGE=nl:de\*(C'\fR. You have to first -enable localization, by setting \s-1LANG \s0(or \s-1LC_ALL\s0) to a value other than -\&\*(L"C\*(R", before you can use a language priority list through the \s-1LANGUAGE\s0 -variable. See also the gettext manual: - -.Sp -If you select a language which is not available you will get the -standard English messages. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -With the environment variable \s-1DOS2UNIX_LOCALEDIR\s0 the \s-1LOCALEDIR\s0 set -during compilation can be overruled. \s-1LOCALEDIR\s0 is used to find the -language files. The \s-1GNU\s0 default value is \f(CW\*(C`/usr/local/share/locale\*(C'\fR. -Option \fB\-\-version\fR will display the \s-1LOCALEDIR\s0 that is used. -.Sp -Example (\s-1POSIX\s0 shell): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "RETURN VALUE" -.IX Header "RETURN VALUE" -On success, zero is returned. When a system error occurs the last system error will be -returned. For other errors 1 is returned. -.PP -The return value is always zero in quiet mode, except when wrong command-line options -are used. -.SH "STANDARDS" -.IX Header "STANDARDS" - -.PP - -.PP - -.PP - -.SH "AUTHORS" -.IX Header "AUTHORS" -Benjamin Lin \- , -Bernd Johannes Wuebben (mac2unix mode) \- , -Christian Wurll (add extra newline) \- , -Erwin Waterlander \- (maintainer) -.PP -Project page: -.PP -SourceForge page: -.SH "SEE ALSO" -.IX Header "SEE ALSO" -\&\fIfile\fR\|(1) -\&\fIfind\fR\|(1) -\&\fIiconv\fR\|(1) -\&\fIlocale\fR\|(1) -\&\fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/man1/mac2unix.1 b/Tools/dos2unix/share/man/man1/mac2unix.1 deleted file mode 100644 index 2933558..0000000 --- a/Tools/dos2unix/share/man/man1/mac2unix.1 +++ /dev/null @@ -1,730 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-01-02" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NAME" -dos2unix \- DOS/Mac to Unix and vice versa text file format converter -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -.Vb 2 -\& dos2unix [options] [FILE ...] [\-n INFILE OUTFILE ...] -\& unix2dos [options] [FILE ...] [\-n INFILE OUTFILE ...] -.Ve -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -The Dos2unix package includes utilities \f(CW\*(C`dos2unix\*(C'\fR and \f(CW\*(C`unix2dos\*(C'\fR to convert -plain text files in \s-1DOS\s0 or Mac format to Unix format and vice versa. -.PP -In DOS/Windows text files a line break, also known as newline, is a combination -of two characters: a Carriage Return (\s-1CR\s0) followed by a Line Feed (\s-1LF\s0). In Unix -text files a line break is a single character: the Line Feed (\s-1LF\s0). In Mac text -files, prior to Mac \s-1OS X,\s0 a line break was single Carriage Return (\s-1CR\s0) -character. Nowadays Mac \s-1OS\s0 uses Unix style (\s-1LF\s0) line breaks. -.PP -Besides line breaks Dos2unix can also convert the encoding of files. A few -\&\s-1DOS\s0 code pages can be converted to Unix Latin\-1. And Windows Unicode (\s-1UTF\-16\s0) -files can be converted to Unix Unicode (\s-1UTF\-8\s0) files. -.PP -Binary files are automatically skipped, unless conversion is forced. -.PP -Non-regular files, such as directories and FIFOs, are automatically skipped. -.PP -Symbolic links and their targets are by default kept untouched. Symbolic links -can optionally be replaced, or the output can be written to the symbolic link -target. Writing to a symbolic link target is not supported on Windows. -.PP -Dos2unix was modelled after dos2unix under SunOS/Solaris. There is one -important difference with the original SunOS/Solaris version. This version does -by default in-place conversion (old file mode), while the original -SunOS/Solaris version only supports paired conversion (new file mode). See also -options \f(CW\*(C`\-o\*(C'\fR and \f(CW\*(C`\-n\*(C'\fR. -.SH "OPTIONS" -.IX Header "OPTIONS" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Treat all following options as file names. Use this option if you want to -convert files whose names start with a dash. For instance to convert -a file named \*(L"\-foo\*(R", you can use this command: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -Or in new file mode: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo out.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Convert only line breaks. This is the default conversion mode. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Conversion between \s-1DOS\s0 and \s-1ISO\-8859\-1\s0 character set. See also section -\&\s-1CONVERSION MODES.\s0 -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Use Windows code page 1252 (Western European). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -Use \s-1DOS\s0 code page 437 (\s-1US\s0). This is the default code page used for \s-1ISO\s0 conversion. -.IP "\fB\-850\fR" 4 -.IX Item "-850" -Use \s-1DOS\s0 code page 850 (Western European). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -Use \s-1DOS\s0 code page 860 (Portuguese). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -Use \s-1DOS\s0 code page 863 (French Canadian). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -Use \s-1DOS\s0 code page 865 (Nordic). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Convert 8 bit characters to 7 bit space. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Keep Byte Order Mark (\s-1BOM\s0). When the input file has a \s-1BOM,\s0 write a \s-1BOM\s0 in -the output file. This is the default behavior when converting to \s-1DOS\s0 line -breaks. See also option \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode \s-1CONVMODE\s0\fR" 4 -.IX Item "-c, --convmode CONVMODE" -Set conversion mode. Where \s-1CONVMODE\s0 is one of: -\&\fIascii\fR, \fI7bit\fR, \fIiso\fR, \fImac\fR -with ascii being the default. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -Force conversion of binary files. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -On Windows \s-1UTF\-16\s0 files are by default converted to \s-1UTF\-8,\s0 regardless of the -locale setting. Use this option to convert \s-1UTF\-16\s0 files to \s-1GB18030.\s0 This option -is only available on Windows. See also section \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -Display help and exit. -.IP "\fB\-i[\s-1FLAGS\s0], \-\-info[=FLAGS] \s-1FILE ...\s0\fR" 4 -.IX Item "-i[FLAGS], --info[=FLAGS] FILE ..." -Display file information. No conversion is done. -.Sp -The following information is printed, in this order: number of \s-1DOS\s0 line breaks, -number of Unix line breaks, number of Mac line breaks, byte order mark, text -or binary, file name. -.Sp -Example output: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Optionally extra flags can be set to change the output. One or more flags -can be added. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Print number of \s-1DOS\s0 line breaks. -.IP "\fBu\fR" 4 -.IX Item "u" -Print number of Unix line breaks. -.IP "\fBm\fR" 4 -.IX Item "m" -Print number of Mac line breaks. -.IP "\fBb\fR" 4 -.IX Item "b" -Print the byte order mark. -.IP "\fBt\fR" 4 -.IX Item "t" -Print if file is text or binary. -.IP "\fBc\fR" 4 -.IX Item "c" -Print only the files that would be converted. -.Sp -With the \f(CW\*(C`c\*(C'\fR flag dos2unix will print only the files that contain \s-1DOS\s0 line breaks, -unix2dos will print only file names that have Unix line breaks. -.RE -.RS 4 -.Sp -Examples: -.Sp -Show information for all *.txt files: -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Show only the number of \s-1DOS\s0 line breaks and Unix line breaks: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Show only the byte order mark: -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -List the files that have \s-1DOS\s0 line breaks: -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -List the files that have Unix line breaks: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -Keep the date stamp of output file same as input file. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -Display program's license. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -Add additional newline. -.Sp -\&\fBdos2unix\fR: Only \s-1DOS\s0 line breaks are changed to two Unix line breaks. -In Mac mode only Mac line breaks are changed to two Unix -line breaks. -.Sp -\&\fBunix2dos\fR: Only Unix line breaks are changed to two \s-1DOS\s0 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 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 -File names must be given in pairs and wildcard names should \fInot\fR be -used or you \fIwill\fR lose your files. -.Sp -The person who starts the conversion in new file (paired) mode will be the owner -of the converted file. The read/write permissions of the new file will be the -permissions of the original file minus the \fIumask\fR\|(1) of the person who runs the -conversion. -.IP "\fB\-o, \-\-oldfile \s-1FILE ...\s0\fR" 4 -.IX Item "-o, --oldfile FILE ..." -Old file mode. Convert file \s-1FILE\s0 and overwrite output to it. The program -defaults to run in this mode. Wildcard names may be used. -.Sp -In old file (in-place) mode the converted file gets the same owner, group, and -read/write permissions as the original file. Also when the file is converted by -another user who has write permissions on the file (e.g. user root). The -conversion will be aborted when it is not possible to preserve the original -values. Change of owner could mean that the original owner is not able to read -the file any more. Change of group could be a security risk, the file could be -made readable for persons for whom it is not intended. Preservation of owner, -group, and read/write permissions is only supported on Unix. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Quiet mode. Suppress all warnings and messages. The return value is zero. -Except when wrong command-line options are used. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -Remove Byte Order Mark (\s-1BOM\s0). Do not write a \s-1BOM\s0 in the output file. -This is the default behavior when converting to Unix line breaks. -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 -.Sp -When there is a Byte Order Mark in the input file the \s-1BOM\s0 has priority over -this option. -.Sp -When you made a wrong assumption (the input file was not in \s-1UTF\-16LE\s0 format) and -the conversion succeeded, you will get an \s-1UTF\-8\s0 output file with wrong text. -You can undo the wrong conversion with \fIiconv\fR\|(1) by converting the \s-1UTF\-8\s0 output -file back to \s-1UTF\-16LE.\s0 This will bring back the original file. -.Sp -The assumption of \s-1UTF\-16LE\s0 works as a \fIconversion mode\fR. By switching to the default -\&\fIascii\fR mode the \s-1UTF\-16LE\s0 assumption is turned off. -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -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. -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Replace symbolic links with converted files -(original target files remain unchanged). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -Keep symbolic links and targets unchanged (default). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -Display version information and exit. -.SH "MAC MODE" -.IX Header "MAC MODE" -In normal mode line breaks are converted from \s-1DOS\s0 to Unix and vice versa. -Mac line breaks are not converted. -.PP -In Mac mode line breaks are converted from Mac to Unix and vice versa. \s-1DOS\s0 -line breaks are not changed. -.PP -To run in Mac mode use the command-line option \f(CW\*(C`\-c mac\*(C'\fR or use the -commands \f(CW\*(C`mac2unix\*(C'\fR or \f(CW\*(C`unix2mac\*(C'\fR. -.SH "CONVERSION MODES" -.IX Header "CONVERSION MODES" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -In mode \f(CW\*(C`ascii\*(C'\fR only line breaks are converted. This is the default conversion -mode. -.Sp -Although the name of this mode is \s-1ASCII,\s0 which is a 7 bit standard, the -actual mode is 8 bit. Use always this mode when converting Unicode \s-1UTF\-8\s0 -files. -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -In this mode all 8 bit non-ASCII characters (with values from 128 to 255) -are converted to a 7 bit space. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Characters are converted between a \s-1DOS\s0 character set (code page) and \s-1ISO\s0 -character set \s-1ISO\-8859\-1 \s0(Latin\-1) on Unix. \s-1DOS\s0 characters without \s-1ISO\-8859\-1\s0 -equivalent, for which conversion is not possible, are converted to a dot. The -same counts for \s-1ISO\-8859\-1\s0 characters without \s-1DOS\s0 counterpart. -.Sp -When only option \f(CW\*(C`\-iso\*(C'\fR is used dos2unix will try to determine the active code -page. When this is not possible dos2unix will use default code page \s-1CP437,\s0 -which is mainly used in the \s-1USA. \s0 To force a specific code page use options -\&\f(CW\*(C`\-437\*(C'\fR (\s-1US\s0), \f(CW\*(C`\-850\*(C'\fR (Western European), \f(CW\*(C`\-860\*(C'\fR (Portuguese), \f(CW\*(C`\-863\*(C'\fR (French -Canadian), or \f(CW\*(C`\-865\*(C'\fR (Nordic). Windows code page \s-1CP1252 \s0(Western European) is -also supported with option \f(CW\*(C`\-1252\*(C'\fR. For other code pages use dos2unix in -combination with \fIiconv\fR\|(1). Iconv can convert between a long list of character -encodings. -.Sp -Never use \s-1ISO\s0 conversion on Unicode text files. It will corrupt \s-1UTF\-8\s0 encoded files. -.Sp -Some examples: -.Sp -Convert from \s-1DOS\s0 default code page to Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-iso \-n in.txt out.txt -.Ve -.Sp -Convert from \s-1DOS CP850\s0 to Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-850 \-n in.txt out.txt -.Ve -.Sp -Convert from Windows \s-1CP1252\s0 to Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n in.txt out.txt -.Ve -.Sp -Convert from Windows \s-1CP1252\s0 to Unix \s-1UTF\-8 \s0(Unicode): -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 in.txt | dos2unix > out.txt -.Ve -.Sp -Convert from Unix Latin\-1 to \s-1DOS\s0 default code page: -.Sp -.Vb 1 -\& unix2dos \-iso \-n in.txt out.txt -.Ve -.Sp -Convert from Unix Latin\-1 to \s-1DOS CP850:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n in.txt out.txt -.Ve -.Sp -Convert from Unix Latin\-1 to Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos \-1252 \-n in.txt out.txt -.Ve -.Sp -Convert from Unix \s-1UTF\-8 \s0(Unicode) to Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t CP1252 > out.txt -.Ve -.Sp -See also -and . -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Encodings" -.IX Subsection "Encodings" -There exist different Unicode encodings. On Unix and Linux Unicode files are -typically encoded in \s-1UTF\-8\s0 encoding. On Windows Unicode text files can be -encoded in \s-1UTF\-8, UTF\-16,\s0 or \s-1UTF\-16\s0 big endian, but are mostly encoded in -\&\s-1UTF\-16\s0 format. -.SS "Conversion" -.IX Subsection "Conversion" -Unicode text files can have \s-1DOS,\s0 Unix or Mac line breaks, like regular text -files. -.PP -All versions of dos2unix and unix2dos can convert \s-1UTF\-8\s0 encoded files, because -\&\s-1UTF\-8\s0 was designed for backward compatibility with \s-1ASCII.\s0 -.PP -Dos2unix and unix2dos with Unicode \s-1UTF\-16\s0 support, can read little and big -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 -On Unix/Linux \s-1UTF\-16\s0 encoded files are converted to the locale character -encoding. Use the \fIlocale\fR\|(1) command to find out what the locale character -encoding is. When conversion is not possible a conversion error will occur and -the file will be skipped. -.PP -On Windows \s-1UTF\-16\s0 files are by default converted to \s-1UTF\-8. UTF\-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 -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" -.IX Subsection "Byte Order Mark" -On Windows Unicode text files typically have a Byte Order Mark (\s-1BOM\s0), because -many Windows programs (including Notepad) add BOMs by default. See also -. -.PP -On Unix Unicode files typically don't have a \s-1BOM.\s0 It is assumed that text files -are encoded in the locale character encoding. -.PP -Dos2unix can only detect if a file is in \s-1UTF\-16\s0 format if the file has a \s-1BOM.\s0 -When an \s-1UTF\-16\s0 file doesn't have a \s-1BOM,\s0 dos2unix will see the file as a binary -file. -.PP -Use option \f(CW\*(C`\-ul\*(C'\fR or \f(CW\*(C`\-ub\*(C'\fR to convert an \s-1UTF\-16\s0 file without \s-1BOM.\s0 -.PP -Dos2unix writes by default no \s-1BOM\s0 in the output file. With option \f(CW\*(C`\-b\*(C'\fR -Dos2unix writes a \s-1BOM\s0 when the input file has a \s-1BOM.\s0 -.PP -Unix2dos writes by default a \s-1BOM\s0 in the output file when the input file has a -\&\s-1BOM.\s0 Use option \f(CW\*(C`\-r\*(C'\fR to remove the \s-1BOM.\s0 -.PP -Dos2unix and unix2dos write always a \s-1BOM\s0 when option \f(CW\*(C`\-m\*(C'\fR is used. -.SS "Unicode examples" -.IX Subsection "Unicode examples" -Convert from Windows \s-1UTF\-16 \s0(with \s-1BOM\s0) to Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-n in.txt out.txt -.Ve -.PP -Convert from Windows \s-1UTF\-16LE \s0(without \s-1BOM\s0) to Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-ul \-n in.txt out.txt -.Ve -.PP -Convert from Unix \s-1UTF\-8\s0 to Windows \s-1UTF\-8\s0 with \s-1BOM:\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n in.txt out.txt -.Ve -.PP -Convert from Unix \s-1UTF\-8\s0 to Windows \s-1UTF\-16:\s0 -.PP -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t UTF\-16 > out.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 is a Chinese government standard. A mandatory subset of the \s-1GB18030\s0 -standard is officially required for all software products sold in China. See -also . -.PP -\&\s-1GB18030\s0 is fully compatible with Unicode, and can be considered an unicode -transformation format. Like \s-1UTF\-8, GB18030\s0 is compatible with \s-1ASCII. GB18030\s0 -is also compatible with Windows code page 936, also known as \s-1GBK.\s0 -.PP -On Unix/Linux \s-1UTF\-16\s0 files are converted to \s-1GB18030\s0 when the locale encoding is -set to \s-1GB18030.\s0 Note that this will only work if the location is set to China. -E.g. in an English British locale setting \f(CW\*(C`en_GB.GB18030\*(C'\fR conversion of \s-1UTF\-16\s0 -to \s-1GB18030\s0 will not work, but in a Chinese \f(CW\*(C`zh_CN.GB18030\*(C'\fR locale setting it -will work. -.PP -On Windows you need to use option \f(CW\*(C`\-gb\*(C'\fR to convert \s-1UTF\-16\s0 files to \s-1GB18030.\s0 -.PP -\&\s-1GB18030\s0 encoded files can have a Byte Order Mark, like Unicode files. -.SH "EXAMPLES" -.IX Header "EXAMPLES" -Read input from 'stdin' and write output to 'stdout': -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Convert and replace a.txt. Convert and replace b.txt: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Convert and replace a.txt in ascii conversion mode: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Convert and replace a.txt in ascii conversion mode, -convert and replace b.txt in 7bit conversion mode: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Convert a.txt from Mac to Unix format: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Convert a.txt from Unix to Mac format: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Convert and replace a.txt while keeping original date stamp: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Convert a.txt and write to e.txt: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Convert a.txt and write to e.txt, keep date stamp of e.txt same as a.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Convert and replace a.txt, convert b.txt and write to e.txt: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Convert c.txt and write to e.txt, convert and replace a.txt, -convert and replace b.txt, convert d.txt and write to f.txt: -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "RECURSIVE CONVERSION" -.IX Header "RECURSIVE CONVERSION" -Use dos2unix in combination with the \fIfind\fR\|(1) and \fIxargs\fR\|(1) commands to -recursively convert text files in a directory tree structure. For instance to -convert all .txt files in the directory tree under the current directory type: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "LOCALIZATION" -.IX Header "LOCALIZATION" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -The primary language is selected with the environment variable \s-1LANG.\s0 The \s-1LANG\s0 -variable consists out of several parts. The first part is in small letters the -language code. The second is optional and is the country code in capital -letters, preceded with an underscore. There is also an optional third part: -character encoding, preceded with a dot. A few examples for \s-1POSIX\s0 standard type -shells: -.Sp -.Vb 7 -\& export LANG=nl Dutch -\& export LANG=nl_NL Dutch, The Netherlands -\& export LANG=nl_BE Dutch, Belgium -\& export LANG=es_ES Spanish, Spain -\& export LANG=es_MX Spanish, Mexico -\& export LANG=en_US.iso88591 English, USA, Latin\-1 encoding -\& export LANG=en_GB.UTF\-8 English, UK, UTF\-8 encoding -.Ve -.Sp -For a complete list of language and country codes see the gettext manual: - -.Sp -On Unix systems you can use the command \fIlocale\fR\|(1) to get locale specific -information. -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -With the \s-1LANGUAGE\s0 environment variable you can specify a priority list of -languages, separated by colons. Dos2unix gives preference to \s-1LANGUAGE\s0 over \s-1LANG.\s0 -For instance, first Dutch and then German: \f(CW\*(C`LANGUAGE=nl:de\*(C'\fR. You have to first -enable localization, by setting \s-1LANG \s0(or \s-1LC_ALL\s0) to a value other than -\&\*(L"C\*(R", before you can use a language priority list through the \s-1LANGUAGE\s0 -variable. See also the gettext manual: - -.Sp -If you select a language which is not available you will get the -standard English messages. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -With the environment variable \s-1DOS2UNIX_LOCALEDIR\s0 the \s-1LOCALEDIR\s0 set -during compilation can be overruled. \s-1LOCALEDIR\s0 is used to find the -language files. The \s-1GNU\s0 default value is \f(CW\*(C`/usr/local/share/locale\*(C'\fR. -Option \fB\-\-version\fR will display the \s-1LOCALEDIR\s0 that is used. -.Sp -Example (\s-1POSIX\s0 shell): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "RETURN VALUE" -.IX Header "RETURN VALUE" -On success, zero is returned. When a system error occurs the last system error will be -returned. For other errors 1 is returned. -.PP -The return value is always zero in quiet mode, except when wrong command-line options -are used. -.SH "STANDARDS" -.IX Header "STANDARDS" - -.PP - -.PP - -.PP - -.SH "AUTHORS" -.IX Header "AUTHORS" -Benjamin Lin \- , -Bernd Johannes Wuebben (mac2unix mode) \- , -Christian Wurll (add extra newline) \- , -Erwin Waterlander \- (maintainer) -.PP -Project page: -.PP -SourceForge page: -.SH "SEE ALSO" -.IX Header "SEE ALSO" -\&\fIfile\fR\|(1) -\&\fIfind\fR\|(1) -\&\fIiconv\fR\|(1) -\&\fIlocale\fR\|(1) -\&\fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/man1/unix2dos.1 b/Tools/dos2unix/share/man/man1/unix2dos.1 deleted file mode 100644 index 2933558..0000000 --- a/Tools/dos2unix/share/man/man1/unix2dos.1 +++ /dev/null @@ -1,730 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-01-02" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NAME" -dos2unix \- DOS/Mac to Unix and vice versa text file format converter -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -.Vb 2 -\& dos2unix [options] [FILE ...] [\-n INFILE OUTFILE ...] -\& unix2dos [options] [FILE ...] [\-n INFILE OUTFILE ...] -.Ve -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -The Dos2unix package includes utilities \f(CW\*(C`dos2unix\*(C'\fR and \f(CW\*(C`unix2dos\*(C'\fR to convert -plain text files in \s-1DOS\s0 or Mac format to Unix format and vice versa. -.PP -In DOS/Windows text files a line break, also known as newline, is a combination -of two characters: a Carriage Return (\s-1CR\s0) followed by a Line Feed (\s-1LF\s0). In Unix -text files a line break is a single character: the Line Feed (\s-1LF\s0). In Mac text -files, prior to Mac \s-1OS X,\s0 a line break was single Carriage Return (\s-1CR\s0) -character. Nowadays Mac \s-1OS\s0 uses Unix style (\s-1LF\s0) line breaks. -.PP -Besides line breaks Dos2unix can also convert the encoding of files. A few -\&\s-1DOS\s0 code pages can be converted to Unix Latin\-1. And Windows Unicode (\s-1UTF\-16\s0) -files can be converted to Unix Unicode (\s-1UTF\-8\s0) files. -.PP -Binary files are automatically skipped, unless conversion is forced. -.PP -Non-regular files, such as directories and FIFOs, are automatically skipped. -.PP -Symbolic links and their targets are by default kept untouched. Symbolic links -can optionally be replaced, or the output can be written to the symbolic link -target. Writing to a symbolic link target is not supported on Windows. -.PP -Dos2unix was modelled after dos2unix under SunOS/Solaris. There is one -important difference with the original SunOS/Solaris version. This version does -by default in-place conversion (old file mode), while the original -SunOS/Solaris version only supports paired conversion (new file mode). See also -options \f(CW\*(C`\-o\*(C'\fR and \f(CW\*(C`\-n\*(C'\fR. -.SH "OPTIONS" -.IX Header "OPTIONS" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Treat all following options as file names. Use this option if you want to -convert files whose names start with a dash. For instance to convert -a file named \*(L"\-foo\*(R", you can use this command: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -Or in new file mode: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo out.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Convert only line breaks. This is the default conversion mode. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Conversion between \s-1DOS\s0 and \s-1ISO\-8859\-1\s0 character set. See also section -\&\s-1CONVERSION MODES.\s0 -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Use Windows code page 1252 (Western European). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -Use \s-1DOS\s0 code page 437 (\s-1US\s0). This is the default code page used for \s-1ISO\s0 conversion. -.IP "\fB\-850\fR" 4 -.IX Item "-850" -Use \s-1DOS\s0 code page 850 (Western European). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -Use \s-1DOS\s0 code page 860 (Portuguese). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -Use \s-1DOS\s0 code page 863 (French Canadian). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -Use \s-1DOS\s0 code page 865 (Nordic). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Convert 8 bit characters to 7 bit space. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Keep Byte Order Mark (\s-1BOM\s0). When the input file has a \s-1BOM,\s0 write a \s-1BOM\s0 in -the output file. This is the default behavior when converting to \s-1DOS\s0 line -breaks. See also option \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode \s-1CONVMODE\s0\fR" 4 -.IX Item "-c, --convmode CONVMODE" -Set conversion mode. Where \s-1CONVMODE\s0 is one of: -\&\fIascii\fR, \fI7bit\fR, \fIiso\fR, \fImac\fR -with ascii being the default. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -Force conversion of binary files. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -On Windows \s-1UTF\-16\s0 files are by default converted to \s-1UTF\-8,\s0 regardless of the -locale setting. Use this option to convert \s-1UTF\-16\s0 files to \s-1GB18030.\s0 This option -is only available on Windows. See also section \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -Display help and exit. -.IP "\fB\-i[\s-1FLAGS\s0], \-\-info[=FLAGS] \s-1FILE ...\s0\fR" 4 -.IX Item "-i[FLAGS], --info[=FLAGS] FILE ..." -Display file information. No conversion is done. -.Sp -The following information is printed, in this order: number of \s-1DOS\s0 line breaks, -number of Unix line breaks, number of Mac line breaks, byte order mark, text -or binary, file name. -.Sp -Example output: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Optionally extra flags can be set to change the output. One or more flags -can be added. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Print number of \s-1DOS\s0 line breaks. -.IP "\fBu\fR" 4 -.IX Item "u" -Print number of Unix line breaks. -.IP "\fBm\fR" 4 -.IX Item "m" -Print number of Mac line breaks. -.IP "\fBb\fR" 4 -.IX Item "b" -Print the byte order mark. -.IP "\fBt\fR" 4 -.IX Item "t" -Print if file is text or binary. -.IP "\fBc\fR" 4 -.IX Item "c" -Print only the files that would be converted. -.Sp -With the \f(CW\*(C`c\*(C'\fR flag dos2unix will print only the files that contain \s-1DOS\s0 line breaks, -unix2dos will print only file names that have Unix line breaks. -.RE -.RS 4 -.Sp -Examples: -.Sp -Show information for all *.txt files: -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Show only the number of \s-1DOS\s0 line breaks and Unix line breaks: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Show only the byte order mark: -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -List the files that have \s-1DOS\s0 line breaks: -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -List the files that have Unix line breaks: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -Keep the date stamp of output file same as input file. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -Display program's license. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -Add additional newline. -.Sp -\&\fBdos2unix\fR: Only \s-1DOS\s0 line breaks are changed to two Unix line breaks. -In Mac mode only Mac line breaks are changed to two Unix -line breaks. -.Sp -\&\fBunix2dos\fR: Only Unix line breaks are changed to two \s-1DOS\s0 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 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 -File names must be given in pairs and wildcard names should \fInot\fR be -used or you \fIwill\fR lose your files. -.Sp -The person who starts the conversion in new file (paired) mode will be the owner -of the converted file. The read/write permissions of the new file will be the -permissions of the original file minus the \fIumask\fR\|(1) of the person who runs the -conversion. -.IP "\fB\-o, \-\-oldfile \s-1FILE ...\s0\fR" 4 -.IX Item "-o, --oldfile FILE ..." -Old file mode. Convert file \s-1FILE\s0 and overwrite output to it. The program -defaults to run in this mode. Wildcard names may be used. -.Sp -In old file (in-place) mode the converted file gets the same owner, group, and -read/write permissions as the original file. Also when the file is converted by -another user who has write permissions on the file (e.g. user root). The -conversion will be aborted when it is not possible to preserve the original -values. Change of owner could mean that the original owner is not able to read -the file any more. Change of group could be a security risk, the file could be -made readable for persons for whom it is not intended. Preservation of owner, -group, and read/write permissions is only supported on Unix. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Quiet mode. Suppress all warnings and messages. The return value is zero. -Except when wrong command-line options are used. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -Remove Byte Order Mark (\s-1BOM\s0). Do not write a \s-1BOM\s0 in the output file. -This is the default behavior when converting to Unix line breaks. -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 -.Sp -When there is a Byte Order Mark in the input file the \s-1BOM\s0 has priority over -this option. -.Sp -When you made a wrong assumption (the input file was not in \s-1UTF\-16LE\s0 format) and -the conversion succeeded, you will get an \s-1UTF\-8\s0 output file with wrong text. -You can undo the wrong conversion with \fIiconv\fR\|(1) by converting the \s-1UTF\-8\s0 output -file back to \s-1UTF\-16LE.\s0 This will bring back the original file. -.Sp -The assumption of \s-1UTF\-16LE\s0 works as a \fIconversion mode\fR. By switching to the default -\&\fIascii\fR mode the \s-1UTF\-16LE\s0 assumption is turned off. -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -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. -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Replace symbolic links with converted files -(original target files remain unchanged). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -Keep symbolic links and targets unchanged (default). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -Display version information and exit. -.SH "MAC MODE" -.IX Header "MAC MODE" -In normal mode line breaks are converted from \s-1DOS\s0 to Unix and vice versa. -Mac line breaks are not converted. -.PP -In Mac mode line breaks are converted from Mac to Unix and vice versa. \s-1DOS\s0 -line breaks are not changed. -.PP -To run in Mac mode use the command-line option \f(CW\*(C`\-c mac\*(C'\fR or use the -commands \f(CW\*(C`mac2unix\*(C'\fR or \f(CW\*(C`unix2mac\*(C'\fR. -.SH "CONVERSION MODES" -.IX Header "CONVERSION MODES" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -In mode \f(CW\*(C`ascii\*(C'\fR only line breaks are converted. This is the default conversion -mode. -.Sp -Although the name of this mode is \s-1ASCII,\s0 which is a 7 bit standard, the -actual mode is 8 bit. Use always this mode when converting Unicode \s-1UTF\-8\s0 -files. -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -In this mode all 8 bit non-ASCII characters (with values from 128 to 255) -are converted to a 7 bit space. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Characters are converted between a \s-1DOS\s0 character set (code page) and \s-1ISO\s0 -character set \s-1ISO\-8859\-1 \s0(Latin\-1) on Unix. \s-1DOS\s0 characters without \s-1ISO\-8859\-1\s0 -equivalent, for which conversion is not possible, are converted to a dot. The -same counts for \s-1ISO\-8859\-1\s0 characters without \s-1DOS\s0 counterpart. -.Sp -When only option \f(CW\*(C`\-iso\*(C'\fR is used dos2unix will try to determine the active code -page. When this is not possible dos2unix will use default code page \s-1CP437,\s0 -which is mainly used in the \s-1USA. \s0 To force a specific code page use options -\&\f(CW\*(C`\-437\*(C'\fR (\s-1US\s0), \f(CW\*(C`\-850\*(C'\fR (Western European), \f(CW\*(C`\-860\*(C'\fR (Portuguese), \f(CW\*(C`\-863\*(C'\fR (French -Canadian), or \f(CW\*(C`\-865\*(C'\fR (Nordic). Windows code page \s-1CP1252 \s0(Western European) is -also supported with option \f(CW\*(C`\-1252\*(C'\fR. For other code pages use dos2unix in -combination with \fIiconv\fR\|(1). Iconv can convert between a long list of character -encodings. -.Sp -Never use \s-1ISO\s0 conversion on Unicode text files. It will corrupt \s-1UTF\-8\s0 encoded files. -.Sp -Some examples: -.Sp -Convert from \s-1DOS\s0 default code page to Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-iso \-n in.txt out.txt -.Ve -.Sp -Convert from \s-1DOS CP850\s0 to Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-850 \-n in.txt out.txt -.Ve -.Sp -Convert from Windows \s-1CP1252\s0 to Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n in.txt out.txt -.Ve -.Sp -Convert from Windows \s-1CP1252\s0 to Unix \s-1UTF\-8 \s0(Unicode): -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 in.txt | dos2unix > out.txt -.Ve -.Sp -Convert from Unix Latin\-1 to \s-1DOS\s0 default code page: -.Sp -.Vb 1 -\& unix2dos \-iso \-n in.txt out.txt -.Ve -.Sp -Convert from Unix Latin\-1 to \s-1DOS CP850:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n in.txt out.txt -.Ve -.Sp -Convert from Unix Latin\-1 to Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos \-1252 \-n in.txt out.txt -.Ve -.Sp -Convert from Unix \s-1UTF\-8 \s0(Unicode) to Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t CP1252 > out.txt -.Ve -.Sp -See also -and . -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Encodings" -.IX Subsection "Encodings" -There exist different Unicode encodings. On Unix and Linux Unicode files are -typically encoded in \s-1UTF\-8\s0 encoding. On Windows Unicode text files can be -encoded in \s-1UTF\-8, UTF\-16,\s0 or \s-1UTF\-16\s0 big endian, but are mostly encoded in -\&\s-1UTF\-16\s0 format. -.SS "Conversion" -.IX Subsection "Conversion" -Unicode text files can have \s-1DOS,\s0 Unix or Mac line breaks, like regular text -files. -.PP -All versions of dos2unix and unix2dos can convert \s-1UTF\-8\s0 encoded files, because -\&\s-1UTF\-8\s0 was designed for backward compatibility with \s-1ASCII.\s0 -.PP -Dos2unix and unix2dos with Unicode \s-1UTF\-16\s0 support, can read little and big -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 -On Unix/Linux \s-1UTF\-16\s0 encoded files are converted to the locale character -encoding. Use the \fIlocale\fR\|(1) command to find out what the locale character -encoding is. When conversion is not possible a conversion error will occur and -the file will be skipped. -.PP -On Windows \s-1UTF\-16\s0 files are by default converted to \s-1UTF\-8. UTF\-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 -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" -.IX Subsection "Byte Order Mark" -On Windows Unicode text files typically have a Byte Order Mark (\s-1BOM\s0), because -many Windows programs (including Notepad) add BOMs by default. See also -. -.PP -On Unix Unicode files typically don't have a \s-1BOM.\s0 It is assumed that text files -are encoded in the locale character encoding. -.PP -Dos2unix can only detect if a file is in \s-1UTF\-16\s0 format if the file has a \s-1BOM.\s0 -When an \s-1UTF\-16\s0 file doesn't have a \s-1BOM,\s0 dos2unix will see the file as a binary -file. -.PP -Use option \f(CW\*(C`\-ul\*(C'\fR or \f(CW\*(C`\-ub\*(C'\fR to convert an \s-1UTF\-16\s0 file without \s-1BOM.\s0 -.PP -Dos2unix writes by default no \s-1BOM\s0 in the output file. With option \f(CW\*(C`\-b\*(C'\fR -Dos2unix writes a \s-1BOM\s0 when the input file has a \s-1BOM.\s0 -.PP -Unix2dos writes by default a \s-1BOM\s0 in the output file when the input file has a -\&\s-1BOM.\s0 Use option \f(CW\*(C`\-r\*(C'\fR to remove the \s-1BOM.\s0 -.PP -Dos2unix and unix2dos write always a \s-1BOM\s0 when option \f(CW\*(C`\-m\*(C'\fR is used. -.SS "Unicode examples" -.IX Subsection "Unicode examples" -Convert from Windows \s-1UTF\-16 \s0(with \s-1BOM\s0) to Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-n in.txt out.txt -.Ve -.PP -Convert from Windows \s-1UTF\-16LE \s0(without \s-1BOM\s0) to Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-ul \-n in.txt out.txt -.Ve -.PP -Convert from Unix \s-1UTF\-8\s0 to Windows \s-1UTF\-8\s0 with \s-1BOM:\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n in.txt out.txt -.Ve -.PP -Convert from Unix \s-1UTF\-8\s0 to Windows \s-1UTF\-16:\s0 -.PP -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t UTF\-16 > out.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 is a Chinese government standard. A mandatory subset of the \s-1GB18030\s0 -standard is officially required for all software products sold in China. See -also . -.PP -\&\s-1GB18030\s0 is fully compatible with Unicode, and can be considered an unicode -transformation format. Like \s-1UTF\-8, GB18030\s0 is compatible with \s-1ASCII. GB18030\s0 -is also compatible with Windows code page 936, also known as \s-1GBK.\s0 -.PP -On Unix/Linux \s-1UTF\-16\s0 files are converted to \s-1GB18030\s0 when the locale encoding is -set to \s-1GB18030.\s0 Note that this will only work if the location is set to China. -E.g. in an English British locale setting \f(CW\*(C`en_GB.GB18030\*(C'\fR conversion of \s-1UTF\-16\s0 -to \s-1GB18030\s0 will not work, but in a Chinese \f(CW\*(C`zh_CN.GB18030\*(C'\fR locale setting it -will work. -.PP -On Windows you need to use option \f(CW\*(C`\-gb\*(C'\fR to convert \s-1UTF\-16\s0 files to \s-1GB18030.\s0 -.PP -\&\s-1GB18030\s0 encoded files can have a Byte Order Mark, like Unicode files. -.SH "EXAMPLES" -.IX Header "EXAMPLES" -Read input from 'stdin' and write output to 'stdout': -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Convert and replace a.txt. Convert and replace b.txt: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Convert and replace a.txt in ascii conversion mode: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Convert and replace a.txt in ascii conversion mode, -convert and replace b.txt in 7bit conversion mode: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Convert a.txt from Mac to Unix format: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Convert a.txt from Unix to Mac format: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Convert and replace a.txt while keeping original date stamp: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Convert a.txt and write to e.txt: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Convert a.txt and write to e.txt, keep date stamp of e.txt same as a.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Convert and replace a.txt, convert b.txt and write to e.txt: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Convert c.txt and write to e.txt, convert and replace a.txt, -convert and replace b.txt, convert d.txt and write to f.txt: -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "RECURSIVE CONVERSION" -.IX Header "RECURSIVE CONVERSION" -Use dos2unix in combination with the \fIfind\fR\|(1) and \fIxargs\fR\|(1) commands to -recursively convert text files in a directory tree structure. For instance to -convert all .txt files in the directory tree under the current directory type: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "LOCALIZATION" -.IX Header "LOCALIZATION" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -The primary language is selected with the environment variable \s-1LANG.\s0 The \s-1LANG\s0 -variable consists out of several parts. The first part is in small letters the -language code. The second is optional and is the country code in capital -letters, preceded with an underscore. There is also an optional third part: -character encoding, preceded with a dot. A few examples for \s-1POSIX\s0 standard type -shells: -.Sp -.Vb 7 -\& export LANG=nl Dutch -\& export LANG=nl_NL Dutch, The Netherlands -\& export LANG=nl_BE Dutch, Belgium -\& export LANG=es_ES Spanish, Spain -\& export LANG=es_MX Spanish, Mexico -\& export LANG=en_US.iso88591 English, USA, Latin\-1 encoding -\& export LANG=en_GB.UTF\-8 English, UK, UTF\-8 encoding -.Ve -.Sp -For a complete list of language and country codes see the gettext manual: - -.Sp -On Unix systems you can use the command \fIlocale\fR\|(1) to get locale specific -information. -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -With the \s-1LANGUAGE\s0 environment variable you can specify a priority list of -languages, separated by colons. Dos2unix gives preference to \s-1LANGUAGE\s0 over \s-1LANG.\s0 -For instance, first Dutch and then German: \f(CW\*(C`LANGUAGE=nl:de\*(C'\fR. You have to first -enable localization, by setting \s-1LANG \s0(or \s-1LC_ALL\s0) to a value other than -\&\*(L"C\*(R", before you can use a language priority list through the \s-1LANGUAGE\s0 -variable. See also the gettext manual: - -.Sp -If you select a language which is not available you will get the -standard English messages. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -With the environment variable \s-1DOS2UNIX_LOCALEDIR\s0 the \s-1LOCALEDIR\s0 set -during compilation can be overruled. \s-1LOCALEDIR\s0 is used to find the -language files. The \s-1GNU\s0 default value is \f(CW\*(C`/usr/local/share/locale\*(C'\fR. -Option \fB\-\-version\fR will display the \s-1LOCALEDIR\s0 that is used. -.Sp -Example (\s-1POSIX\s0 shell): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "RETURN VALUE" -.IX Header "RETURN VALUE" -On success, zero is returned. When a system error occurs the last system error will be -returned. For other errors 1 is returned. -.PP -The return value is always zero in quiet mode, except when wrong command-line options -are used. -.SH "STANDARDS" -.IX Header "STANDARDS" - -.PP - -.PP - -.PP - -.SH "AUTHORS" -.IX Header "AUTHORS" -Benjamin Lin \- , -Bernd Johannes Wuebben (mac2unix mode) \- , -Christian Wurll (add extra newline) \- , -Erwin Waterlander \- (maintainer) -.PP -Project page: -.PP -SourceForge page: -.SH "SEE ALSO" -.IX Header "SEE ALSO" -\&\fIfile\fR\|(1) -\&\fIfind\fR\|(1) -\&\fIiconv\fR\|(1) -\&\fIlocale\fR\|(1) -\&\fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/man1/unix2mac.1 b/Tools/dos2unix/share/man/man1/unix2mac.1 deleted file mode 100644 index 2933558..0000000 --- a/Tools/dos2unix/share/man/man1/unix2mac.1 +++ /dev/null @@ -1,730 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-01-02" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NAME" -dos2unix \- DOS/Mac to Unix and vice versa text file format converter -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -.Vb 2 -\& dos2unix [options] [FILE ...] [\-n INFILE OUTFILE ...] -\& unix2dos [options] [FILE ...] [\-n INFILE OUTFILE ...] -.Ve -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -The Dos2unix package includes utilities \f(CW\*(C`dos2unix\*(C'\fR and \f(CW\*(C`unix2dos\*(C'\fR to convert -plain text files in \s-1DOS\s0 or Mac format to Unix format and vice versa. -.PP -In DOS/Windows text files a line break, also known as newline, is a combination -of two characters: a Carriage Return (\s-1CR\s0) followed by a Line Feed (\s-1LF\s0). In Unix -text files a line break is a single character: the Line Feed (\s-1LF\s0). In Mac text -files, prior to Mac \s-1OS X,\s0 a line break was single Carriage Return (\s-1CR\s0) -character. Nowadays Mac \s-1OS\s0 uses Unix style (\s-1LF\s0) line breaks. -.PP -Besides line breaks Dos2unix can also convert the encoding of files. A few -\&\s-1DOS\s0 code pages can be converted to Unix Latin\-1. And Windows Unicode (\s-1UTF\-16\s0) -files can be converted to Unix Unicode (\s-1UTF\-8\s0) files. -.PP -Binary files are automatically skipped, unless conversion is forced. -.PP -Non-regular files, such as directories and FIFOs, are automatically skipped. -.PP -Symbolic links and their targets are by default kept untouched. Symbolic links -can optionally be replaced, or the output can be written to the symbolic link -target. Writing to a symbolic link target is not supported on Windows. -.PP -Dos2unix was modelled after dos2unix under SunOS/Solaris. There is one -important difference with the original SunOS/Solaris version. This version does -by default in-place conversion (old file mode), while the original -SunOS/Solaris version only supports paired conversion (new file mode). See also -options \f(CW\*(C`\-o\*(C'\fR and \f(CW\*(C`\-n\*(C'\fR. -.SH "OPTIONS" -.IX Header "OPTIONS" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Treat all following options as file names. Use this option if you want to -convert files whose names start with a dash. For instance to convert -a file named \*(L"\-foo\*(R", you can use this command: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -Or in new file mode: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo out.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Convert only line breaks. This is the default conversion mode. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Conversion between \s-1DOS\s0 and \s-1ISO\-8859\-1\s0 character set. See also section -\&\s-1CONVERSION MODES.\s0 -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Use Windows code page 1252 (Western European). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -Use \s-1DOS\s0 code page 437 (\s-1US\s0). This is the default code page used for \s-1ISO\s0 conversion. -.IP "\fB\-850\fR" 4 -.IX Item "-850" -Use \s-1DOS\s0 code page 850 (Western European). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -Use \s-1DOS\s0 code page 860 (Portuguese). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -Use \s-1DOS\s0 code page 863 (French Canadian). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -Use \s-1DOS\s0 code page 865 (Nordic). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Convert 8 bit characters to 7 bit space. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Keep Byte Order Mark (\s-1BOM\s0). When the input file has a \s-1BOM,\s0 write a \s-1BOM\s0 in -the output file. This is the default behavior when converting to \s-1DOS\s0 line -breaks. See also option \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode \s-1CONVMODE\s0\fR" 4 -.IX Item "-c, --convmode CONVMODE" -Set conversion mode. Where \s-1CONVMODE\s0 is one of: -\&\fIascii\fR, \fI7bit\fR, \fIiso\fR, \fImac\fR -with ascii being the default. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -Force conversion of binary files. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -On Windows \s-1UTF\-16\s0 files are by default converted to \s-1UTF\-8,\s0 regardless of the -locale setting. Use this option to convert \s-1UTF\-16\s0 files to \s-1GB18030.\s0 This option -is only available on Windows. See also section \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -Display help and exit. -.IP "\fB\-i[\s-1FLAGS\s0], \-\-info[=FLAGS] \s-1FILE ...\s0\fR" 4 -.IX Item "-i[FLAGS], --info[=FLAGS] FILE ..." -Display file information. No conversion is done. -.Sp -The following information is printed, in this order: number of \s-1DOS\s0 line breaks, -number of Unix line breaks, number of Mac line breaks, byte order mark, text -or binary, file name. -.Sp -Example output: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Optionally extra flags can be set to change the output. One or more flags -can be added. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Print number of \s-1DOS\s0 line breaks. -.IP "\fBu\fR" 4 -.IX Item "u" -Print number of Unix line breaks. -.IP "\fBm\fR" 4 -.IX Item "m" -Print number of Mac line breaks. -.IP "\fBb\fR" 4 -.IX Item "b" -Print the byte order mark. -.IP "\fBt\fR" 4 -.IX Item "t" -Print if file is text or binary. -.IP "\fBc\fR" 4 -.IX Item "c" -Print only the files that would be converted. -.Sp -With the \f(CW\*(C`c\*(C'\fR flag dos2unix will print only the files that contain \s-1DOS\s0 line breaks, -unix2dos will print only file names that have Unix line breaks. -.RE -.RS 4 -.Sp -Examples: -.Sp -Show information for all *.txt files: -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Show only the number of \s-1DOS\s0 line breaks and Unix line breaks: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Show only the byte order mark: -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -List the files that have \s-1DOS\s0 line breaks: -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -List the files that have Unix line breaks: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -Keep the date stamp of output file same as input file. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -Display program's license. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -Add additional newline. -.Sp -\&\fBdos2unix\fR: Only \s-1DOS\s0 line breaks are changed to two Unix line breaks. -In Mac mode only Mac line breaks are changed to two Unix -line breaks. -.Sp -\&\fBunix2dos\fR: Only Unix line breaks are changed to two \s-1DOS\s0 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 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 -File names must be given in pairs and wildcard names should \fInot\fR be -used or you \fIwill\fR lose your files. -.Sp -The person who starts the conversion in new file (paired) mode will be the owner -of the converted file. The read/write permissions of the new file will be the -permissions of the original file minus the \fIumask\fR\|(1) of the person who runs the -conversion. -.IP "\fB\-o, \-\-oldfile \s-1FILE ...\s0\fR" 4 -.IX Item "-o, --oldfile FILE ..." -Old file mode. Convert file \s-1FILE\s0 and overwrite output to it. The program -defaults to run in this mode. Wildcard names may be used. -.Sp -In old file (in-place) mode the converted file gets the same owner, group, and -read/write permissions as the original file. Also when the file is converted by -another user who has write permissions on the file (e.g. user root). The -conversion will be aborted when it is not possible to preserve the original -values. Change of owner could mean that the original owner is not able to read -the file any more. Change of group could be a security risk, the file could be -made readable for persons for whom it is not intended. Preservation of owner, -group, and read/write permissions is only supported on Unix. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Quiet mode. Suppress all warnings and messages. The return value is zero. -Except when wrong command-line options are used. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -Remove Byte Order Mark (\s-1BOM\s0). Do not write a \s-1BOM\s0 in the output file. -This is the default behavior when converting to Unix line breaks. -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 -.Sp -When there is a Byte Order Mark in the input file the \s-1BOM\s0 has priority over -this option. -.Sp -When you made a wrong assumption (the input file was not in \s-1UTF\-16LE\s0 format) and -the conversion succeeded, you will get an \s-1UTF\-8\s0 output file with wrong text. -You can undo the wrong conversion with \fIiconv\fR\|(1) by converting the \s-1UTF\-8\s0 output -file back to \s-1UTF\-16LE.\s0 This will bring back the original file. -.Sp -The assumption of \s-1UTF\-16LE\s0 works as a \fIconversion mode\fR. By switching to the default -\&\fIascii\fR mode the \s-1UTF\-16LE\s0 assumption is turned off. -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -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. -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Replace symbolic links with converted files -(original target files remain unchanged). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -Keep symbolic links and targets unchanged (default). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -Display version information and exit. -.SH "MAC MODE" -.IX Header "MAC MODE" -In normal mode line breaks are converted from \s-1DOS\s0 to Unix and vice versa. -Mac line breaks are not converted. -.PP -In Mac mode line breaks are converted from Mac to Unix and vice versa. \s-1DOS\s0 -line breaks are not changed. -.PP -To run in Mac mode use the command-line option \f(CW\*(C`\-c mac\*(C'\fR or use the -commands \f(CW\*(C`mac2unix\*(C'\fR or \f(CW\*(C`unix2mac\*(C'\fR. -.SH "CONVERSION MODES" -.IX Header "CONVERSION MODES" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -In mode \f(CW\*(C`ascii\*(C'\fR only line breaks are converted. This is the default conversion -mode. -.Sp -Although the name of this mode is \s-1ASCII,\s0 which is a 7 bit standard, the -actual mode is 8 bit. Use always this mode when converting Unicode \s-1UTF\-8\s0 -files. -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -In this mode all 8 bit non-ASCII characters (with values from 128 to 255) -are converted to a 7 bit space. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Characters are converted between a \s-1DOS\s0 character set (code page) and \s-1ISO\s0 -character set \s-1ISO\-8859\-1 \s0(Latin\-1) on Unix. \s-1DOS\s0 characters without \s-1ISO\-8859\-1\s0 -equivalent, for which conversion is not possible, are converted to a dot. The -same counts for \s-1ISO\-8859\-1\s0 characters without \s-1DOS\s0 counterpart. -.Sp -When only option \f(CW\*(C`\-iso\*(C'\fR is used dos2unix will try to determine the active code -page. When this is not possible dos2unix will use default code page \s-1CP437,\s0 -which is mainly used in the \s-1USA. \s0 To force a specific code page use options -\&\f(CW\*(C`\-437\*(C'\fR (\s-1US\s0), \f(CW\*(C`\-850\*(C'\fR (Western European), \f(CW\*(C`\-860\*(C'\fR (Portuguese), \f(CW\*(C`\-863\*(C'\fR (French -Canadian), or \f(CW\*(C`\-865\*(C'\fR (Nordic). Windows code page \s-1CP1252 \s0(Western European) is -also supported with option \f(CW\*(C`\-1252\*(C'\fR. For other code pages use dos2unix in -combination with \fIiconv\fR\|(1). Iconv can convert between a long list of character -encodings. -.Sp -Never use \s-1ISO\s0 conversion on Unicode text files. It will corrupt \s-1UTF\-8\s0 encoded files. -.Sp -Some examples: -.Sp -Convert from \s-1DOS\s0 default code page to Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-iso \-n in.txt out.txt -.Ve -.Sp -Convert from \s-1DOS CP850\s0 to Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-850 \-n in.txt out.txt -.Ve -.Sp -Convert from Windows \s-1CP1252\s0 to Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n in.txt out.txt -.Ve -.Sp -Convert from Windows \s-1CP1252\s0 to Unix \s-1UTF\-8 \s0(Unicode): -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 in.txt | dos2unix > out.txt -.Ve -.Sp -Convert from Unix Latin\-1 to \s-1DOS\s0 default code page: -.Sp -.Vb 1 -\& unix2dos \-iso \-n in.txt out.txt -.Ve -.Sp -Convert from Unix Latin\-1 to \s-1DOS CP850:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n in.txt out.txt -.Ve -.Sp -Convert from Unix Latin\-1 to Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos \-1252 \-n in.txt out.txt -.Ve -.Sp -Convert from Unix \s-1UTF\-8 \s0(Unicode) to Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t CP1252 > out.txt -.Ve -.Sp -See also -and . -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Encodings" -.IX Subsection "Encodings" -There exist different Unicode encodings. On Unix and Linux Unicode files are -typically encoded in \s-1UTF\-8\s0 encoding. On Windows Unicode text files can be -encoded in \s-1UTF\-8, UTF\-16,\s0 or \s-1UTF\-16\s0 big endian, but are mostly encoded in -\&\s-1UTF\-16\s0 format. -.SS "Conversion" -.IX Subsection "Conversion" -Unicode text files can have \s-1DOS,\s0 Unix or Mac line breaks, like regular text -files. -.PP -All versions of dos2unix and unix2dos can convert \s-1UTF\-8\s0 encoded files, because -\&\s-1UTF\-8\s0 was designed for backward compatibility with \s-1ASCII.\s0 -.PP -Dos2unix and unix2dos with Unicode \s-1UTF\-16\s0 support, can read little and big -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 -On Unix/Linux \s-1UTF\-16\s0 encoded files are converted to the locale character -encoding. Use the \fIlocale\fR\|(1) command to find out what the locale character -encoding is. When conversion is not possible a conversion error will occur and -the file will be skipped. -.PP -On Windows \s-1UTF\-16\s0 files are by default converted to \s-1UTF\-8. UTF\-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 -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" -.IX Subsection "Byte Order Mark" -On Windows Unicode text files typically have a Byte Order Mark (\s-1BOM\s0), because -many Windows programs (including Notepad) add BOMs by default. See also -. -.PP -On Unix Unicode files typically don't have a \s-1BOM.\s0 It is assumed that text files -are encoded in the locale character encoding. -.PP -Dos2unix can only detect if a file is in \s-1UTF\-16\s0 format if the file has a \s-1BOM.\s0 -When an \s-1UTF\-16\s0 file doesn't have a \s-1BOM,\s0 dos2unix will see the file as a binary -file. -.PP -Use option \f(CW\*(C`\-ul\*(C'\fR or \f(CW\*(C`\-ub\*(C'\fR to convert an \s-1UTF\-16\s0 file without \s-1BOM.\s0 -.PP -Dos2unix writes by default no \s-1BOM\s0 in the output file. With option \f(CW\*(C`\-b\*(C'\fR -Dos2unix writes a \s-1BOM\s0 when the input file has a \s-1BOM.\s0 -.PP -Unix2dos writes by default a \s-1BOM\s0 in the output file when the input file has a -\&\s-1BOM.\s0 Use option \f(CW\*(C`\-r\*(C'\fR to remove the \s-1BOM.\s0 -.PP -Dos2unix and unix2dos write always a \s-1BOM\s0 when option \f(CW\*(C`\-m\*(C'\fR is used. -.SS "Unicode examples" -.IX Subsection "Unicode examples" -Convert from Windows \s-1UTF\-16 \s0(with \s-1BOM\s0) to Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-n in.txt out.txt -.Ve -.PP -Convert from Windows \s-1UTF\-16LE \s0(without \s-1BOM\s0) to Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-ul \-n in.txt out.txt -.Ve -.PP -Convert from Unix \s-1UTF\-8\s0 to Windows \s-1UTF\-8\s0 with \s-1BOM:\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n in.txt out.txt -.Ve -.PP -Convert from Unix \s-1UTF\-8\s0 to Windows \s-1UTF\-16:\s0 -.PP -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t UTF\-16 > out.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 is a Chinese government standard. A mandatory subset of the \s-1GB18030\s0 -standard is officially required for all software products sold in China. See -also . -.PP -\&\s-1GB18030\s0 is fully compatible with Unicode, and can be considered an unicode -transformation format. Like \s-1UTF\-8, GB18030\s0 is compatible with \s-1ASCII. GB18030\s0 -is also compatible with Windows code page 936, also known as \s-1GBK.\s0 -.PP -On Unix/Linux \s-1UTF\-16\s0 files are converted to \s-1GB18030\s0 when the locale encoding is -set to \s-1GB18030.\s0 Note that this will only work if the location is set to China. -E.g. in an English British locale setting \f(CW\*(C`en_GB.GB18030\*(C'\fR conversion of \s-1UTF\-16\s0 -to \s-1GB18030\s0 will not work, but in a Chinese \f(CW\*(C`zh_CN.GB18030\*(C'\fR locale setting it -will work. -.PP -On Windows you need to use option \f(CW\*(C`\-gb\*(C'\fR to convert \s-1UTF\-16\s0 files to \s-1GB18030.\s0 -.PP -\&\s-1GB18030\s0 encoded files can have a Byte Order Mark, like Unicode files. -.SH "EXAMPLES" -.IX Header "EXAMPLES" -Read input from 'stdin' and write output to 'stdout': -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Convert and replace a.txt. Convert and replace b.txt: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Convert and replace a.txt in ascii conversion mode: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Convert and replace a.txt in ascii conversion mode, -convert and replace b.txt in 7bit conversion mode: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Convert a.txt from Mac to Unix format: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Convert a.txt from Unix to Mac format: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Convert and replace a.txt while keeping original date stamp: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Convert a.txt and write to e.txt: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Convert a.txt and write to e.txt, keep date stamp of e.txt same as a.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Convert and replace a.txt, convert b.txt and write to e.txt: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Convert c.txt and write to e.txt, convert and replace a.txt, -convert and replace b.txt, convert d.txt and write to f.txt: -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "RECURSIVE CONVERSION" -.IX Header "RECURSIVE CONVERSION" -Use dos2unix in combination with the \fIfind\fR\|(1) and \fIxargs\fR\|(1) commands to -recursively convert text files in a directory tree structure. For instance to -convert all .txt files in the directory tree under the current directory type: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "LOCALIZATION" -.IX Header "LOCALIZATION" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -The primary language is selected with the environment variable \s-1LANG.\s0 The \s-1LANG\s0 -variable consists out of several parts. The first part is in small letters the -language code. The second is optional and is the country code in capital -letters, preceded with an underscore. There is also an optional third part: -character encoding, preceded with a dot. A few examples for \s-1POSIX\s0 standard type -shells: -.Sp -.Vb 7 -\& export LANG=nl Dutch -\& export LANG=nl_NL Dutch, The Netherlands -\& export LANG=nl_BE Dutch, Belgium -\& export LANG=es_ES Spanish, Spain -\& export LANG=es_MX Spanish, Mexico -\& export LANG=en_US.iso88591 English, USA, Latin\-1 encoding -\& export LANG=en_GB.UTF\-8 English, UK, UTF\-8 encoding -.Ve -.Sp -For a complete list of language and country codes see the gettext manual: - -.Sp -On Unix systems you can use the command \fIlocale\fR\|(1) to get locale specific -information. -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -With the \s-1LANGUAGE\s0 environment variable you can specify a priority list of -languages, separated by colons. Dos2unix gives preference to \s-1LANGUAGE\s0 over \s-1LANG.\s0 -For instance, first Dutch and then German: \f(CW\*(C`LANGUAGE=nl:de\*(C'\fR. You have to first -enable localization, by setting \s-1LANG \s0(or \s-1LC_ALL\s0) to a value other than -\&\*(L"C\*(R", before you can use a language priority list through the \s-1LANGUAGE\s0 -variable. See also the gettext manual: - -.Sp -If you select a language which is not available you will get the -standard English messages. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -With the environment variable \s-1DOS2UNIX_LOCALEDIR\s0 the \s-1LOCALEDIR\s0 set -during compilation can be overruled. \s-1LOCALEDIR\s0 is used to find the -language files. The \s-1GNU\s0 default value is \f(CW\*(C`/usr/local/share/locale\*(C'\fR. -Option \fB\-\-version\fR will display the \s-1LOCALEDIR\s0 that is used. -.Sp -Example (\s-1POSIX\s0 shell): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "RETURN VALUE" -.IX Header "RETURN VALUE" -On success, zero is returned. When a system error occurs the last system error will be -returned. For other errors 1 is returned. -.PP -The return value is always zero in quiet mode, except when wrong command-line options -are used. -.SH "STANDARDS" -.IX Header "STANDARDS" - -.PP - -.PP - -.PP - -.SH "AUTHORS" -.IX Header "AUTHORS" -Benjamin Lin \- , -Bernd Johannes Wuebben (mac2unix mode) \- , -Christian Wurll (add extra newline) \- , -Erwin Waterlander \- (maintainer) -.PP -Project page: -.PP -SourceForge page: -.SH "SEE ALSO" -.IX Header "SEE ALSO" -\&\fIfile\fR\|(1) -\&\fIfind\fR\|(1) -\&\fIiconv\fR\|(1) -\&\fIlocale\fR\|(1) -\&\fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/nl/man1/dos2unix.1 b/Tools/dos2unix/share/man/nl/man1/dos2unix.1 deleted file mode 100644 index 08b1d11..0000000 --- a/Tools/dos2unix/share/man/nl/man1/dos2unix.1 +++ /dev/null @@ -1,761 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NAAM" -.IX Header "NAAM" -dos2unix \- omzetter van tekstbestandsindelingen, van DOS/Mac naar Unix en -vice versa -.SH "OVERZICHT" -.IX Header "OVERZICHT" -.Vb 2 -\& dos2unix [opties] [BESTAND ...] [\-n INVOERBESTAND UITVOERBESTAND ...] -\& unix2dos [opties] [BESTAND ...] [\-n INVOERBESTAND UITVOERBESTAND ...] -.Ve -.SH "BESCHRIJVING" -.IX Header "BESCHRIJVING" -Het Dos2unix pakket bevat de toepassingen \f(CW\*(C`dos2unix\*(C'\fR en \f(CW\*(C`unix2dos\*(C'\fR om -platte tekstbestanden in \s-1DOS\-\s0 of Mac-indeling naar Unix-indeling om te -zetten, en vice versa. -.PP -In DOS/Windows\-tekstbestanden bestaat een regeleinde uit een combinatie van -twee tekens: een 'Carriage Return' (\s-1CR\s0) gevolgd door een 'Line Feed' (\s-1LF\s0). -In Unix-tekstbestanden bestaat een regeleinde uit één enkel 'Newline'\-teken, -dat gelijk is aan een \s-1DOS \s0'Line Feed'-teken (\s-1LF\s0). In Mac-tekstbestanden, -van vóór Mac \s-1OS X,\s0 bestaan regeleindes uit één enkel 'Carriage -Return'-teken. Mac \s-1OS X\s0 is op Unix gebaseerd en heeft dezelfde regeleindes -als Unix. -.PP -Naast regeleindes kan Dos2unix ook de codering van bestanden converteren. -Enkele DOS-codetabellen kunnen omgezet worden naar Unix Latin\-1. En Windows -Unicode-bestanden (\s-1UTF\-16\s0) kunnen geconverteerd worden naar Unix -Unicode-bestanden (\s-1UTF\-8\s0). -.PP -Binaire bestanden worden automatisch overgeslagen, behalve als de omzetting -geforceerd wordt. -.PP -Niet-reguliere bestanden, zoals mappen en \s-1FIFO\s0's, worden automatisch -overgeslagen. -.PP -Symbolische koppelingen en hun doelen blijven standaard onaangeroerd. -Optioneel kunnen symbolische koppelingen worden vervangen, of de uitvoer kan -naar het doel van de symbolische koppeling worden geschreven. Op Windows -wordt het schrijven naar het doel van een symbolische koppeling niet -ondersteund. -.PP -Dos2unix is gemodelleerd naar dos2unix op SunOS/Solaris, maar er is één -belangrijk verschil: deze versie van dos2unix voert standaard een -vervangende conversie uit (oud-bestand-modus) terwijl de oorspronkelijke -SunOS/Solaris\-versie alleen de gepaarde conversie (nieuw-bestand-modus) -kent. Zie ook de opties \f(CW\*(C`\-o\*(C'\fR en \f(CW\*(C`\-n\*(C'\fR. -.SH "OPTIES" -.IX Header "OPTIES" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Alle volgende opties als bestandsnamen behandelen. Gebruik deze optie als u -een bestand wilt converteren waarvan de naam met een streepje begint. -Bijvoorbeeld, om een bestand genaamd \*(L"\-foo\*(R" om te zetten, gebruikt u de -volgende opdracht: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -Of in nieuw-bestand-modus: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo uit.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Alleen regeleindes converteren. Dit is de standaardconversiemodus. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Conversie tussen de tekensets \s-1DOS\s0 en \s-1ISO\-8859\-1. \s0 Zie ook de sectie -\&\s-1CONVERSIEMODI.\s0 -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Windows-codetabel 1252 (West-Europees) gebruiken. -.IP "\fB\-437\fR" 4 -.IX Item "-437" -DOS-codetabel 437 (\s-1VS\s0) gebruiken. Dit is de standaard codetabel die -gebruikt wordt bij ISO-conversie. -.IP "\fB\-850\fR" 4 -.IX Item "-850" -DOS-codetabel 850 (West-Europees) gebruiken. -.IP "\fB\-860\fR" 4 -.IX Item "-860" -DOS-codetabel 860 (Portugees) gebruiken. -.IP "\fB\-863\fR" 4 -.IX Item "-863" -DOS-codetabel 863 (Canadees Frans) gebruiken. -.IP "\fB\-865\fR" 4 -.IX Item "-865" -DOS-codetabel 865 (Scandinavisch) gebruiken. -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Lettertekens met het achtste bit gezet converteren naar spaties. -.IP "\fB\-b\fR, \fB\-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Een Byte-Order-Mark (\s-1BOM\s0) behouden. Als het invoerbestand een \s-1BOM\s0 bevat, -dan wordt ook een \s-1BOM\s0 naar het uitvoerbestand geschreven. Dit is het -standaardgedrag bij conversie naar \s-1DOS. \s0 Zie ook optie \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c\fR, \fB\-\-convmode \s-1CONVERSIEMODUS\s0\fR" 4 -.IX Item "-c, --convmode CONVERSIEMODUS" -De te gebruiken conversiemodus. \s-1CONVERSIEMODUS\s0 kan zijn: \fIascii\fR, \fI7bit\fR, -\&\fIiso\fR, of \fImac\fR, waarbij ascii de standaardinstelling is. -.IP "\fB\-f\fR, \fB\-\-force\fR" 4 -.IX Item "-f, --force" -Conversie van binaire bestanden afdwingen. -.IP "\fB\-gb\fR, \fB\-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -Op Windows worden UTF\-16\-bestanden standaard naar \s-1UTF\-8\s0 geconverteerd, -ongeacht de ingestelde taalregio. Gebruik deze optie om UTF\-16\-bestanden -naar \s-1GB18030\s0 te converteren. Deze optie is alleen beschikbaar op Windows. -Zie ook de sectie \fB\s-1GB18030\s0\fR. -.IP "\fB\-h\fR, \fB\-\-help\fR" 4 -.IX Item "-h, --help" -Een hulptekst tonen. -.IP "\fB\-i\fR[\fB\s-1VLAGGEN\s0\fR], \fB\-\-info\fR[\fB=VLAGGEN\fR] \fB\s-1BESTAND\s0\fR..." 4 -.IX Item "-i[VLAGGEN], --info[=VLAGGEN] BESTAND..." -Bestandsinformatie tonen. Er wordt niets geconverteerd. -.Sp -De volgende informatie wordt weergegeven, in deze volgorde: het aantal -DOS-regeleindes, het aantal Unix-regeleindes, het aantal Mac-regeleindes, de -Byte-Order-Mark, of het een tekst\- of binair bestand is, en de bestandsnaam. -.Sp -Voorbeelduitvoer: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Bij de optie kunnen één of meer vlaggen meegegeven worden om de uitvoer te -beperken. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Het aantal DOS-regeleindes tonen. -.IP "\fBu\fR" 4 -.IX Item "u" -Het aantal Unix-regeleindes tonen. -.IP "\fBm\fR" 4 -.IX Item "m" -Het aantal Mac-regeleindes tonen. -.IP "\fBb\fR" 4 -.IX Item "b" -De Byte-Order-Mark tonen. -.IP "\fBt\fR" 4 -.IX Item "t" -Tonen of het bestand tekst is of binair. -.IP "\fBc\fR" 4 -.IX Item "c" -Alleen de namen tonen van de bestanden die geconverteerd zouden worden. -.Sp -Met de vlag \f(CW\*(C`c\*(C'\fR toont dos2unix alleen de bestanden die DOS-regeleindes -bevatten, en unix2dos alleen de bestanden die Unix-regeleindes bevatten. -.RE -.RS 4 -.Sp -Voorbeelden: -.Sp -Informatie weergeven voor alle bestanden met de extensie 'txt': -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Alleen de aantallen DOS-regeleindes en Unix-regeleindes tonen: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Alleen de Byte-Order-Mark tonen: -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -De bestanden opsommen die DOS-regeleindes bevatten: -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -De bestanden opsommen die Unix-regeleindes bevatten: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k\fR, \fB\-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -Het tijdsstempel van het invoerbestand behouden voor het uitvoerbestand. -.IP "\fB\-L\fR, \fB\-\-license\fR" 4 -.IX Item "-L, --license" -De softwarelicentie tonen. -.IP "\fB\-l\fR, \fB\-\-newline\fR" 4 -.IX Item "-l, --newline" -Een extra regeleinde toevoegen. -.Sp -\&\fBdos2unix\fR: Alleen DOS-regeleindes worden omgezet naar twee -Unix-regeleindes. In Mac-modus worden alleen Mac-regeleindes omgezet naar -twee Unix-regeleindes. -.Sp -\&\fBunix2dos\fR: Alleen Unix-regeleindes worden omgezet naar twee -DOS-regeleindes. In Mac-modus worden Unix-regeleindes omgezet naar twee -Mac-regeleindes. -.IP "\fB\-m\fR, \fB\-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -Een Byte-Order-Mark (\s-1BOM\s0) naar het uitvoerbestand schrijven. Standaard -wordt een \s-1UTF\-8\-BOM\s0 geschreven. -.Sp -Als het invoerbestand in \s-1UTF\-16\s0 is, en de optie \f(CW\*(C`\-u\*(C'\fR is gegeven, dan wordt -een \s-1UTF\-16\-BOM\s0 geschreven. -.Sp -Gebruik deze optie nooit als de codering van het uitvoerbestand niet \s-1UTF\-8\s0 -of \s-1UTF\-16\s0 is. Zie ook de sectie \s-1UNICODE.\s0 -.IP "\fB\-n\fR, \fB\-\-newfile \s-1INVOERBESTAND UITVOERBESTAND\s0\fR ..." 4 -.IX Item "-n, --newfile INVOERBESTAND UITVOERBESTAND ..." -Nieuw-bestand-modus. Het bestand \s-1INVOERBESTAND\s0 converteren en naar bestand -\&\s-1UITVOERBESTAND\s0 schrijven. Bestandsnamen moeten opgegeven worden in paren. -Jokertekens moeten \fIniet\fRgebruikt worden, anders \fIverlies\fR je de -bestanden. -.Sp -De gebruiker die de conversie start in nieuw-bestand (gepaarde) modus wordt -de eigenaar van het geconverteerde bestand. De lees/schrijf\-toegangsrechten -van het nieuwe bestand worden de toegangsrechten van het originele bestand -minus de \fIumask\fR\|(1) van de gebruiker die de conversie draait. -.IP "\fB\-o\fR, \fB\-\-oldfile \s-1BESTAND\s0\fR ..." 4 -.IX Item "-o, --oldfile BESTAND ..." -Oud-bestand-modus. Het bestand \s-1BESTAND\s0 converteren en overschrijven. Dit -is de standaard modus. Jokertekens kunnen gebruikt worden. -.Sp -In oud-bestand (vervangende) modus krijgt het geconverteerde bestand -dezelfde eigenaar, groep en lees/schrijf\-rechten als het originele bestand. -Ook wanneer het bestand wordt omgezet door een andere gebruiker die -schrijfrechten heeft op het bestand (b.v. gebruiker root). De omzetting -wordt afgebroken wanneer het niet mogelijk is de originele waardes te -behouden. Verandering van eigenaar kan betekenen dat de originele eigenaar -het bestand niet meer kan lezen. Verandering van groep zou een -veiligheidsrisico kunnen zijn, het bestand zou leesbaar kunnen worden voor -personen voor wie het niet bestemd is. Behoud van eigenaar, groep en -lees/schrijf\-rechten wordt alleen ondersteund op Unix. -.IP "\fB\-q\fR, \fB\-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Stille werking. Alle waarschuwingen onderdrukken. De aflsuitwaarde is nul, -behalve wanneer verkeerde opties worden gegeven. -.IP "\fB\-r\fR, \fB\-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -Een Byte-Order-Mark (\s-1BOM\s0) verwijderen. Er wordt geen \s-1BOM\s0 naar het -uitvoerbestand geschreven. Dit is het standaardgedrag bij conversie naar -Unix. Zie ook optie \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s\fR, \fB\-\-safe\fR" 4 -.IX Item "-s, --safe" -Binaire bestanden overslaan (standaard). -.IP "\fB\-u\fR, \fB\-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -De originele UTF\-16\-codering van het invoerbestand behouden. Het -uitvoerbestand wordt in dezelfde UTF\-16\-codering (little endian of big -endian) geschreven als het invoerbestand. Dit voorkomt conversie naar -\&\s-1UTF\-8. \s0 Er wordt ook een corresponderende \s-1UTF\-16\-BOM\s0 geschreven. Deze optie -kan uitgeschakeld worden met de optie \f(CW\*(C`\-ascii\*(C'\fR. -.IP "\fB\-ul\fR, \fB\-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -Veronderstellen dat de indeling van het invoerbestand \s-1UTF\-16LE\s0 is. -.Sp -Wanneer het invoerbestand een Byte-Order-Mark (\s-1BOM\s0) bevat, dan gaat deze \s-1BOM\s0 -vóór deze optie. -.Sp -Wanneer een verkeerde aanname is gemaakt (het invoerbestand was geen -\&\s-1UTF\-16LE\s0) en de conversie verliep met succes, dan krijgt u een UTF\-8\-bestand -met verkeerde tekst. De verkeerde conversie kan ongedaan worden gemaakt -door met \fIiconv\fR\|(1) het UTF\-8\-uitvoerbestand terug om te zetten naar -\&\s-1UTF\-16LE. \s0 Dit zal het originele bestand terug brengen. -.Sp -De aanname van \s-1UTF\-16LE\s0 werkt als een \fIconversiemodus\fR. Door de -standaardmodus \fIascii\fR in te schakelen wordt de UTF\-16LE\-veronderstelling -uitgeschakeld. -.IP "\fB\-ub\fR, \fB\-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -Veronderstellen dat de indeling van het invoerbestand \s-1UTF\-16BE\s0 is. -.Sp -Deze optie werkt hetzelfde als optie \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v\fR, \fB\-\-verbose\fR" 4 -.IX Item "-v, --verbose" -Extra meldingen weergeven. Er wordt extra informatie getoond over -Byte-Order-Marks en het aantal geconverteerde regeleindes. -.IP "\fB\-F\fR, \fB\-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -Symbolische koppelingen volgen en de doelen converteren. -.IP "\fB\-R\fR, \fB\-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Symbolische koppelingen vervangen door geconverteerde bestanden (de -originele doelbestanden blijven ongewijzigd). -.IP "\fB\-S\fR, \fB\-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -Symbolische koppelingen en doelen ongewijzigd laten (standaard). -.IP "\fB\-V\fR, \fB\-\-version\fR" 4 -.IX Item "-V, --version" -Versie-informatie tonen. -.SH "MAC-MODUS" -.IX Header "MAC-MODUS" -In normale modus worden DOS-regeleindes naar Unix omgezet en vice versa. -Mac-regeleindes worden niet omgezet. -.PP -In Mac-modus worden Mac-regeleindes naar Unix omgezet en vice versa. -DOS-regeleindes blijven ongewijzigd. -.PP -Om in Mac-modus te draaien kunt u de opdrachtregeloptie \f(CW\*(C`\-c mac\*(C'\fR gebruiken, -of de opdrachten \f(CW\*(C`mac2unix\*(C'\fR of \f(CW\*(C`unix2mac\*(C'\fR. -.SH "CONVERSIEMODI" -.IX Header "CONVERSIEMODI" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -In modus \f(CW\*(C`ascii\*(C'\fR worden alleen regeleindes omgezet. Dit is de -standaardmodus. -.Sp -Hoewel de naam van deze modus \s-1ASCII\s0 is, wat een 7\-bits standaard is, is de -werkelijke modus 8\-bits. Gebruik altijd deze modus wanneer u Unicode -UTF\-8\-bestanden omzet. -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -Alle 8\-bits niet-ASCII lettertekens (met waardes van 128 t/m 255) worden -omgezet naar een 7\-bits spatie. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Tekens worden omgezet tussen een DOS-tekenset (codetabel) en de ISO-tekenset -\&\s-1ISO\-8859\-1 \s0(Latin\-1) op Unix. DOS-tekens zonder een ISO\-8859\-1\-equivalent, -waarvoor dus geen omzetting mogelijk is, worden omgezet in een punt. -Hetzelfde geldt voor ISO\-8859\-1\-tekens zonder DOS-tegenhanger. -.Sp -Wanneer alleen optie \f(CW\*(C`\-iso\*(C'\fR gebruikt wordt, zal dos2unix proberen de -actieve codetabel te gebruiken. Als dat niet mogelijk is wordt codetabel -\&\s-1CP437\s0 gebruikt, die vooral in de \s-1VS\s0 gebruikt wordt. Om een bepaalde -codetabel te forceren, kunt u de opties \f(CW\*(C`\-850\*(C'\fR (West-Europees), \f(CW\*(C`\-860\*(C'\fR -(Portugees), \f(CW\*(C`\-863\*(C'\fR (Canadees Frans) of \f(CW\*(C`\-865\*(C'\fR (Scandinavisch) gebruiken. -Windows-codetabel \s-1CP1252 \s0(West-Europees) wordt ook ondersteund met optie -\&\f(CW\*(C`\-1252\*(C'\fR. Gebruik voor andere codetabellen dos2unix in combinatie met -\&\fIiconv\fR\|(1). Iconv kan omzetten tussen een lange lijst tekensetcoderingen. -.Sp -Gebruik ISO-conversie nooit op Unicode-tekstbestanden. Het zal -UTF\-8\-gecodeerde bestanden beschadigen. -.Sp -Enkele voorbeelden: -.Sp -Omzetten van de standaard DOS-codetabel naar Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-iso \-n in.txt uit.txt -.Ve -.Sp -Omzetten van \s-1DOS CP850\s0 naar Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-850 \-n in.txt uit.txt -.Ve -.Sp -Omzetten van Windows \s-1CP1252\s0 naar Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n in.txt uit.txt -.Ve -.Sp -Omzetten van Windows \s-1CP1252\s0 naar Unix \s-1UTF\-8 \s0(Unicode): -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 in.txt | dos2unix > uit.txt -.Ve -.Sp -Omzetten van Unix Latin\-1 naar de standaard DOS-codetabel: -.Sp -.Vb 1 -\& unix2dos \-iso \-n in.txt uit.txt -.Ve -.Sp -Omzetten van Unix Latin\-1 naar \s-1DOS CP850:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n in.txt uit.txt -.Ve -.Sp -Omzetten van Unix Latin\-1 naar Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos \-1252 \-n in.txt uit.txt -.Ve -.Sp -Omzetten van Unix \s-1UTF\-8 \s0(Unicode) naar Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t CP1252 > uit.txt -.Ve -.Sp -Zie ook en -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Coderingen" -.IX Subsection "Coderingen" -Er bestaan verschillende Unicode-coderingen. Op Unix en Linux zijn -Unicode-bestanden typisch gecodeerd in \s-1UTF\-8. \s0 Op Windows kunnen -Unicode-tekstbestanden gecodeerd zijn in \s-1UTF\-8, UTF\-16\s0 of \s-1UTF\-16\s0 big endian, -maar ze zijn meestal gecodeerd in \s-1UTF\-16.\s0 -.SS "Conversie" -.IX Subsection "Conversie" -Unicode-tekstbestanden kunnen \s-1DOS\-,\s0 Unix\- of Mac-regeleindes hebben, net als -reguliere tekstbestanden. -.PP -Alle versies van dos2unix en unix2dos kunnen UTF\-8\-gecodeerde bestanden -omzetten, want \s-1UTF\-8\s0 is ontworpen op compatibiliteit met \s-1ASCII.\s0 -.PP -Dos2unix en unix2dos met Unicode UTF\-16\-ondersteuning kunnen little en big -endian UTF\-16\-gecodeerde tekstbestanden lezen. Om er achter te komen of -dos2unix gebouwd is met \s-1UTF\-16\-\s0 ondersteuning, typt u \f(CW\*(C`dos2unix \-V\*(C'\fR. -.PP -Op Unix/Linux worden UTF\-16\-bestanden geconverteerd naar de codering van de -ingestelde taalregio. Gebruik de opdracht \fBlocale\fR(1) om te zien wat de -ingestelde codering is. Wanneer conversie niet mogelijk is, treedt er een -fout op en wordt het bestand overgeslagen. -.PP -Op Windows worden UTF\-16\-bestanden standaard naar \s-1UTF\-8\s0 geconverteerd. -UTF\-8\-tekstbestanden worden alom goed ondersteund, zowel op Windows als -Unix/Linux. -.PP -De \s-1UTF\-16\-\s0 en UTF\-8\-coderingen zijn volledig compatibel, er gaat bij het -converteren niets verloren. Als er tijdens de conversie van \s-1UTF\-16\s0 naar -\&\s-1UTF\-8\s0 een fout optreedt, bijvoorbeeld omdat het UTF\-16\-invoerbestand een -fout bevat, dan wordt het bestand overgeslagen. -.PP -Wanneer \f(CW\*(C`\-u\*(C'\fR gebruikt wordt, wordt het uitvoerbestand in dezelfde -UTF\-16\-codering geschreven als het invoerbestand. Optie \f(CW\*(C`\-u\*(C'\fR voorkomt -conversie naar \s-1UTF\-8.\s0 -.PP -Dos2unix en unix2dos hebben geen optie om van \s-1UTF\-8\s0 naar \s-1UTF\-16\s0 te -converteren. -.PP -\&\s-1ISO\-\s0 en 7\-bits\-conversie werken niet op UTF\-16\-bestanden. -.SS "Byte-Order-Mark" -.IX Subsection "Byte-Order-Mark" -Op Windows bevatten Unicode-tekstbestanden gewoonlijk een Byte-Order-Mark -(\s-1BOM\s0), omdat veel Windows-programma's (inclusief Kladblok) standaard een \s-1BOM\s0 -toevoegen. Zie ook . -.PP -Op Unix hebben Unicode-tekstbestanden meestal geen \s-1BOM. \s0 Er wordt aangenomen -dat de codering van tekstbestanden gelijk is aan de tekencodering van de -ingestelde taalregio. -.PP -Dos2unix kan alleen detecteren of een bestand in UTF\-16\-codering is als het -bestand een \s-1BOM\s0 bevat. Wanneer een UTF\-16\-bestand geen \s-1BOM\s0 heeft, ziet -dos2unix het bestand als een binair bestand. -.PP -Gebruik optie \f(CW\*(C`\-ul\*(C'\fR of \f(CW\*(C`\-ub\*(C'\fR om een UTF\-16\-bestand zonder \s-1BOM\s0 om te -zetten. -.PP -Dos2unix schrijft standaard geen \s-1BOM\s0 in het uitvoerbestand. Met optie \f(CW\*(C`\-b\*(C'\fR -schrijft dos2unix een \s-1BOM\s0 wanneer het invoerbestand een \s-1BOM\s0 bevat. -.PP -Unix2dos schrijft standaard een \s-1BOM\s0 in het uitvoerbestand wanneer het -invoerbestand een \s-1BOM\s0 bevat. Gebruik optie \f(CW\*(C`\-r\*(C'\fR om de \s-1BOM\s0 te verwijderen. -.PP -Dos2unix en unix2dos schrijven altijd een \s-1BOM\s0 wanneer optie \f(CW\*(C`\-m\*(C'\fR gebruikt -wordt. -.SS "Unicode-voorbeelden" -.IX Subsection "Unicode-voorbeelden" -Omzetten van Windows \s-1UTF\-16 \s0(met \s-1BOM\s0) naar Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-n in.txt uit.txt -.Ve -.PP -Omzetten van Windows \s-1UTF\-16LE \s0(zonder \s-1BOM\s0) naar Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-ul \-n in.txt uit.txt -.Ve -.PP -Omzetten van Unix \s-1UTF\-8\s0 naar Windows \s-1UTF\-8\s0 met \s-1BOM:\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n in.txt uit.txt -.Ve -.PP -Omzetten van Unix \s-1UTF\-8\s0 naar Windows \s-1UTF\-16:\s0 -.PP -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t UTF\-16 > uit.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 is een standaard van de Chinese overheid. Een subset van de -GB18030\-standaard is officieel verplicht voor alle softwareproducten die in -China verkocht worden. Zie ook . -.PP -\&\s-1GB18030\s0 is volledig compatibel met Unicode, en kan als een -Unicodetransformatie beschouwd worden. Net als \s-1UTF\-8\s0 is \s-1GB18030\s0 compatibel -met \s-1ASCII. GB18030\s0 is ook compatibel met Windows-codetabel 936 (ook wel \s-1GBK\s0 -genoemd). -.PP -Op Unix/Linux worden UTF\-16\-bestanden alleen naar \s-1GB18030\s0 geconverteerd -wanneer de taalregio op China ingesteld is en de codering op \s-1GB18030.\s0 -Bijvoorbeeld, met de Britse taalregio-instelling \f(CW\*(C`en_GB.GB18030\*(C'\fR zal -conversie van \s-1UTF\-16\s0 naar \s-1GB18030\s0 niet werken, maar met de Chinese -instelling \f(CW\*(C`zh_CN.GB18030\*(C'\fR wel. -.PP -Op Windows dient u de optie \f(CW\*(C`\-gb\*(C'\fR te gebruiken om UTF\-16\-bestanden naar -\&\s-1GB18030\s0 te converteren. -.PP -GB18030\-bestanden kunnen een Byte-Order-Mark bevatten, net als -Unicode-bestanden. -.SH "VOORBEELDEN" -.IX Header "VOORBEELDEN" -Invoer lezen van standaardinvoer en uitvoer schrijven naar standaarduitvoer: -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Omzetten en vervangen van a.txt; omzetten en vervangen van b.txt: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Omzetten en vervangen van a.txt in ascii-conversiemodus: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Omzetten en vervangen van a.txt in ascii-conversiemodus; omzetten en -vervangen van b.txt in 7\-bits conversiemodus: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Omzetten van a.txt van Mac\- naar Unix-indeling: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Omzetten van a.txt van Unix\- naar Mac-indeling: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Omzetten en vervangen van a.txt met behoud van origineel tijdsstempel: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Omzetten van a.txt en resultaat naar e.txt schrijven: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Omzetten van a.txt en naar e.txt schrijven, met tijdsstempel van e.txt -gelijk aan die van a.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Omzetten en vervangen van a.txt; omzetten van b.txt en naar e.txt schrijven: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Omzetten van c.txt en naar e.txt schrijven; omzetten en vervangen van a.txt; -omzetten en vervangen van b.txt; omzetten van d.txt en naar f.txt schrijven. -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "RECURSIEVE CONVERSIE" -.IX Header "RECURSIEVE CONVERSIE" -Gebruik dos2unix in combinatie met de opdrachten \fBfind\fR(1) en \fBxargs\fR(1) -om tekstbestanden in een mappenboom recursief om te zetten. Bijvoorbeeld om -alle .txt\-bestanden in de mappenboom onder de huidige map te converteren, -typt u: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "LOKALISATIE" -.IX Header "LOKALISATIE" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -De primaire taal wordt geselecteerd via de omgevingsvariabele \s-1LANG. \s0 De -variabele \s-1LANG\s0 bestaat uit verschillende onderdelen. Het eerste deel is in -kleine letters de taalcode. Het tweede deel is optioneel en is de landcode -in hoofdletters, voorafgegaan door een liggend streepje. Er is ook een -optioneel derde deel: de tekencodering, voorafgegaan door een punt. Enkele -voorbeelden voor een POSIX-shell: -.Sp -.Vb 7 -\& export LANG=nl Nederlands -\& export LANG=nl_NL Nederlands, Nederland -\& export LANG=nl_BE Nederlands, België -\& export LANG=es_ES Spaans, Spanje -\& export LANG=es_MX Spaans, Mexico -\& export LANG=en_US.iso88591 Engels, VS, Latin\-1\-codering -\& export LANG=en_GB.UTF\-8 Engels, GB, UTF\-8\-codering -.Ve -.Sp -Voor een complete lijst van taal\- en landcodes zie de gettext-handleiding: - -.Sp -Op Unix-systemen kunt u de opdracht \fBlocale\fR(1) gebruiken om specifieke -taalregio-informatie te verkrijgen. -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -Met de omgevingsvariabele \s-1LANGUAGE\s0 kunt u een prioriteitenlijst specificeren -van talen, gescheiden door dubbele punten. Dos2unix geeft voorrang aan -\&\s-1LANGUAGE\s0 boven \s-1LANG. \s0 Bijvoorbeeld, eerst Nederlands en dan Duits: -\&\f(CW\*(C`LANGUAGE=nl:de\*(C'\fR. U moet eerst lokalisatie in werking stellen, door het -instellen van \s-1LANG \s0(of \s-1LC_ALL\s0) op een waarde ongelijk aan \*(L"C\*(R", voordat u een -talen-prioriteitenlijst kunt gebruiken via de variabele \s-1LANGUAGE. \s0 Zie ook -de gettext-handleiding: - -.Sp -Als u een taal kiest die niet beschikbaar is, worden de standaard Engelse -berichten gebruikt. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Met de omgevingsvariabele \s-1DOS2UNIX_LOCALEDIR\s0 kan de \s-1LOCALEDIR\s0 die ingesteld -werd tijdens compilatie worden overstemd. \s-1LOCALEDIR\s0 wordt gebruikt om de -taalbestanden te vinden. De \s-1GNU\s0 standaardwaarde is -\&\f(CW\*(C`/usr/local/share/locale\*(C'\fR. De optie \fB\-\-version\fR laat de gebruikte -\&\s-1LOCALEDIR\s0 zien. -.Sp -Voorbeeld (POSIX-shell): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "AFSLUITWAARDE" -.IX Header "AFSLUITWAARDE" -Bij succes wordt nul teruggegeven. Wanneer een systeemfout optreedt wordt -het laatste systeemfoutnummer teruggegeven. Bij andere fouten wordt 1 -teruggegeven. -.PP -De afsluitwaarde is altijd nul in de stillewerkingsmodus, behalve wanneer -verkeerde opties worden gegeven. -.SH "STANDAARDEN" -.IX Header "STANDAARDEN" - -.PP - -.PP - -.PP - -.SH "AUTEURS" -.IX Header "AUTEURS" -Benjamin Lin \- , Bernd Johannes Wuebben -(mac2unix\-modus) \- , Christian Wurll (toevoegen van extra -regeleindes) \- , Erwin Waterlander \- -(beheerder) -.PP -Projectpagina: -.PP -SourceForge-pagina: -.SH "ZIE OOK" -.IX Header "ZIE OOK" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/nl/man1/mac2unix.1 b/Tools/dos2unix/share/man/nl/man1/mac2unix.1 deleted file mode 100644 index 08b1d11..0000000 --- a/Tools/dos2unix/share/man/nl/man1/mac2unix.1 +++ /dev/null @@ -1,761 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NAAM" -.IX Header "NAAM" -dos2unix \- omzetter van tekstbestandsindelingen, van DOS/Mac naar Unix en -vice versa -.SH "OVERZICHT" -.IX Header "OVERZICHT" -.Vb 2 -\& dos2unix [opties] [BESTAND ...] [\-n INVOERBESTAND UITVOERBESTAND ...] -\& unix2dos [opties] [BESTAND ...] [\-n INVOERBESTAND UITVOERBESTAND ...] -.Ve -.SH "BESCHRIJVING" -.IX Header "BESCHRIJVING" -Het Dos2unix pakket bevat de toepassingen \f(CW\*(C`dos2unix\*(C'\fR en \f(CW\*(C`unix2dos\*(C'\fR om -platte tekstbestanden in \s-1DOS\-\s0 of Mac-indeling naar Unix-indeling om te -zetten, en vice versa. -.PP -In DOS/Windows\-tekstbestanden bestaat een regeleinde uit een combinatie van -twee tekens: een 'Carriage Return' (\s-1CR\s0) gevolgd door een 'Line Feed' (\s-1LF\s0). -In Unix-tekstbestanden bestaat een regeleinde uit één enkel 'Newline'\-teken, -dat gelijk is aan een \s-1DOS \s0'Line Feed'-teken (\s-1LF\s0). In Mac-tekstbestanden, -van vóór Mac \s-1OS X,\s0 bestaan regeleindes uit één enkel 'Carriage -Return'-teken. Mac \s-1OS X\s0 is op Unix gebaseerd en heeft dezelfde regeleindes -als Unix. -.PP -Naast regeleindes kan Dos2unix ook de codering van bestanden converteren. -Enkele DOS-codetabellen kunnen omgezet worden naar Unix Latin\-1. En Windows -Unicode-bestanden (\s-1UTF\-16\s0) kunnen geconverteerd worden naar Unix -Unicode-bestanden (\s-1UTF\-8\s0). -.PP -Binaire bestanden worden automatisch overgeslagen, behalve als de omzetting -geforceerd wordt. -.PP -Niet-reguliere bestanden, zoals mappen en \s-1FIFO\s0's, worden automatisch -overgeslagen. -.PP -Symbolische koppelingen en hun doelen blijven standaard onaangeroerd. -Optioneel kunnen symbolische koppelingen worden vervangen, of de uitvoer kan -naar het doel van de symbolische koppeling worden geschreven. Op Windows -wordt het schrijven naar het doel van een symbolische koppeling niet -ondersteund. -.PP -Dos2unix is gemodelleerd naar dos2unix op SunOS/Solaris, maar er is één -belangrijk verschil: deze versie van dos2unix voert standaard een -vervangende conversie uit (oud-bestand-modus) terwijl de oorspronkelijke -SunOS/Solaris\-versie alleen de gepaarde conversie (nieuw-bestand-modus) -kent. Zie ook de opties \f(CW\*(C`\-o\*(C'\fR en \f(CW\*(C`\-n\*(C'\fR. -.SH "OPTIES" -.IX Header "OPTIES" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Alle volgende opties als bestandsnamen behandelen. Gebruik deze optie als u -een bestand wilt converteren waarvan de naam met een streepje begint. -Bijvoorbeeld, om een bestand genaamd \*(L"\-foo\*(R" om te zetten, gebruikt u de -volgende opdracht: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -Of in nieuw-bestand-modus: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo uit.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Alleen regeleindes converteren. Dit is de standaardconversiemodus. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Conversie tussen de tekensets \s-1DOS\s0 en \s-1ISO\-8859\-1. \s0 Zie ook de sectie -\&\s-1CONVERSIEMODI.\s0 -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Windows-codetabel 1252 (West-Europees) gebruiken. -.IP "\fB\-437\fR" 4 -.IX Item "-437" -DOS-codetabel 437 (\s-1VS\s0) gebruiken. Dit is de standaard codetabel die -gebruikt wordt bij ISO-conversie. -.IP "\fB\-850\fR" 4 -.IX Item "-850" -DOS-codetabel 850 (West-Europees) gebruiken. -.IP "\fB\-860\fR" 4 -.IX Item "-860" -DOS-codetabel 860 (Portugees) gebruiken. -.IP "\fB\-863\fR" 4 -.IX Item "-863" -DOS-codetabel 863 (Canadees Frans) gebruiken. -.IP "\fB\-865\fR" 4 -.IX Item "-865" -DOS-codetabel 865 (Scandinavisch) gebruiken. -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Lettertekens met het achtste bit gezet converteren naar spaties. -.IP "\fB\-b\fR, \fB\-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Een Byte-Order-Mark (\s-1BOM\s0) behouden. Als het invoerbestand een \s-1BOM\s0 bevat, -dan wordt ook een \s-1BOM\s0 naar het uitvoerbestand geschreven. Dit is het -standaardgedrag bij conversie naar \s-1DOS. \s0 Zie ook optie \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c\fR, \fB\-\-convmode \s-1CONVERSIEMODUS\s0\fR" 4 -.IX Item "-c, --convmode CONVERSIEMODUS" -De te gebruiken conversiemodus. \s-1CONVERSIEMODUS\s0 kan zijn: \fIascii\fR, \fI7bit\fR, -\&\fIiso\fR, of \fImac\fR, waarbij ascii de standaardinstelling is. -.IP "\fB\-f\fR, \fB\-\-force\fR" 4 -.IX Item "-f, --force" -Conversie van binaire bestanden afdwingen. -.IP "\fB\-gb\fR, \fB\-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -Op Windows worden UTF\-16\-bestanden standaard naar \s-1UTF\-8\s0 geconverteerd, -ongeacht de ingestelde taalregio. Gebruik deze optie om UTF\-16\-bestanden -naar \s-1GB18030\s0 te converteren. Deze optie is alleen beschikbaar op Windows. -Zie ook de sectie \fB\s-1GB18030\s0\fR. -.IP "\fB\-h\fR, \fB\-\-help\fR" 4 -.IX Item "-h, --help" -Een hulptekst tonen. -.IP "\fB\-i\fR[\fB\s-1VLAGGEN\s0\fR], \fB\-\-info\fR[\fB=VLAGGEN\fR] \fB\s-1BESTAND\s0\fR..." 4 -.IX Item "-i[VLAGGEN], --info[=VLAGGEN] BESTAND..." -Bestandsinformatie tonen. Er wordt niets geconverteerd. -.Sp -De volgende informatie wordt weergegeven, in deze volgorde: het aantal -DOS-regeleindes, het aantal Unix-regeleindes, het aantal Mac-regeleindes, de -Byte-Order-Mark, of het een tekst\- of binair bestand is, en de bestandsnaam. -.Sp -Voorbeelduitvoer: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Bij de optie kunnen één of meer vlaggen meegegeven worden om de uitvoer te -beperken. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Het aantal DOS-regeleindes tonen. -.IP "\fBu\fR" 4 -.IX Item "u" -Het aantal Unix-regeleindes tonen. -.IP "\fBm\fR" 4 -.IX Item "m" -Het aantal Mac-regeleindes tonen. -.IP "\fBb\fR" 4 -.IX Item "b" -De Byte-Order-Mark tonen. -.IP "\fBt\fR" 4 -.IX Item "t" -Tonen of het bestand tekst is of binair. -.IP "\fBc\fR" 4 -.IX Item "c" -Alleen de namen tonen van de bestanden die geconverteerd zouden worden. -.Sp -Met de vlag \f(CW\*(C`c\*(C'\fR toont dos2unix alleen de bestanden die DOS-regeleindes -bevatten, en unix2dos alleen de bestanden die Unix-regeleindes bevatten. -.RE -.RS 4 -.Sp -Voorbeelden: -.Sp -Informatie weergeven voor alle bestanden met de extensie 'txt': -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Alleen de aantallen DOS-regeleindes en Unix-regeleindes tonen: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Alleen de Byte-Order-Mark tonen: -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -De bestanden opsommen die DOS-regeleindes bevatten: -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -De bestanden opsommen die Unix-regeleindes bevatten: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k\fR, \fB\-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -Het tijdsstempel van het invoerbestand behouden voor het uitvoerbestand. -.IP "\fB\-L\fR, \fB\-\-license\fR" 4 -.IX Item "-L, --license" -De softwarelicentie tonen. -.IP "\fB\-l\fR, \fB\-\-newline\fR" 4 -.IX Item "-l, --newline" -Een extra regeleinde toevoegen. -.Sp -\&\fBdos2unix\fR: Alleen DOS-regeleindes worden omgezet naar twee -Unix-regeleindes. In Mac-modus worden alleen Mac-regeleindes omgezet naar -twee Unix-regeleindes. -.Sp -\&\fBunix2dos\fR: Alleen Unix-regeleindes worden omgezet naar twee -DOS-regeleindes. In Mac-modus worden Unix-regeleindes omgezet naar twee -Mac-regeleindes. -.IP "\fB\-m\fR, \fB\-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -Een Byte-Order-Mark (\s-1BOM\s0) naar het uitvoerbestand schrijven. Standaard -wordt een \s-1UTF\-8\-BOM\s0 geschreven. -.Sp -Als het invoerbestand in \s-1UTF\-16\s0 is, en de optie \f(CW\*(C`\-u\*(C'\fR is gegeven, dan wordt -een \s-1UTF\-16\-BOM\s0 geschreven. -.Sp -Gebruik deze optie nooit als de codering van het uitvoerbestand niet \s-1UTF\-8\s0 -of \s-1UTF\-16\s0 is. Zie ook de sectie \s-1UNICODE.\s0 -.IP "\fB\-n\fR, \fB\-\-newfile \s-1INVOERBESTAND UITVOERBESTAND\s0\fR ..." 4 -.IX Item "-n, --newfile INVOERBESTAND UITVOERBESTAND ..." -Nieuw-bestand-modus. Het bestand \s-1INVOERBESTAND\s0 converteren en naar bestand -\&\s-1UITVOERBESTAND\s0 schrijven. Bestandsnamen moeten opgegeven worden in paren. -Jokertekens moeten \fIniet\fRgebruikt worden, anders \fIverlies\fR je de -bestanden. -.Sp -De gebruiker die de conversie start in nieuw-bestand (gepaarde) modus wordt -de eigenaar van het geconverteerde bestand. De lees/schrijf\-toegangsrechten -van het nieuwe bestand worden de toegangsrechten van het originele bestand -minus de \fIumask\fR\|(1) van de gebruiker die de conversie draait. -.IP "\fB\-o\fR, \fB\-\-oldfile \s-1BESTAND\s0\fR ..." 4 -.IX Item "-o, --oldfile BESTAND ..." -Oud-bestand-modus. Het bestand \s-1BESTAND\s0 converteren en overschrijven. Dit -is de standaard modus. Jokertekens kunnen gebruikt worden. -.Sp -In oud-bestand (vervangende) modus krijgt het geconverteerde bestand -dezelfde eigenaar, groep en lees/schrijf\-rechten als het originele bestand. -Ook wanneer het bestand wordt omgezet door een andere gebruiker die -schrijfrechten heeft op het bestand (b.v. gebruiker root). De omzetting -wordt afgebroken wanneer het niet mogelijk is de originele waardes te -behouden. Verandering van eigenaar kan betekenen dat de originele eigenaar -het bestand niet meer kan lezen. Verandering van groep zou een -veiligheidsrisico kunnen zijn, het bestand zou leesbaar kunnen worden voor -personen voor wie het niet bestemd is. Behoud van eigenaar, groep en -lees/schrijf\-rechten wordt alleen ondersteund op Unix. -.IP "\fB\-q\fR, \fB\-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Stille werking. Alle waarschuwingen onderdrukken. De aflsuitwaarde is nul, -behalve wanneer verkeerde opties worden gegeven. -.IP "\fB\-r\fR, \fB\-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -Een Byte-Order-Mark (\s-1BOM\s0) verwijderen. Er wordt geen \s-1BOM\s0 naar het -uitvoerbestand geschreven. Dit is het standaardgedrag bij conversie naar -Unix. Zie ook optie \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s\fR, \fB\-\-safe\fR" 4 -.IX Item "-s, --safe" -Binaire bestanden overslaan (standaard). -.IP "\fB\-u\fR, \fB\-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -De originele UTF\-16\-codering van het invoerbestand behouden. Het -uitvoerbestand wordt in dezelfde UTF\-16\-codering (little endian of big -endian) geschreven als het invoerbestand. Dit voorkomt conversie naar -\&\s-1UTF\-8. \s0 Er wordt ook een corresponderende \s-1UTF\-16\-BOM\s0 geschreven. Deze optie -kan uitgeschakeld worden met de optie \f(CW\*(C`\-ascii\*(C'\fR. -.IP "\fB\-ul\fR, \fB\-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -Veronderstellen dat de indeling van het invoerbestand \s-1UTF\-16LE\s0 is. -.Sp -Wanneer het invoerbestand een Byte-Order-Mark (\s-1BOM\s0) bevat, dan gaat deze \s-1BOM\s0 -vóór deze optie. -.Sp -Wanneer een verkeerde aanname is gemaakt (het invoerbestand was geen -\&\s-1UTF\-16LE\s0) en de conversie verliep met succes, dan krijgt u een UTF\-8\-bestand -met verkeerde tekst. De verkeerde conversie kan ongedaan worden gemaakt -door met \fIiconv\fR\|(1) het UTF\-8\-uitvoerbestand terug om te zetten naar -\&\s-1UTF\-16LE. \s0 Dit zal het originele bestand terug brengen. -.Sp -De aanname van \s-1UTF\-16LE\s0 werkt als een \fIconversiemodus\fR. Door de -standaardmodus \fIascii\fR in te schakelen wordt de UTF\-16LE\-veronderstelling -uitgeschakeld. -.IP "\fB\-ub\fR, \fB\-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -Veronderstellen dat de indeling van het invoerbestand \s-1UTF\-16BE\s0 is. -.Sp -Deze optie werkt hetzelfde als optie \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v\fR, \fB\-\-verbose\fR" 4 -.IX Item "-v, --verbose" -Extra meldingen weergeven. Er wordt extra informatie getoond over -Byte-Order-Marks en het aantal geconverteerde regeleindes. -.IP "\fB\-F\fR, \fB\-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -Symbolische koppelingen volgen en de doelen converteren. -.IP "\fB\-R\fR, \fB\-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Symbolische koppelingen vervangen door geconverteerde bestanden (de -originele doelbestanden blijven ongewijzigd). -.IP "\fB\-S\fR, \fB\-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -Symbolische koppelingen en doelen ongewijzigd laten (standaard). -.IP "\fB\-V\fR, \fB\-\-version\fR" 4 -.IX Item "-V, --version" -Versie-informatie tonen. -.SH "MAC-MODUS" -.IX Header "MAC-MODUS" -In normale modus worden DOS-regeleindes naar Unix omgezet en vice versa. -Mac-regeleindes worden niet omgezet. -.PP -In Mac-modus worden Mac-regeleindes naar Unix omgezet en vice versa. -DOS-regeleindes blijven ongewijzigd. -.PP -Om in Mac-modus te draaien kunt u de opdrachtregeloptie \f(CW\*(C`\-c mac\*(C'\fR gebruiken, -of de opdrachten \f(CW\*(C`mac2unix\*(C'\fR of \f(CW\*(C`unix2mac\*(C'\fR. -.SH "CONVERSIEMODI" -.IX Header "CONVERSIEMODI" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -In modus \f(CW\*(C`ascii\*(C'\fR worden alleen regeleindes omgezet. Dit is de -standaardmodus. -.Sp -Hoewel de naam van deze modus \s-1ASCII\s0 is, wat een 7\-bits standaard is, is de -werkelijke modus 8\-bits. Gebruik altijd deze modus wanneer u Unicode -UTF\-8\-bestanden omzet. -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -Alle 8\-bits niet-ASCII lettertekens (met waardes van 128 t/m 255) worden -omgezet naar een 7\-bits spatie. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Tekens worden omgezet tussen een DOS-tekenset (codetabel) en de ISO-tekenset -\&\s-1ISO\-8859\-1 \s0(Latin\-1) op Unix. DOS-tekens zonder een ISO\-8859\-1\-equivalent, -waarvoor dus geen omzetting mogelijk is, worden omgezet in een punt. -Hetzelfde geldt voor ISO\-8859\-1\-tekens zonder DOS-tegenhanger. -.Sp -Wanneer alleen optie \f(CW\*(C`\-iso\*(C'\fR gebruikt wordt, zal dos2unix proberen de -actieve codetabel te gebruiken. Als dat niet mogelijk is wordt codetabel -\&\s-1CP437\s0 gebruikt, die vooral in de \s-1VS\s0 gebruikt wordt. Om een bepaalde -codetabel te forceren, kunt u de opties \f(CW\*(C`\-850\*(C'\fR (West-Europees), \f(CW\*(C`\-860\*(C'\fR -(Portugees), \f(CW\*(C`\-863\*(C'\fR (Canadees Frans) of \f(CW\*(C`\-865\*(C'\fR (Scandinavisch) gebruiken. -Windows-codetabel \s-1CP1252 \s0(West-Europees) wordt ook ondersteund met optie -\&\f(CW\*(C`\-1252\*(C'\fR. Gebruik voor andere codetabellen dos2unix in combinatie met -\&\fIiconv\fR\|(1). Iconv kan omzetten tussen een lange lijst tekensetcoderingen. -.Sp -Gebruik ISO-conversie nooit op Unicode-tekstbestanden. Het zal -UTF\-8\-gecodeerde bestanden beschadigen. -.Sp -Enkele voorbeelden: -.Sp -Omzetten van de standaard DOS-codetabel naar Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-iso \-n in.txt uit.txt -.Ve -.Sp -Omzetten van \s-1DOS CP850\s0 naar Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-850 \-n in.txt uit.txt -.Ve -.Sp -Omzetten van Windows \s-1CP1252\s0 naar Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n in.txt uit.txt -.Ve -.Sp -Omzetten van Windows \s-1CP1252\s0 naar Unix \s-1UTF\-8 \s0(Unicode): -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 in.txt | dos2unix > uit.txt -.Ve -.Sp -Omzetten van Unix Latin\-1 naar de standaard DOS-codetabel: -.Sp -.Vb 1 -\& unix2dos \-iso \-n in.txt uit.txt -.Ve -.Sp -Omzetten van Unix Latin\-1 naar \s-1DOS CP850:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n in.txt uit.txt -.Ve -.Sp -Omzetten van Unix Latin\-1 naar Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos \-1252 \-n in.txt uit.txt -.Ve -.Sp -Omzetten van Unix \s-1UTF\-8 \s0(Unicode) naar Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t CP1252 > uit.txt -.Ve -.Sp -Zie ook en -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Coderingen" -.IX Subsection "Coderingen" -Er bestaan verschillende Unicode-coderingen. Op Unix en Linux zijn -Unicode-bestanden typisch gecodeerd in \s-1UTF\-8. \s0 Op Windows kunnen -Unicode-tekstbestanden gecodeerd zijn in \s-1UTF\-8, UTF\-16\s0 of \s-1UTF\-16\s0 big endian, -maar ze zijn meestal gecodeerd in \s-1UTF\-16.\s0 -.SS "Conversie" -.IX Subsection "Conversie" -Unicode-tekstbestanden kunnen \s-1DOS\-,\s0 Unix\- of Mac-regeleindes hebben, net als -reguliere tekstbestanden. -.PP -Alle versies van dos2unix en unix2dos kunnen UTF\-8\-gecodeerde bestanden -omzetten, want \s-1UTF\-8\s0 is ontworpen op compatibiliteit met \s-1ASCII.\s0 -.PP -Dos2unix en unix2dos met Unicode UTF\-16\-ondersteuning kunnen little en big -endian UTF\-16\-gecodeerde tekstbestanden lezen. Om er achter te komen of -dos2unix gebouwd is met \s-1UTF\-16\-\s0 ondersteuning, typt u \f(CW\*(C`dos2unix \-V\*(C'\fR. -.PP -Op Unix/Linux worden UTF\-16\-bestanden geconverteerd naar de codering van de -ingestelde taalregio. Gebruik de opdracht \fBlocale\fR(1) om te zien wat de -ingestelde codering is. Wanneer conversie niet mogelijk is, treedt er een -fout op en wordt het bestand overgeslagen. -.PP -Op Windows worden UTF\-16\-bestanden standaard naar \s-1UTF\-8\s0 geconverteerd. -UTF\-8\-tekstbestanden worden alom goed ondersteund, zowel op Windows als -Unix/Linux. -.PP -De \s-1UTF\-16\-\s0 en UTF\-8\-coderingen zijn volledig compatibel, er gaat bij het -converteren niets verloren. Als er tijdens de conversie van \s-1UTF\-16\s0 naar -\&\s-1UTF\-8\s0 een fout optreedt, bijvoorbeeld omdat het UTF\-16\-invoerbestand een -fout bevat, dan wordt het bestand overgeslagen. -.PP -Wanneer \f(CW\*(C`\-u\*(C'\fR gebruikt wordt, wordt het uitvoerbestand in dezelfde -UTF\-16\-codering geschreven als het invoerbestand. Optie \f(CW\*(C`\-u\*(C'\fR voorkomt -conversie naar \s-1UTF\-8.\s0 -.PP -Dos2unix en unix2dos hebben geen optie om van \s-1UTF\-8\s0 naar \s-1UTF\-16\s0 te -converteren. -.PP -\&\s-1ISO\-\s0 en 7\-bits\-conversie werken niet op UTF\-16\-bestanden. -.SS "Byte-Order-Mark" -.IX Subsection "Byte-Order-Mark" -Op Windows bevatten Unicode-tekstbestanden gewoonlijk een Byte-Order-Mark -(\s-1BOM\s0), omdat veel Windows-programma's (inclusief Kladblok) standaard een \s-1BOM\s0 -toevoegen. Zie ook . -.PP -Op Unix hebben Unicode-tekstbestanden meestal geen \s-1BOM. \s0 Er wordt aangenomen -dat de codering van tekstbestanden gelijk is aan de tekencodering van de -ingestelde taalregio. -.PP -Dos2unix kan alleen detecteren of een bestand in UTF\-16\-codering is als het -bestand een \s-1BOM\s0 bevat. Wanneer een UTF\-16\-bestand geen \s-1BOM\s0 heeft, ziet -dos2unix het bestand als een binair bestand. -.PP -Gebruik optie \f(CW\*(C`\-ul\*(C'\fR of \f(CW\*(C`\-ub\*(C'\fR om een UTF\-16\-bestand zonder \s-1BOM\s0 om te -zetten. -.PP -Dos2unix schrijft standaard geen \s-1BOM\s0 in het uitvoerbestand. Met optie \f(CW\*(C`\-b\*(C'\fR -schrijft dos2unix een \s-1BOM\s0 wanneer het invoerbestand een \s-1BOM\s0 bevat. -.PP -Unix2dos schrijft standaard een \s-1BOM\s0 in het uitvoerbestand wanneer het -invoerbestand een \s-1BOM\s0 bevat. Gebruik optie \f(CW\*(C`\-r\*(C'\fR om de \s-1BOM\s0 te verwijderen. -.PP -Dos2unix en unix2dos schrijven altijd een \s-1BOM\s0 wanneer optie \f(CW\*(C`\-m\*(C'\fR gebruikt -wordt. -.SS "Unicode-voorbeelden" -.IX Subsection "Unicode-voorbeelden" -Omzetten van Windows \s-1UTF\-16 \s0(met \s-1BOM\s0) naar Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-n in.txt uit.txt -.Ve -.PP -Omzetten van Windows \s-1UTF\-16LE \s0(zonder \s-1BOM\s0) naar Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-ul \-n in.txt uit.txt -.Ve -.PP -Omzetten van Unix \s-1UTF\-8\s0 naar Windows \s-1UTF\-8\s0 met \s-1BOM:\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n in.txt uit.txt -.Ve -.PP -Omzetten van Unix \s-1UTF\-8\s0 naar Windows \s-1UTF\-16:\s0 -.PP -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t UTF\-16 > uit.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 is een standaard van de Chinese overheid. Een subset van de -GB18030\-standaard is officieel verplicht voor alle softwareproducten die in -China verkocht worden. Zie ook . -.PP -\&\s-1GB18030\s0 is volledig compatibel met Unicode, en kan als een -Unicodetransformatie beschouwd worden. Net als \s-1UTF\-8\s0 is \s-1GB18030\s0 compatibel -met \s-1ASCII. GB18030\s0 is ook compatibel met Windows-codetabel 936 (ook wel \s-1GBK\s0 -genoemd). -.PP -Op Unix/Linux worden UTF\-16\-bestanden alleen naar \s-1GB18030\s0 geconverteerd -wanneer de taalregio op China ingesteld is en de codering op \s-1GB18030.\s0 -Bijvoorbeeld, met de Britse taalregio-instelling \f(CW\*(C`en_GB.GB18030\*(C'\fR zal -conversie van \s-1UTF\-16\s0 naar \s-1GB18030\s0 niet werken, maar met de Chinese -instelling \f(CW\*(C`zh_CN.GB18030\*(C'\fR wel. -.PP -Op Windows dient u de optie \f(CW\*(C`\-gb\*(C'\fR te gebruiken om UTF\-16\-bestanden naar -\&\s-1GB18030\s0 te converteren. -.PP -GB18030\-bestanden kunnen een Byte-Order-Mark bevatten, net als -Unicode-bestanden. -.SH "VOORBEELDEN" -.IX Header "VOORBEELDEN" -Invoer lezen van standaardinvoer en uitvoer schrijven naar standaarduitvoer: -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Omzetten en vervangen van a.txt; omzetten en vervangen van b.txt: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Omzetten en vervangen van a.txt in ascii-conversiemodus: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Omzetten en vervangen van a.txt in ascii-conversiemodus; omzetten en -vervangen van b.txt in 7\-bits conversiemodus: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Omzetten van a.txt van Mac\- naar Unix-indeling: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Omzetten van a.txt van Unix\- naar Mac-indeling: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Omzetten en vervangen van a.txt met behoud van origineel tijdsstempel: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Omzetten van a.txt en resultaat naar e.txt schrijven: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Omzetten van a.txt en naar e.txt schrijven, met tijdsstempel van e.txt -gelijk aan die van a.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Omzetten en vervangen van a.txt; omzetten van b.txt en naar e.txt schrijven: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Omzetten van c.txt en naar e.txt schrijven; omzetten en vervangen van a.txt; -omzetten en vervangen van b.txt; omzetten van d.txt en naar f.txt schrijven. -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "RECURSIEVE CONVERSIE" -.IX Header "RECURSIEVE CONVERSIE" -Gebruik dos2unix in combinatie met de opdrachten \fBfind\fR(1) en \fBxargs\fR(1) -om tekstbestanden in een mappenboom recursief om te zetten. Bijvoorbeeld om -alle .txt\-bestanden in de mappenboom onder de huidige map te converteren, -typt u: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "LOKALISATIE" -.IX Header "LOKALISATIE" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -De primaire taal wordt geselecteerd via de omgevingsvariabele \s-1LANG. \s0 De -variabele \s-1LANG\s0 bestaat uit verschillende onderdelen. Het eerste deel is in -kleine letters de taalcode. Het tweede deel is optioneel en is de landcode -in hoofdletters, voorafgegaan door een liggend streepje. Er is ook een -optioneel derde deel: de tekencodering, voorafgegaan door een punt. Enkele -voorbeelden voor een POSIX-shell: -.Sp -.Vb 7 -\& export LANG=nl Nederlands -\& export LANG=nl_NL Nederlands, Nederland -\& export LANG=nl_BE Nederlands, België -\& export LANG=es_ES Spaans, Spanje -\& export LANG=es_MX Spaans, Mexico -\& export LANG=en_US.iso88591 Engels, VS, Latin\-1\-codering -\& export LANG=en_GB.UTF\-8 Engels, GB, UTF\-8\-codering -.Ve -.Sp -Voor een complete lijst van taal\- en landcodes zie de gettext-handleiding: - -.Sp -Op Unix-systemen kunt u de opdracht \fBlocale\fR(1) gebruiken om specifieke -taalregio-informatie te verkrijgen. -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -Met de omgevingsvariabele \s-1LANGUAGE\s0 kunt u een prioriteitenlijst specificeren -van talen, gescheiden door dubbele punten. Dos2unix geeft voorrang aan -\&\s-1LANGUAGE\s0 boven \s-1LANG. \s0 Bijvoorbeeld, eerst Nederlands en dan Duits: -\&\f(CW\*(C`LANGUAGE=nl:de\*(C'\fR. U moet eerst lokalisatie in werking stellen, door het -instellen van \s-1LANG \s0(of \s-1LC_ALL\s0) op een waarde ongelijk aan \*(L"C\*(R", voordat u een -talen-prioriteitenlijst kunt gebruiken via de variabele \s-1LANGUAGE. \s0 Zie ook -de gettext-handleiding: - -.Sp -Als u een taal kiest die niet beschikbaar is, worden de standaard Engelse -berichten gebruikt. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Met de omgevingsvariabele \s-1DOS2UNIX_LOCALEDIR\s0 kan de \s-1LOCALEDIR\s0 die ingesteld -werd tijdens compilatie worden overstemd. \s-1LOCALEDIR\s0 wordt gebruikt om de -taalbestanden te vinden. De \s-1GNU\s0 standaardwaarde is -\&\f(CW\*(C`/usr/local/share/locale\*(C'\fR. De optie \fB\-\-version\fR laat de gebruikte -\&\s-1LOCALEDIR\s0 zien. -.Sp -Voorbeeld (POSIX-shell): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "AFSLUITWAARDE" -.IX Header "AFSLUITWAARDE" -Bij succes wordt nul teruggegeven. Wanneer een systeemfout optreedt wordt -het laatste systeemfoutnummer teruggegeven. Bij andere fouten wordt 1 -teruggegeven. -.PP -De afsluitwaarde is altijd nul in de stillewerkingsmodus, behalve wanneer -verkeerde opties worden gegeven. -.SH "STANDAARDEN" -.IX Header "STANDAARDEN" - -.PP - -.PP - -.PP - -.SH "AUTEURS" -.IX Header "AUTEURS" -Benjamin Lin \- , Bernd Johannes Wuebben -(mac2unix\-modus) \- , Christian Wurll (toevoegen van extra -regeleindes) \- , Erwin Waterlander \- -(beheerder) -.PP -Projectpagina: -.PP -SourceForge-pagina: -.SH "ZIE OOK" -.IX Header "ZIE OOK" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/nl/man1/unix2dos.1 b/Tools/dos2unix/share/man/nl/man1/unix2dos.1 deleted file mode 100644 index 08b1d11..0000000 --- a/Tools/dos2unix/share/man/nl/man1/unix2dos.1 +++ /dev/null @@ -1,761 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NAAM" -.IX Header "NAAM" -dos2unix \- omzetter van tekstbestandsindelingen, van DOS/Mac naar Unix en -vice versa -.SH "OVERZICHT" -.IX Header "OVERZICHT" -.Vb 2 -\& dos2unix [opties] [BESTAND ...] [\-n INVOERBESTAND UITVOERBESTAND ...] -\& unix2dos [opties] [BESTAND ...] [\-n INVOERBESTAND UITVOERBESTAND ...] -.Ve -.SH "BESCHRIJVING" -.IX Header "BESCHRIJVING" -Het Dos2unix pakket bevat de toepassingen \f(CW\*(C`dos2unix\*(C'\fR en \f(CW\*(C`unix2dos\*(C'\fR om -platte tekstbestanden in \s-1DOS\-\s0 of Mac-indeling naar Unix-indeling om te -zetten, en vice versa. -.PP -In DOS/Windows\-tekstbestanden bestaat een regeleinde uit een combinatie van -twee tekens: een 'Carriage Return' (\s-1CR\s0) gevolgd door een 'Line Feed' (\s-1LF\s0). -In Unix-tekstbestanden bestaat een regeleinde uit één enkel 'Newline'\-teken, -dat gelijk is aan een \s-1DOS \s0'Line Feed'-teken (\s-1LF\s0). In Mac-tekstbestanden, -van vóór Mac \s-1OS X,\s0 bestaan regeleindes uit één enkel 'Carriage -Return'-teken. Mac \s-1OS X\s0 is op Unix gebaseerd en heeft dezelfde regeleindes -als Unix. -.PP -Naast regeleindes kan Dos2unix ook de codering van bestanden converteren. -Enkele DOS-codetabellen kunnen omgezet worden naar Unix Latin\-1. En Windows -Unicode-bestanden (\s-1UTF\-16\s0) kunnen geconverteerd worden naar Unix -Unicode-bestanden (\s-1UTF\-8\s0). -.PP -Binaire bestanden worden automatisch overgeslagen, behalve als de omzetting -geforceerd wordt. -.PP -Niet-reguliere bestanden, zoals mappen en \s-1FIFO\s0's, worden automatisch -overgeslagen. -.PP -Symbolische koppelingen en hun doelen blijven standaard onaangeroerd. -Optioneel kunnen symbolische koppelingen worden vervangen, of de uitvoer kan -naar het doel van de symbolische koppeling worden geschreven. Op Windows -wordt het schrijven naar het doel van een symbolische koppeling niet -ondersteund. -.PP -Dos2unix is gemodelleerd naar dos2unix op SunOS/Solaris, maar er is één -belangrijk verschil: deze versie van dos2unix voert standaard een -vervangende conversie uit (oud-bestand-modus) terwijl de oorspronkelijke -SunOS/Solaris\-versie alleen de gepaarde conversie (nieuw-bestand-modus) -kent. Zie ook de opties \f(CW\*(C`\-o\*(C'\fR en \f(CW\*(C`\-n\*(C'\fR. -.SH "OPTIES" -.IX Header "OPTIES" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Alle volgende opties als bestandsnamen behandelen. Gebruik deze optie als u -een bestand wilt converteren waarvan de naam met een streepje begint. -Bijvoorbeeld, om een bestand genaamd \*(L"\-foo\*(R" om te zetten, gebruikt u de -volgende opdracht: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -Of in nieuw-bestand-modus: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo uit.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Alleen regeleindes converteren. Dit is de standaardconversiemodus. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Conversie tussen de tekensets \s-1DOS\s0 en \s-1ISO\-8859\-1. \s0 Zie ook de sectie -\&\s-1CONVERSIEMODI.\s0 -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Windows-codetabel 1252 (West-Europees) gebruiken. -.IP "\fB\-437\fR" 4 -.IX Item "-437" -DOS-codetabel 437 (\s-1VS\s0) gebruiken. Dit is de standaard codetabel die -gebruikt wordt bij ISO-conversie. -.IP "\fB\-850\fR" 4 -.IX Item "-850" -DOS-codetabel 850 (West-Europees) gebruiken. -.IP "\fB\-860\fR" 4 -.IX Item "-860" -DOS-codetabel 860 (Portugees) gebruiken. -.IP "\fB\-863\fR" 4 -.IX Item "-863" -DOS-codetabel 863 (Canadees Frans) gebruiken. -.IP "\fB\-865\fR" 4 -.IX Item "-865" -DOS-codetabel 865 (Scandinavisch) gebruiken. -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Lettertekens met het achtste bit gezet converteren naar spaties. -.IP "\fB\-b\fR, \fB\-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Een Byte-Order-Mark (\s-1BOM\s0) behouden. Als het invoerbestand een \s-1BOM\s0 bevat, -dan wordt ook een \s-1BOM\s0 naar het uitvoerbestand geschreven. Dit is het -standaardgedrag bij conversie naar \s-1DOS. \s0 Zie ook optie \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c\fR, \fB\-\-convmode \s-1CONVERSIEMODUS\s0\fR" 4 -.IX Item "-c, --convmode CONVERSIEMODUS" -De te gebruiken conversiemodus. \s-1CONVERSIEMODUS\s0 kan zijn: \fIascii\fR, \fI7bit\fR, -\&\fIiso\fR, of \fImac\fR, waarbij ascii de standaardinstelling is. -.IP "\fB\-f\fR, \fB\-\-force\fR" 4 -.IX Item "-f, --force" -Conversie van binaire bestanden afdwingen. -.IP "\fB\-gb\fR, \fB\-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -Op Windows worden UTF\-16\-bestanden standaard naar \s-1UTF\-8\s0 geconverteerd, -ongeacht de ingestelde taalregio. Gebruik deze optie om UTF\-16\-bestanden -naar \s-1GB18030\s0 te converteren. Deze optie is alleen beschikbaar op Windows. -Zie ook de sectie \fB\s-1GB18030\s0\fR. -.IP "\fB\-h\fR, \fB\-\-help\fR" 4 -.IX Item "-h, --help" -Een hulptekst tonen. -.IP "\fB\-i\fR[\fB\s-1VLAGGEN\s0\fR], \fB\-\-info\fR[\fB=VLAGGEN\fR] \fB\s-1BESTAND\s0\fR..." 4 -.IX Item "-i[VLAGGEN], --info[=VLAGGEN] BESTAND..." -Bestandsinformatie tonen. Er wordt niets geconverteerd. -.Sp -De volgende informatie wordt weergegeven, in deze volgorde: het aantal -DOS-regeleindes, het aantal Unix-regeleindes, het aantal Mac-regeleindes, de -Byte-Order-Mark, of het een tekst\- of binair bestand is, en de bestandsnaam. -.Sp -Voorbeelduitvoer: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Bij de optie kunnen één of meer vlaggen meegegeven worden om de uitvoer te -beperken. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Het aantal DOS-regeleindes tonen. -.IP "\fBu\fR" 4 -.IX Item "u" -Het aantal Unix-regeleindes tonen. -.IP "\fBm\fR" 4 -.IX Item "m" -Het aantal Mac-regeleindes tonen. -.IP "\fBb\fR" 4 -.IX Item "b" -De Byte-Order-Mark tonen. -.IP "\fBt\fR" 4 -.IX Item "t" -Tonen of het bestand tekst is of binair. -.IP "\fBc\fR" 4 -.IX Item "c" -Alleen de namen tonen van de bestanden die geconverteerd zouden worden. -.Sp -Met de vlag \f(CW\*(C`c\*(C'\fR toont dos2unix alleen de bestanden die DOS-regeleindes -bevatten, en unix2dos alleen de bestanden die Unix-regeleindes bevatten. -.RE -.RS 4 -.Sp -Voorbeelden: -.Sp -Informatie weergeven voor alle bestanden met de extensie 'txt': -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Alleen de aantallen DOS-regeleindes en Unix-regeleindes tonen: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Alleen de Byte-Order-Mark tonen: -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -De bestanden opsommen die DOS-regeleindes bevatten: -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -De bestanden opsommen die Unix-regeleindes bevatten: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k\fR, \fB\-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -Het tijdsstempel van het invoerbestand behouden voor het uitvoerbestand. -.IP "\fB\-L\fR, \fB\-\-license\fR" 4 -.IX Item "-L, --license" -De softwarelicentie tonen. -.IP "\fB\-l\fR, \fB\-\-newline\fR" 4 -.IX Item "-l, --newline" -Een extra regeleinde toevoegen. -.Sp -\&\fBdos2unix\fR: Alleen DOS-regeleindes worden omgezet naar twee -Unix-regeleindes. In Mac-modus worden alleen Mac-regeleindes omgezet naar -twee Unix-regeleindes. -.Sp -\&\fBunix2dos\fR: Alleen Unix-regeleindes worden omgezet naar twee -DOS-regeleindes. In Mac-modus worden Unix-regeleindes omgezet naar twee -Mac-regeleindes. -.IP "\fB\-m\fR, \fB\-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -Een Byte-Order-Mark (\s-1BOM\s0) naar het uitvoerbestand schrijven. Standaard -wordt een \s-1UTF\-8\-BOM\s0 geschreven. -.Sp -Als het invoerbestand in \s-1UTF\-16\s0 is, en de optie \f(CW\*(C`\-u\*(C'\fR is gegeven, dan wordt -een \s-1UTF\-16\-BOM\s0 geschreven. -.Sp -Gebruik deze optie nooit als de codering van het uitvoerbestand niet \s-1UTF\-8\s0 -of \s-1UTF\-16\s0 is. Zie ook de sectie \s-1UNICODE.\s0 -.IP "\fB\-n\fR, \fB\-\-newfile \s-1INVOERBESTAND UITVOERBESTAND\s0\fR ..." 4 -.IX Item "-n, --newfile INVOERBESTAND UITVOERBESTAND ..." -Nieuw-bestand-modus. Het bestand \s-1INVOERBESTAND\s0 converteren en naar bestand -\&\s-1UITVOERBESTAND\s0 schrijven. Bestandsnamen moeten opgegeven worden in paren. -Jokertekens moeten \fIniet\fRgebruikt worden, anders \fIverlies\fR je de -bestanden. -.Sp -De gebruiker die de conversie start in nieuw-bestand (gepaarde) modus wordt -de eigenaar van het geconverteerde bestand. De lees/schrijf\-toegangsrechten -van het nieuwe bestand worden de toegangsrechten van het originele bestand -minus de \fIumask\fR\|(1) van de gebruiker die de conversie draait. -.IP "\fB\-o\fR, \fB\-\-oldfile \s-1BESTAND\s0\fR ..." 4 -.IX Item "-o, --oldfile BESTAND ..." -Oud-bestand-modus. Het bestand \s-1BESTAND\s0 converteren en overschrijven. Dit -is de standaard modus. Jokertekens kunnen gebruikt worden. -.Sp -In oud-bestand (vervangende) modus krijgt het geconverteerde bestand -dezelfde eigenaar, groep en lees/schrijf\-rechten als het originele bestand. -Ook wanneer het bestand wordt omgezet door een andere gebruiker die -schrijfrechten heeft op het bestand (b.v. gebruiker root). De omzetting -wordt afgebroken wanneer het niet mogelijk is de originele waardes te -behouden. Verandering van eigenaar kan betekenen dat de originele eigenaar -het bestand niet meer kan lezen. Verandering van groep zou een -veiligheidsrisico kunnen zijn, het bestand zou leesbaar kunnen worden voor -personen voor wie het niet bestemd is. Behoud van eigenaar, groep en -lees/schrijf\-rechten wordt alleen ondersteund op Unix. -.IP "\fB\-q\fR, \fB\-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Stille werking. Alle waarschuwingen onderdrukken. De aflsuitwaarde is nul, -behalve wanneer verkeerde opties worden gegeven. -.IP "\fB\-r\fR, \fB\-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -Een Byte-Order-Mark (\s-1BOM\s0) verwijderen. Er wordt geen \s-1BOM\s0 naar het -uitvoerbestand geschreven. Dit is het standaardgedrag bij conversie naar -Unix. Zie ook optie \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s\fR, \fB\-\-safe\fR" 4 -.IX Item "-s, --safe" -Binaire bestanden overslaan (standaard). -.IP "\fB\-u\fR, \fB\-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -De originele UTF\-16\-codering van het invoerbestand behouden. Het -uitvoerbestand wordt in dezelfde UTF\-16\-codering (little endian of big -endian) geschreven als het invoerbestand. Dit voorkomt conversie naar -\&\s-1UTF\-8. \s0 Er wordt ook een corresponderende \s-1UTF\-16\-BOM\s0 geschreven. Deze optie -kan uitgeschakeld worden met de optie \f(CW\*(C`\-ascii\*(C'\fR. -.IP "\fB\-ul\fR, \fB\-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -Veronderstellen dat de indeling van het invoerbestand \s-1UTF\-16LE\s0 is. -.Sp -Wanneer het invoerbestand een Byte-Order-Mark (\s-1BOM\s0) bevat, dan gaat deze \s-1BOM\s0 -vóór deze optie. -.Sp -Wanneer een verkeerde aanname is gemaakt (het invoerbestand was geen -\&\s-1UTF\-16LE\s0) en de conversie verliep met succes, dan krijgt u een UTF\-8\-bestand -met verkeerde tekst. De verkeerde conversie kan ongedaan worden gemaakt -door met \fIiconv\fR\|(1) het UTF\-8\-uitvoerbestand terug om te zetten naar -\&\s-1UTF\-16LE. \s0 Dit zal het originele bestand terug brengen. -.Sp -De aanname van \s-1UTF\-16LE\s0 werkt als een \fIconversiemodus\fR. Door de -standaardmodus \fIascii\fR in te schakelen wordt de UTF\-16LE\-veronderstelling -uitgeschakeld. -.IP "\fB\-ub\fR, \fB\-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -Veronderstellen dat de indeling van het invoerbestand \s-1UTF\-16BE\s0 is. -.Sp -Deze optie werkt hetzelfde als optie \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v\fR, \fB\-\-verbose\fR" 4 -.IX Item "-v, --verbose" -Extra meldingen weergeven. Er wordt extra informatie getoond over -Byte-Order-Marks en het aantal geconverteerde regeleindes. -.IP "\fB\-F\fR, \fB\-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -Symbolische koppelingen volgen en de doelen converteren. -.IP "\fB\-R\fR, \fB\-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Symbolische koppelingen vervangen door geconverteerde bestanden (de -originele doelbestanden blijven ongewijzigd). -.IP "\fB\-S\fR, \fB\-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -Symbolische koppelingen en doelen ongewijzigd laten (standaard). -.IP "\fB\-V\fR, \fB\-\-version\fR" 4 -.IX Item "-V, --version" -Versie-informatie tonen. -.SH "MAC-MODUS" -.IX Header "MAC-MODUS" -In normale modus worden DOS-regeleindes naar Unix omgezet en vice versa. -Mac-regeleindes worden niet omgezet. -.PP -In Mac-modus worden Mac-regeleindes naar Unix omgezet en vice versa. -DOS-regeleindes blijven ongewijzigd. -.PP -Om in Mac-modus te draaien kunt u de opdrachtregeloptie \f(CW\*(C`\-c mac\*(C'\fR gebruiken, -of de opdrachten \f(CW\*(C`mac2unix\*(C'\fR of \f(CW\*(C`unix2mac\*(C'\fR. -.SH "CONVERSIEMODI" -.IX Header "CONVERSIEMODI" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -In modus \f(CW\*(C`ascii\*(C'\fR worden alleen regeleindes omgezet. Dit is de -standaardmodus. -.Sp -Hoewel de naam van deze modus \s-1ASCII\s0 is, wat een 7\-bits standaard is, is de -werkelijke modus 8\-bits. Gebruik altijd deze modus wanneer u Unicode -UTF\-8\-bestanden omzet. -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -Alle 8\-bits niet-ASCII lettertekens (met waardes van 128 t/m 255) worden -omgezet naar een 7\-bits spatie. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Tekens worden omgezet tussen een DOS-tekenset (codetabel) en de ISO-tekenset -\&\s-1ISO\-8859\-1 \s0(Latin\-1) op Unix. DOS-tekens zonder een ISO\-8859\-1\-equivalent, -waarvoor dus geen omzetting mogelijk is, worden omgezet in een punt. -Hetzelfde geldt voor ISO\-8859\-1\-tekens zonder DOS-tegenhanger. -.Sp -Wanneer alleen optie \f(CW\*(C`\-iso\*(C'\fR gebruikt wordt, zal dos2unix proberen de -actieve codetabel te gebruiken. Als dat niet mogelijk is wordt codetabel -\&\s-1CP437\s0 gebruikt, die vooral in de \s-1VS\s0 gebruikt wordt. Om een bepaalde -codetabel te forceren, kunt u de opties \f(CW\*(C`\-850\*(C'\fR (West-Europees), \f(CW\*(C`\-860\*(C'\fR -(Portugees), \f(CW\*(C`\-863\*(C'\fR (Canadees Frans) of \f(CW\*(C`\-865\*(C'\fR (Scandinavisch) gebruiken. -Windows-codetabel \s-1CP1252 \s0(West-Europees) wordt ook ondersteund met optie -\&\f(CW\*(C`\-1252\*(C'\fR. Gebruik voor andere codetabellen dos2unix in combinatie met -\&\fIiconv\fR\|(1). Iconv kan omzetten tussen een lange lijst tekensetcoderingen. -.Sp -Gebruik ISO-conversie nooit op Unicode-tekstbestanden. Het zal -UTF\-8\-gecodeerde bestanden beschadigen. -.Sp -Enkele voorbeelden: -.Sp -Omzetten van de standaard DOS-codetabel naar Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-iso \-n in.txt uit.txt -.Ve -.Sp -Omzetten van \s-1DOS CP850\s0 naar Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-850 \-n in.txt uit.txt -.Ve -.Sp -Omzetten van Windows \s-1CP1252\s0 naar Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n in.txt uit.txt -.Ve -.Sp -Omzetten van Windows \s-1CP1252\s0 naar Unix \s-1UTF\-8 \s0(Unicode): -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 in.txt | dos2unix > uit.txt -.Ve -.Sp -Omzetten van Unix Latin\-1 naar de standaard DOS-codetabel: -.Sp -.Vb 1 -\& unix2dos \-iso \-n in.txt uit.txt -.Ve -.Sp -Omzetten van Unix Latin\-1 naar \s-1DOS CP850:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n in.txt uit.txt -.Ve -.Sp -Omzetten van Unix Latin\-1 naar Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos \-1252 \-n in.txt uit.txt -.Ve -.Sp -Omzetten van Unix \s-1UTF\-8 \s0(Unicode) naar Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t CP1252 > uit.txt -.Ve -.Sp -Zie ook en -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Coderingen" -.IX Subsection "Coderingen" -Er bestaan verschillende Unicode-coderingen. Op Unix en Linux zijn -Unicode-bestanden typisch gecodeerd in \s-1UTF\-8. \s0 Op Windows kunnen -Unicode-tekstbestanden gecodeerd zijn in \s-1UTF\-8, UTF\-16\s0 of \s-1UTF\-16\s0 big endian, -maar ze zijn meestal gecodeerd in \s-1UTF\-16.\s0 -.SS "Conversie" -.IX Subsection "Conversie" -Unicode-tekstbestanden kunnen \s-1DOS\-,\s0 Unix\- of Mac-regeleindes hebben, net als -reguliere tekstbestanden. -.PP -Alle versies van dos2unix en unix2dos kunnen UTF\-8\-gecodeerde bestanden -omzetten, want \s-1UTF\-8\s0 is ontworpen op compatibiliteit met \s-1ASCII.\s0 -.PP -Dos2unix en unix2dos met Unicode UTF\-16\-ondersteuning kunnen little en big -endian UTF\-16\-gecodeerde tekstbestanden lezen. Om er achter te komen of -dos2unix gebouwd is met \s-1UTF\-16\-\s0 ondersteuning, typt u \f(CW\*(C`dos2unix \-V\*(C'\fR. -.PP -Op Unix/Linux worden UTF\-16\-bestanden geconverteerd naar de codering van de -ingestelde taalregio. Gebruik de opdracht \fBlocale\fR(1) om te zien wat de -ingestelde codering is. Wanneer conversie niet mogelijk is, treedt er een -fout op en wordt het bestand overgeslagen. -.PP -Op Windows worden UTF\-16\-bestanden standaard naar \s-1UTF\-8\s0 geconverteerd. -UTF\-8\-tekstbestanden worden alom goed ondersteund, zowel op Windows als -Unix/Linux. -.PP -De \s-1UTF\-16\-\s0 en UTF\-8\-coderingen zijn volledig compatibel, er gaat bij het -converteren niets verloren. Als er tijdens de conversie van \s-1UTF\-16\s0 naar -\&\s-1UTF\-8\s0 een fout optreedt, bijvoorbeeld omdat het UTF\-16\-invoerbestand een -fout bevat, dan wordt het bestand overgeslagen. -.PP -Wanneer \f(CW\*(C`\-u\*(C'\fR gebruikt wordt, wordt het uitvoerbestand in dezelfde -UTF\-16\-codering geschreven als het invoerbestand. Optie \f(CW\*(C`\-u\*(C'\fR voorkomt -conversie naar \s-1UTF\-8.\s0 -.PP -Dos2unix en unix2dos hebben geen optie om van \s-1UTF\-8\s0 naar \s-1UTF\-16\s0 te -converteren. -.PP -\&\s-1ISO\-\s0 en 7\-bits\-conversie werken niet op UTF\-16\-bestanden. -.SS "Byte-Order-Mark" -.IX Subsection "Byte-Order-Mark" -Op Windows bevatten Unicode-tekstbestanden gewoonlijk een Byte-Order-Mark -(\s-1BOM\s0), omdat veel Windows-programma's (inclusief Kladblok) standaard een \s-1BOM\s0 -toevoegen. Zie ook . -.PP -Op Unix hebben Unicode-tekstbestanden meestal geen \s-1BOM. \s0 Er wordt aangenomen -dat de codering van tekstbestanden gelijk is aan de tekencodering van de -ingestelde taalregio. -.PP -Dos2unix kan alleen detecteren of een bestand in UTF\-16\-codering is als het -bestand een \s-1BOM\s0 bevat. Wanneer een UTF\-16\-bestand geen \s-1BOM\s0 heeft, ziet -dos2unix het bestand als een binair bestand. -.PP -Gebruik optie \f(CW\*(C`\-ul\*(C'\fR of \f(CW\*(C`\-ub\*(C'\fR om een UTF\-16\-bestand zonder \s-1BOM\s0 om te -zetten. -.PP -Dos2unix schrijft standaard geen \s-1BOM\s0 in het uitvoerbestand. Met optie \f(CW\*(C`\-b\*(C'\fR -schrijft dos2unix een \s-1BOM\s0 wanneer het invoerbestand een \s-1BOM\s0 bevat. -.PP -Unix2dos schrijft standaard een \s-1BOM\s0 in het uitvoerbestand wanneer het -invoerbestand een \s-1BOM\s0 bevat. Gebruik optie \f(CW\*(C`\-r\*(C'\fR om de \s-1BOM\s0 te verwijderen. -.PP -Dos2unix en unix2dos schrijven altijd een \s-1BOM\s0 wanneer optie \f(CW\*(C`\-m\*(C'\fR gebruikt -wordt. -.SS "Unicode-voorbeelden" -.IX Subsection "Unicode-voorbeelden" -Omzetten van Windows \s-1UTF\-16 \s0(met \s-1BOM\s0) naar Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-n in.txt uit.txt -.Ve -.PP -Omzetten van Windows \s-1UTF\-16LE \s0(zonder \s-1BOM\s0) naar Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-ul \-n in.txt uit.txt -.Ve -.PP -Omzetten van Unix \s-1UTF\-8\s0 naar Windows \s-1UTF\-8\s0 met \s-1BOM:\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n in.txt uit.txt -.Ve -.PP -Omzetten van Unix \s-1UTF\-8\s0 naar Windows \s-1UTF\-16:\s0 -.PP -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t UTF\-16 > uit.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 is een standaard van de Chinese overheid. Een subset van de -GB18030\-standaard is officieel verplicht voor alle softwareproducten die in -China verkocht worden. Zie ook . -.PP -\&\s-1GB18030\s0 is volledig compatibel met Unicode, en kan als een -Unicodetransformatie beschouwd worden. Net als \s-1UTF\-8\s0 is \s-1GB18030\s0 compatibel -met \s-1ASCII. GB18030\s0 is ook compatibel met Windows-codetabel 936 (ook wel \s-1GBK\s0 -genoemd). -.PP -Op Unix/Linux worden UTF\-16\-bestanden alleen naar \s-1GB18030\s0 geconverteerd -wanneer de taalregio op China ingesteld is en de codering op \s-1GB18030.\s0 -Bijvoorbeeld, met de Britse taalregio-instelling \f(CW\*(C`en_GB.GB18030\*(C'\fR zal -conversie van \s-1UTF\-16\s0 naar \s-1GB18030\s0 niet werken, maar met de Chinese -instelling \f(CW\*(C`zh_CN.GB18030\*(C'\fR wel. -.PP -Op Windows dient u de optie \f(CW\*(C`\-gb\*(C'\fR te gebruiken om UTF\-16\-bestanden naar -\&\s-1GB18030\s0 te converteren. -.PP -GB18030\-bestanden kunnen een Byte-Order-Mark bevatten, net als -Unicode-bestanden. -.SH "VOORBEELDEN" -.IX Header "VOORBEELDEN" -Invoer lezen van standaardinvoer en uitvoer schrijven naar standaarduitvoer: -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Omzetten en vervangen van a.txt; omzetten en vervangen van b.txt: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Omzetten en vervangen van a.txt in ascii-conversiemodus: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Omzetten en vervangen van a.txt in ascii-conversiemodus; omzetten en -vervangen van b.txt in 7\-bits conversiemodus: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Omzetten van a.txt van Mac\- naar Unix-indeling: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Omzetten van a.txt van Unix\- naar Mac-indeling: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Omzetten en vervangen van a.txt met behoud van origineel tijdsstempel: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Omzetten van a.txt en resultaat naar e.txt schrijven: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Omzetten van a.txt en naar e.txt schrijven, met tijdsstempel van e.txt -gelijk aan die van a.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Omzetten en vervangen van a.txt; omzetten van b.txt en naar e.txt schrijven: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Omzetten van c.txt en naar e.txt schrijven; omzetten en vervangen van a.txt; -omzetten en vervangen van b.txt; omzetten van d.txt en naar f.txt schrijven. -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "RECURSIEVE CONVERSIE" -.IX Header "RECURSIEVE CONVERSIE" -Gebruik dos2unix in combinatie met de opdrachten \fBfind\fR(1) en \fBxargs\fR(1) -om tekstbestanden in een mappenboom recursief om te zetten. Bijvoorbeeld om -alle .txt\-bestanden in de mappenboom onder de huidige map te converteren, -typt u: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "LOKALISATIE" -.IX Header "LOKALISATIE" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -De primaire taal wordt geselecteerd via de omgevingsvariabele \s-1LANG. \s0 De -variabele \s-1LANG\s0 bestaat uit verschillende onderdelen. Het eerste deel is in -kleine letters de taalcode. Het tweede deel is optioneel en is de landcode -in hoofdletters, voorafgegaan door een liggend streepje. Er is ook een -optioneel derde deel: de tekencodering, voorafgegaan door een punt. Enkele -voorbeelden voor een POSIX-shell: -.Sp -.Vb 7 -\& export LANG=nl Nederlands -\& export LANG=nl_NL Nederlands, Nederland -\& export LANG=nl_BE Nederlands, België -\& export LANG=es_ES Spaans, Spanje -\& export LANG=es_MX Spaans, Mexico -\& export LANG=en_US.iso88591 Engels, VS, Latin\-1\-codering -\& export LANG=en_GB.UTF\-8 Engels, GB, UTF\-8\-codering -.Ve -.Sp -Voor een complete lijst van taal\- en landcodes zie de gettext-handleiding: - -.Sp -Op Unix-systemen kunt u de opdracht \fBlocale\fR(1) gebruiken om specifieke -taalregio-informatie te verkrijgen. -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -Met de omgevingsvariabele \s-1LANGUAGE\s0 kunt u een prioriteitenlijst specificeren -van talen, gescheiden door dubbele punten. Dos2unix geeft voorrang aan -\&\s-1LANGUAGE\s0 boven \s-1LANG. \s0 Bijvoorbeeld, eerst Nederlands en dan Duits: -\&\f(CW\*(C`LANGUAGE=nl:de\*(C'\fR. U moet eerst lokalisatie in werking stellen, door het -instellen van \s-1LANG \s0(of \s-1LC_ALL\s0) op een waarde ongelijk aan \*(L"C\*(R", voordat u een -talen-prioriteitenlijst kunt gebruiken via de variabele \s-1LANGUAGE. \s0 Zie ook -de gettext-handleiding: - -.Sp -Als u een taal kiest die niet beschikbaar is, worden de standaard Engelse -berichten gebruikt. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Met de omgevingsvariabele \s-1DOS2UNIX_LOCALEDIR\s0 kan de \s-1LOCALEDIR\s0 die ingesteld -werd tijdens compilatie worden overstemd. \s-1LOCALEDIR\s0 wordt gebruikt om de -taalbestanden te vinden. De \s-1GNU\s0 standaardwaarde is -\&\f(CW\*(C`/usr/local/share/locale\*(C'\fR. De optie \fB\-\-version\fR laat de gebruikte -\&\s-1LOCALEDIR\s0 zien. -.Sp -Voorbeeld (POSIX-shell): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "AFSLUITWAARDE" -.IX Header "AFSLUITWAARDE" -Bij succes wordt nul teruggegeven. Wanneer een systeemfout optreedt wordt -het laatste systeemfoutnummer teruggegeven. Bij andere fouten wordt 1 -teruggegeven. -.PP -De afsluitwaarde is altijd nul in de stillewerkingsmodus, behalve wanneer -verkeerde opties worden gegeven. -.SH "STANDAARDEN" -.IX Header "STANDAARDEN" - -.PP - -.PP - -.PP - -.SH "AUTEURS" -.IX Header "AUTEURS" -Benjamin Lin \- , Bernd Johannes Wuebben -(mac2unix\-modus) \- , Christian Wurll (toevoegen van extra -regeleindes) \- , Erwin Waterlander \- -(beheerder) -.PP -Projectpagina: -.PP -SourceForge-pagina: -.SH "ZIE OOK" -.IX Header "ZIE OOK" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/nl/man1/unix2mac.1 b/Tools/dos2unix/share/man/nl/man1/unix2mac.1 deleted file mode 100644 index 08b1d11..0000000 --- a/Tools/dos2unix/share/man/nl/man1/unix2mac.1 +++ /dev/null @@ -1,761 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NAAM" -.IX Header "NAAM" -dos2unix \- omzetter van tekstbestandsindelingen, van DOS/Mac naar Unix en -vice versa -.SH "OVERZICHT" -.IX Header "OVERZICHT" -.Vb 2 -\& dos2unix [opties] [BESTAND ...] [\-n INVOERBESTAND UITVOERBESTAND ...] -\& unix2dos [opties] [BESTAND ...] [\-n INVOERBESTAND UITVOERBESTAND ...] -.Ve -.SH "BESCHRIJVING" -.IX Header "BESCHRIJVING" -Het Dos2unix pakket bevat de toepassingen \f(CW\*(C`dos2unix\*(C'\fR en \f(CW\*(C`unix2dos\*(C'\fR om -platte tekstbestanden in \s-1DOS\-\s0 of Mac-indeling naar Unix-indeling om te -zetten, en vice versa. -.PP -In DOS/Windows\-tekstbestanden bestaat een regeleinde uit een combinatie van -twee tekens: een 'Carriage Return' (\s-1CR\s0) gevolgd door een 'Line Feed' (\s-1LF\s0). -In Unix-tekstbestanden bestaat een regeleinde uit één enkel 'Newline'\-teken, -dat gelijk is aan een \s-1DOS \s0'Line Feed'-teken (\s-1LF\s0). In Mac-tekstbestanden, -van vóór Mac \s-1OS X,\s0 bestaan regeleindes uit één enkel 'Carriage -Return'-teken. Mac \s-1OS X\s0 is op Unix gebaseerd en heeft dezelfde regeleindes -als Unix. -.PP -Naast regeleindes kan Dos2unix ook de codering van bestanden converteren. -Enkele DOS-codetabellen kunnen omgezet worden naar Unix Latin\-1. En Windows -Unicode-bestanden (\s-1UTF\-16\s0) kunnen geconverteerd worden naar Unix -Unicode-bestanden (\s-1UTF\-8\s0). -.PP -Binaire bestanden worden automatisch overgeslagen, behalve als de omzetting -geforceerd wordt. -.PP -Niet-reguliere bestanden, zoals mappen en \s-1FIFO\s0's, worden automatisch -overgeslagen. -.PP -Symbolische koppelingen en hun doelen blijven standaard onaangeroerd. -Optioneel kunnen symbolische koppelingen worden vervangen, of de uitvoer kan -naar het doel van de symbolische koppeling worden geschreven. Op Windows -wordt het schrijven naar het doel van een symbolische koppeling niet -ondersteund. -.PP -Dos2unix is gemodelleerd naar dos2unix op SunOS/Solaris, maar er is één -belangrijk verschil: deze versie van dos2unix voert standaard een -vervangende conversie uit (oud-bestand-modus) terwijl de oorspronkelijke -SunOS/Solaris\-versie alleen de gepaarde conversie (nieuw-bestand-modus) -kent. Zie ook de opties \f(CW\*(C`\-o\*(C'\fR en \f(CW\*(C`\-n\*(C'\fR. -.SH "OPTIES" -.IX Header "OPTIES" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Alle volgende opties als bestandsnamen behandelen. Gebruik deze optie als u -een bestand wilt converteren waarvan de naam met een streepje begint. -Bijvoorbeeld, om een bestand genaamd \*(L"\-foo\*(R" om te zetten, gebruikt u de -volgende opdracht: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -Of in nieuw-bestand-modus: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo uit.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Alleen regeleindes converteren. Dit is de standaardconversiemodus. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Conversie tussen de tekensets \s-1DOS\s0 en \s-1ISO\-8859\-1. \s0 Zie ook de sectie -\&\s-1CONVERSIEMODI.\s0 -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Windows-codetabel 1252 (West-Europees) gebruiken. -.IP "\fB\-437\fR" 4 -.IX Item "-437" -DOS-codetabel 437 (\s-1VS\s0) gebruiken. Dit is de standaard codetabel die -gebruikt wordt bij ISO-conversie. -.IP "\fB\-850\fR" 4 -.IX Item "-850" -DOS-codetabel 850 (West-Europees) gebruiken. -.IP "\fB\-860\fR" 4 -.IX Item "-860" -DOS-codetabel 860 (Portugees) gebruiken. -.IP "\fB\-863\fR" 4 -.IX Item "-863" -DOS-codetabel 863 (Canadees Frans) gebruiken. -.IP "\fB\-865\fR" 4 -.IX Item "-865" -DOS-codetabel 865 (Scandinavisch) gebruiken. -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Lettertekens met het achtste bit gezet converteren naar spaties. -.IP "\fB\-b\fR, \fB\-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Een Byte-Order-Mark (\s-1BOM\s0) behouden. Als het invoerbestand een \s-1BOM\s0 bevat, -dan wordt ook een \s-1BOM\s0 naar het uitvoerbestand geschreven. Dit is het -standaardgedrag bij conversie naar \s-1DOS. \s0 Zie ook optie \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c\fR, \fB\-\-convmode \s-1CONVERSIEMODUS\s0\fR" 4 -.IX Item "-c, --convmode CONVERSIEMODUS" -De te gebruiken conversiemodus. \s-1CONVERSIEMODUS\s0 kan zijn: \fIascii\fR, \fI7bit\fR, -\&\fIiso\fR, of \fImac\fR, waarbij ascii de standaardinstelling is. -.IP "\fB\-f\fR, \fB\-\-force\fR" 4 -.IX Item "-f, --force" -Conversie van binaire bestanden afdwingen. -.IP "\fB\-gb\fR, \fB\-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -Op Windows worden UTF\-16\-bestanden standaard naar \s-1UTF\-8\s0 geconverteerd, -ongeacht de ingestelde taalregio. Gebruik deze optie om UTF\-16\-bestanden -naar \s-1GB18030\s0 te converteren. Deze optie is alleen beschikbaar op Windows. -Zie ook de sectie \fB\s-1GB18030\s0\fR. -.IP "\fB\-h\fR, \fB\-\-help\fR" 4 -.IX Item "-h, --help" -Een hulptekst tonen. -.IP "\fB\-i\fR[\fB\s-1VLAGGEN\s0\fR], \fB\-\-info\fR[\fB=VLAGGEN\fR] \fB\s-1BESTAND\s0\fR..." 4 -.IX Item "-i[VLAGGEN], --info[=VLAGGEN] BESTAND..." -Bestandsinformatie tonen. Er wordt niets geconverteerd. -.Sp -De volgende informatie wordt weergegeven, in deze volgorde: het aantal -DOS-regeleindes, het aantal Unix-regeleindes, het aantal Mac-regeleindes, de -Byte-Order-Mark, of het een tekst\- of binair bestand is, en de bestandsnaam. -.Sp -Voorbeelduitvoer: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Bij de optie kunnen één of meer vlaggen meegegeven worden om de uitvoer te -beperken. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Het aantal DOS-regeleindes tonen. -.IP "\fBu\fR" 4 -.IX Item "u" -Het aantal Unix-regeleindes tonen. -.IP "\fBm\fR" 4 -.IX Item "m" -Het aantal Mac-regeleindes tonen. -.IP "\fBb\fR" 4 -.IX Item "b" -De Byte-Order-Mark tonen. -.IP "\fBt\fR" 4 -.IX Item "t" -Tonen of het bestand tekst is of binair. -.IP "\fBc\fR" 4 -.IX Item "c" -Alleen de namen tonen van de bestanden die geconverteerd zouden worden. -.Sp -Met de vlag \f(CW\*(C`c\*(C'\fR toont dos2unix alleen de bestanden die DOS-regeleindes -bevatten, en unix2dos alleen de bestanden die Unix-regeleindes bevatten. -.RE -.RS 4 -.Sp -Voorbeelden: -.Sp -Informatie weergeven voor alle bestanden met de extensie 'txt': -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Alleen de aantallen DOS-regeleindes en Unix-regeleindes tonen: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Alleen de Byte-Order-Mark tonen: -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -De bestanden opsommen die DOS-regeleindes bevatten: -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -De bestanden opsommen die Unix-regeleindes bevatten: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k\fR, \fB\-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -Het tijdsstempel van het invoerbestand behouden voor het uitvoerbestand. -.IP "\fB\-L\fR, \fB\-\-license\fR" 4 -.IX Item "-L, --license" -De softwarelicentie tonen. -.IP "\fB\-l\fR, \fB\-\-newline\fR" 4 -.IX Item "-l, --newline" -Een extra regeleinde toevoegen. -.Sp -\&\fBdos2unix\fR: Alleen DOS-regeleindes worden omgezet naar twee -Unix-regeleindes. In Mac-modus worden alleen Mac-regeleindes omgezet naar -twee Unix-regeleindes. -.Sp -\&\fBunix2dos\fR: Alleen Unix-regeleindes worden omgezet naar twee -DOS-regeleindes. In Mac-modus worden Unix-regeleindes omgezet naar twee -Mac-regeleindes. -.IP "\fB\-m\fR, \fB\-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -Een Byte-Order-Mark (\s-1BOM\s0) naar het uitvoerbestand schrijven. Standaard -wordt een \s-1UTF\-8\-BOM\s0 geschreven. -.Sp -Als het invoerbestand in \s-1UTF\-16\s0 is, en de optie \f(CW\*(C`\-u\*(C'\fR is gegeven, dan wordt -een \s-1UTF\-16\-BOM\s0 geschreven. -.Sp -Gebruik deze optie nooit als de codering van het uitvoerbestand niet \s-1UTF\-8\s0 -of \s-1UTF\-16\s0 is. Zie ook de sectie \s-1UNICODE.\s0 -.IP "\fB\-n\fR, \fB\-\-newfile \s-1INVOERBESTAND UITVOERBESTAND\s0\fR ..." 4 -.IX Item "-n, --newfile INVOERBESTAND UITVOERBESTAND ..." -Nieuw-bestand-modus. Het bestand \s-1INVOERBESTAND\s0 converteren en naar bestand -\&\s-1UITVOERBESTAND\s0 schrijven. Bestandsnamen moeten opgegeven worden in paren. -Jokertekens moeten \fIniet\fRgebruikt worden, anders \fIverlies\fR je de -bestanden. -.Sp -De gebruiker die de conversie start in nieuw-bestand (gepaarde) modus wordt -de eigenaar van het geconverteerde bestand. De lees/schrijf\-toegangsrechten -van het nieuwe bestand worden de toegangsrechten van het originele bestand -minus de \fIumask\fR\|(1) van de gebruiker die de conversie draait. -.IP "\fB\-o\fR, \fB\-\-oldfile \s-1BESTAND\s0\fR ..." 4 -.IX Item "-o, --oldfile BESTAND ..." -Oud-bestand-modus. Het bestand \s-1BESTAND\s0 converteren en overschrijven. Dit -is de standaard modus. Jokertekens kunnen gebruikt worden. -.Sp -In oud-bestand (vervangende) modus krijgt het geconverteerde bestand -dezelfde eigenaar, groep en lees/schrijf\-rechten als het originele bestand. -Ook wanneer het bestand wordt omgezet door een andere gebruiker die -schrijfrechten heeft op het bestand (b.v. gebruiker root). De omzetting -wordt afgebroken wanneer het niet mogelijk is de originele waardes te -behouden. Verandering van eigenaar kan betekenen dat de originele eigenaar -het bestand niet meer kan lezen. Verandering van groep zou een -veiligheidsrisico kunnen zijn, het bestand zou leesbaar kunnen worden voor -personen voor wie het niet bestemd is. Behoud van eigenaar, groep en -lees/schrijf\-rechten wordt alleen ondersteund op Unix. -.IP "\fB\-q\fR, \fB\-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Stille werking. Alle waarschuwingen onderdrukken. De aflsuitwaarde is nul, -behalve wanneer verkeerde opties worden gegeven. -.IP "\fB\-r\fR, \fB\-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -Een Byte-Order-Mark (\s-1BOM\s0) verwijderen. Er wordt geen \s-1BOM\s0 naar het -uitvoerbestand geschreven. Dit is het standaardgedrag bij conversie naar -Unix. Zie ook optie \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s\fR, \fB\-\-safe\fR" 4 -.IX Item "-s, --safe" -Binaire bestanden overslaan (standaard). -.IP "\fB\-u\fR, \fB\-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -De originele UTF\-16\-codering van het invoerbestand behouden. Het -uitvoerbestand wordt in dezelfde UTF\-16\-codering (little endian of big -endian) geschreven als het invoerbestand. Dit voorkomt conversie naar -\&\s-1UTF\-8. \s0 Er wordt ook een corresponderende \s-1UTF\-16\-BOM\s0 geschreven. Deze optie -kan uitgeschakeld worden met de optie \f(CW\*(C`\-ascii\*(C'\fR. -.IP "\fB\-ul\fR, \fB\-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -Veronderstellen dat de indeling van het invoerbestand \s-1UTF\-16LE\s0 is. -.Sp -Wanneer het invoerbestand een Byte-Order-Mark (\s-1BOM\s0) bevat, dan gaat deze \s-1BOM\s0 -vóór deze optie. -.Sp -Wanneer een verkeerde aanname is gemaakt (het invoerbestand was geen -\&\s-1UTF\-16LE\s0) en de conversie verliep met succes, dan krijgt u een UTF\-8\-bestand -met verkeerde tekst. De verkeerde conversie kan ongedaan worden gemaakt -door met \fIiconv\fR\|(1) het UTF\-8\-uitvoerbestand terug om te zetten naar -\&\s-1UTF\-16LE. \s0 Dit zal het originele bestand terug brengen. -.Sp -De aanname van \s-1UTF\-16LE\s0 werkt als een \fIconversiemodus\fR. Door de -standaardmodus \fIascii\fR in te schakelen wordt de UTF\-16LE\-veronderstelling -uitgeschakeld. -.IP "\fB\-ub\fR, \fB\-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -Veronderstellen dat de indeling van het invoerbestand \s-1UTF\-16BE\s0 is. -.Sp -Deze optie werkt hetzelfde als optie \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v\fR, \fB\-\-verbose\fR" 4 -.IX Item "-v, --verbose" -Extra meldingen weergeven. Er wordt extra informatie getoond over -Byte-Order-Marks en het aantal geconverteerde regeleindes. -.IP "\fB\-F\fR, \fB\-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -Symbolische koppelingen volgen en de doelen converteren. -.IP "\fB\-R\fR, \fB\-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Symbolische koppelingen vervangen door geconverteerde bestanden (de -originele doelbestanden blijven ongewijzigd). -.IP "\fB\-S\fR, \fB\-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -Symbolische koppelingen en doelen ongewijzigd laten (standaard). -.IP "\fB\-V\fR, \fB\-\-version\fR" 4 -.IX Item "-V, --version" -Versie-informatie tonen. -.SH "MAC-MODUS" -.IX Header "MAC-MODUS" -In normale modus worden DOS-regeleindes naar Unix omgezet en vice versa. -Mac-regeleindes worden niet omgezet. -.PP -In Mac-modus worden Mac-regeleindes naar Unix omgezet en vice versa. -DOS-regeleindes blijven ongewijzigd. -.PP -Om in Mac-modus te draaien kunt u de opdrachtregeloptie \f(CW\*(C`\-c mac\*(C'\fR gebruiken, -of de opdrachten \f(CW\*(C`mac2unix\*(C'\fR of \f(CW\*(C`unix2mac\*(C'\fR. -.SH "CONVERSIEMODI" -.IX Header "CONVERSIEMODI" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -In modus \f(CW\*(C`ascii\*(C'\fR worden alleen regeleindes omgezet. Dit is de -standaardmodus. -.Sp -Hoewel de naam van deze modus \s-1ASCII\s0 is, wat een 7\-bits standaard is, is de -werkelijke modus 8\-bits. Gebruik altijd deze modus wanneer u Unicode -UTF\-8\-bestanden omzet. -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -Alle 8\-bits niet-ASCII lettertekens (met waardes van 128 t/m 255) worden -omgezet naar een 7\-bits spatie. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Tekens worden omgezet tussen een DOS-tekenset (codetabel) en de ISO-tekenset -\&\s-1ISO\-8859\-1 \s0(Latin\-1) op Unix. DOS-tekens zonder een ISO\-8859\-1\-equivalent, -waarvoor dus geen omzetting mogelijk is, worden omgezet in een punt. -Hetzelfde geldt voor ISO\-8859\-1\-tekens zonder DOS-tegenhanger. -.Sp -Wanneer alleen optie \f(CW\*(C`\-iso\*(C'\fR gebruikt wordt, zal dos2unix proberen de -actieve codetabel te gebruiken. Als dat niet mogelijk is wordt codetabel -\&\s-1CP437\s0 gebruikt, die vooral in de \s-1VS\s0 gebruikt wordt. Om een bepaalde -codetabel te forceren, kunt u de opties \f(CW\*(C`\-850\*(C'\fR (West-Europees), \f(CW\*(C`\-860\*(C'\fR -(Portugees), \f(CW\*(C`\-863\*(C'\fR (Canadees Frans) of \f(CW\*(C`\-865\*(C'\fR (Scandinavisch) gebruiken. -Windows-codetabel \s-1CP1252 \s0(West-Europees) wordt ook ondersteund met optie -\&\f(CW\*(C`\-1252\*(C'\fR. Gebruik voor andere codetabellen dos2unix in combinatie met -\&\fIiconv\fR\|(1). Iconv kan omzetten tussen een lange lijst tekensetcoderingen. -.Sp -Gebruik ISO-conversie nooit op Unicode-tekstbestanden. Het zal -UTF\-8\-gecodeerde bestanden beschadigen. -.Sp -Enkele voorbeelden: -.Sp -Omzetten van de standaard DOS-codetabel naar Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-iso \-n in.txt uit.txt -.Ve -.Sp -Omzetten van \s-1DOS CP850\s0 naar Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-850 \-n in.txt uit.txt -.Ve -.Sp -Omzetten van Windows \s-1CP1252\s0 naar Unix Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n in.txt uit.txt -.Ve -.Sp -Omzetten van Windows \s-1CP1252\s0 naar Unix \s-1UTF\-8 \s0(Unicode): -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 in.txt | dos2unix > uit.txt -.Ve -.Sp -Omzetten van Unix Latin\-1 naar de standaard DOS-codetabel: -.Sp -.Vb 1 -\& unix2dos \-iso \-n in.txt uit.txt -.Ve -.Sp -Omzetten van Unix Latin\-1 naar \s-1DOS CP850:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n in.txt uit.txt -.Ve -.Sp -Omzetten van Unix Latin\-1 naar Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos \-1252 \-n in.txt uit.txt -.Ve -.Sp -Omzetten van Unix \s-1UTF\-8 \s0(Unicode) naar Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t CP1252 > uit.txt -.Ve -.Sp -Zie ook en -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Coderingen" -.IX Subsection "Coderingen" -Er bestaan verschillende Unicode-coderingen. Op Unix en Linux zijn -Unicode-bestanden typisch gecodeerd in \s-1UTF\-8. \s0 Op Windows kunnen -Unicode-tekstbestanden gecodeerd zijn in \s-1UTF\-8, UTF\-16\s0 of \s-1UTF\-16\s0 big endian, -maar ze zijn meestal gecodeerd in \s-1UTF\-16.\s0 -.SS "Conversie" -.IX Subsection "Conversie" -Unicode-tekstbestanden kunnen \s-1DOS\-,\s0 Unix\- of Mac-regeleindes hebben, net als -reguliere tekstbestanden. -.PP -Alle versies van dos2unix en unix2dos kunnen UTF\-8\-gecodeerde bestanden -omzetten, want \s-1UTF\-8\s0 is ontworpen op compatibiliteit met \s-1ASCII.\s0 -.PP -Dos2unix en unix2dos met Unicode UTF\-16\-ondersteuning kunnen little en big -endian UTF\-16\-gecodeerde tekstbestanden lezen. Om er achter te komen of -dos2unix gebouwd is met \s-1UTF\-16\-\s0 ondersteuning, typt u \f(CW\*(C`dos2unix \-V\*(C'\fR. -.PP -Op Unix/Linux worden UTF\-16\-bestanden geconverteerd naar de codering van de -ingestelde taalregio. Gebruik de opdracht \fBlocale\fR(1) om te zien wat de -ingestelde codering is. Wanneer conversie niet mogelijk is, treedt er een -fout op en wordt het bestand overgeslagen. -.PP -Op Windows worden UTF\-16\-bestanden standaard naar \s-1UTF\-8\s0 geconverteerd. -UTF\-8\-tekstbestanden worden alom goed ondersteund, zowel op Windows als -Unix/Linux. -.PP -De \s-1UTF\-16\-\s0 en UTF\-8\-coderingen zijn volledig compatibel, er gaat bij het -converteren niets verloren. Als er tijdens de conversie van \s-1UTF\-16\s0 naar -\&\s-1UTF\-8\s0 een fout optreedt, bijvoorbeeld omdat het UTF\-16\-invoerbestand een -fout bevat, dan wordt het bestand overgeslagen. -.PP -Wanneer \f(CW\*(C`\-u\*(C'\fR gebruikt wordt, wordt het uitvoerbestand in dezelfde -UTF\-16\-codering geschreven als het invoerbestand. Optie \f(CW\*(C`\-u\*(C'\fR voorkomt -conversie naar \s-1UTF\-8.\s0 -.PP -Dos2unix en unix2dos hebben geen optie om van \s-1UTF\-8\s0 naar \s-1UTF\-16\s0 te -converteren. -.PP -\&\s-1ISO\-\s0 en 7\-bits\-conversie werken niet op UTF\-16\-bestanden. -.SS "Byte-Order-Mark" -.IX Subsection "Byte-Order-Mark" -Op Windows bevatten Unicode-tekstbestanden gewoonlijk een Byte-Order-Mark -(\s-1BOM\s0), omdat veel Windows-programma's (inclusief Kladblok) standaard een \s-1BOM\s0 -toevoegen. Zie ook . -.PP -Op Unix hebben Unicode-tekstbestanden meestal geen \s-1BOM. \s0 Er wordt aangenomen -dat de codering van tekstbestanden gelijk is aan de tekencodering van de -ingestelde taalregio. -.PP -Dos2unix kan alleen detecteren of een bestand in UTF\-16\-codering is als het -bestand een \s-1BOM\s0 bevat. Wanneer een UTF\-16\-bestand geen \s-1BOM\s0 heeft, ziet -dos2unix het bestand als een binair bestand. -.PP -Gebruik optie \f(CW\*(C`\-ul\*(C'\fR of \f(CW\*(C`\-ub\*(C'\fR om een UTF\-16\-bestand zonder \s-1BOM\s0 om te -zetten. -.PP -Dos2unix schrijft standaard geen \s-1BOM\s0 in het uitvoerbestand. Met optie \f(CW\*(C`\-b\*(C'\fR -schrijft dos2unix een \s-1BOM\s0 wanneer het invoerbestand een \s-1BOM\s0 bevat. -.PP -Unix2dos schrijft standaard een \s-1BOM\s0 in het uitvoerbestand wanneer het -invoerbestand een \s-1BOM\s0 bevat. Gebruik optie \f(CW\*(C`\-r\*(C'\fR om de \s-1BOM\s0 te verwijderen. -.PP -Dos2unix en unix2dos schrijven altijd een \s-1BOM\s0 wanneer optie \f(CW\*(C`\-m\*(C'\fR gebruikt -wordt. -.SS "Unicode-voorbeelden" -.IX Subsection "Unicode-voorbeelden" -Omzetten van Windows \s-1UTF\-16 \s0(met \s-1BOM\s0) naar Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-n in.txt uit.txt -.Ve -.PP -Omzetten van Windows \s-1UTF\-16LE \s0(zonder \s-1BOM\s0) naar Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-ul \-n in.txt uit.txt -.Ve -.PP -Omzetten van Unix \s-1UTF\-8\s0 naar Windows \s-1UTF\-8\s0 met \s-1BOM:\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n in.txt uit.txt -.Ve -.PP -Omzetten van Unix \s-1UTF\-8\s0 naar Windows \s-1UTF\-16:\s0 -.PP -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t UTF\-16 > uit.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 is een standaard van de Chinese overheid. Een subset van de -GB18030\-standaard is officieel verplicht voor alle softwareproducten die in -China verkocht worden. Zie ook . -.PP -\&\s-1GB18030\s0 is volledig compatibel met Unicode, en kan als een -Unicodetransformatie beschouwd worden. Net als \s-1UTF\-8\s0 is \s-1GB18030\s0 compatibel -met \s-1ASCII. GB18030\s0 is ook compatibel met Windows-codetabel 936 (ook wel \s-1GBK\s0 -genoemd). -.PP -Op Unix/Linux worden UTF\-16\-bestanden alleen naar \s-1GB18030\s0 geconverteerd -wanneer de taalregio op China ingesteld is en de codering op \s-1GB18030.\s0 -Bijvoorbeeld, met de Britse taalregio-instelling \f(CW\*(C`en_GB.GB18030\*(C'\fR zal -conversie van \s-1UTF\-16\s0 naar \s-1GB18030\s0 niet werken, maar met de Chinese -instelling \f(CW\*(C`zh_CN.GB18030\*(C'\fR wel. -.PP -Op Windows dient u de optie \f(CW\*(C`\-gb\*(C'\fR te gebruiken om UTF\-16\-bestanden naar -\&\s-1GB18030\s0 te converteren. -.PP -GB18030\-bestanden kunnen een Byte-Order-Mark bevatten, net als -Unicode-bestanden. -.SH "VOORBEELDEN" -.IX Header "VOORBEELDEN" -Invoer lezen van standaardinvoer en uitvoer schrijven naar standaarduitvoer: -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Omzetten en vervangen van a.txt; omzetten en vervangen van b.txt: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Omzetten en vervangen van a.txt in ascii-conversiemodus: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Omzetten en vervangen van a.txt in ascii-conversiemodus; omzetten en -vervangen van b.txt in 7\-bits conversiemodus: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Omzetten van a.txt van Mac\- naar Unix-indeling: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Omzetten van a.txt van Unix\- naar Mac-indeling: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Omzetten en vervangen van a.txt met behoud van origineel tijdsstempel: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Omzetten van a.txt en resultaat naar e.txt schrijven: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Omzetten van a.txt en naar e.txt schrijven, met tijdsstempel van e.txt -gelijk aan die van a.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Omzetten en vervangen van a.txt; omzetten van b.txt en naar e.txt schrijven: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Omzetten van c.txt en naar e.txt schrijven; omzetten en vervangen van a.txt; -omzetten en vervangen van b.txt; omzetten van d.txt en naar f.txt schrijven. -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "RECURSIEVE CONVERSIE" -.IX Header "RECURSIEVE CONVERSIE" -Gebruik dos2unix in combinatie met de opdrachten \fBfind\fR(1) en \fBxargs\fR(1) -om tekstbestanden in een mappenboom recursief om te zetten. Bijvoorbeeld om -alle .txt\-bestanden in de mappenboom onder de huidige map te converteren, -typt u: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "LOKALISATIE" -.IX Header "LOKALISATIE" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -De primaire taal wordt geselecteerd via de omgevingsvariabele \s-1LANG. \s0 De -variabele \s-1LANG\s0 bestaat uit verschillende onderdelen. Het eerste deel is in -kleine letters de taalcode. Het tweede deel is optioneel en is de landcode -in hoofdletters, voorafgegaan door een liggend streepje. Er is ook een -optioneel derde deel: de tekencodering, voorafgegaan door een punt. Enkele -voorbeelden voor een POSIX-shell: -.Sp -.Vb 7 -\& export LANG=nl Nederlands -\& export LANG=nl_NL Nederlands, Nederland -\& export LANG=nl_BE Nederlands, België -\& export LANG=es_ES Spaans, Spanje -\& export LANG=es_MX Spaans, Mexico -\& export LANG=en_US.iso88591 Engels, VS, Latin\-1\-codering -\& export LANG=en_GB.UTF\-8 Engels, GB, UTF\-8\-codering -.Ve -.Sp -Voor een complete lijst van taal\- en landcodes zie de gettext-handleiding: - -.Sp -Op Unix-systemen kunt u de opdracht \fBlocale\fR(1) gebruiken om specifieke -taalregio-informatie te verkrijgen. -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -Met de omgevingsvariabele \s-1LANGUAGE\s0 kunt u een prioriteitenlijst specificeren -van talen, gescheiden door dubbele punten. Dos2unix geeft voorrang aan -\&\s-1LANGUAGE\s0 boven \s-1LANG. \s0 Bijvoorbeeld, eerst Nederlands en dan Duits: -\&\f(CW\*(C`LANGUAGE=nl:de\*(C'\fR. U moet eerst lokalisatie in werking stellen, door het -instellen van \s-1LANG \s0(of \s-1LC_ALL\s0) op een waarde ongelijk aan \*(L"C\*(R", voordat u een -talen-prioriteitenlijst kunt gebruiken via de variabele \s-1LANGUAGE. \s0 Zie ook -de gettext-handleiding: - -.Sp -Als u een taal kiest die niet beschikbaar is, worden de standaard Engelse -berichten gebruikt. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Met de omgevingsvariabele \s-1DOS2UNIX_LOCALEDIR\s0 kan de \s-1LOCALEDIR\s0 die ingesteld -werd tijdens compilatie worden overstemd. \s-1LOCALEDIR\s0 wordt gebruikt om de -taalbestanden te vinden. De \s-1GNU\s0 standaardwaarde is -\&\f(CW\*(C`/usr/local/share/locale\*(C'\fR. De optie \fB\-\-version\fR laat de gebruikte -\&\s-1LOCALEDIR\s0 zien. -.Sp -Voorbeeld (POSIX-shell): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "AFSLUITWAARDE" -.IX Header "AFSLUITWAARDE" -Bij succes wordt nul teruggegeven. Wanneer een systeemfout optreedt wordt -het laatste systeemfoutnummer teruggegeven. Bij andere fouten wordt 1 -teruggegeven. -.PP -De afsluitwaarde is altijd nul in de stillewerkingsmodus, behalve wanneer -verkeerde opties worden gegeven. -.SH "STANDAARDEN" -.IX Header "STANDAARDEN" - -.PP - -.PP - -.PP - -.SH "AUTEURS" -.IX Header "AUTEURS" -Benjamin Lin \- , Bernd Johannes Wuebben -(mac2unix\-modus) \- , Christian Wurll (toevoegen van extra -regeleindes) \- , Erwin Waterlander \- -(beheerder) -.PP -Projectpagina: -.PP -SourceForge-pagina: -.SH "ZIE OOK" -.IX Header "ZIE OOK" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/pl/man1/dos2unix.1 b/Tools/dos2unix/share/man/pl/man1/dos2unix.1 deleted file mode 100644 index 1062354..0000000 --- a/Tools/dos2unix/share/man/pl/man1/dos2unix.1 +++ /dev/null @@ -1,756 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NAZWA" -.IX Header "NAZWA" -dos2unix \- konwerter formatu plików tekstowych między systemami DOS/Mac a -Uniksem -.SH "SKŁADNIA" -.IX Header "SKŁADNIA" -.Vb 2 -\& dos2unix [opcje] [PLIK ...] [\-n PLIK_WEJ PLIK_WYJ ...] -\& unix2dos [opcje] [PLIK ...] [\-n PLIK_WEJ PLIK_WYJ ...] -.Ve -.SH "OPIS" -.IX Header "OPIS" -Pakiet Dos2unix zawiera narzędzia \f(CW\*(C`dos2unix\*(C'\fR oraz \f(CW\*(C`unix2dos\*(C'\fR do konwersji -zwykłych plików tekstowych między formatami używanymi w systemach \s-1DOS\s0 lub -Mac a formatem uniksowym. -.PP -W plikach tekstowych systemu DOS/Windows oznaczenie końca linii to -połączenie dwóch znaków: powrotu karetki (\s-1CR\s0) i przesunięcia linii (\s-1LF\s0). W -uniksowych plikach tekstowych koniec linii to pojedynczy znak \s-1LF. W\s0 plikach -tekstowych systemu Mac sprzed Mac \s-1OS X\s0 koniec linii był pojedynczym znakiem -\&\s-1CR.\s0 Obecnie Mac \s-1OS\s0 wykorzystuje uniksowe końce linii (\s-1LF\s0). -.PP -Oprócz oznaczeń końców linii Dos2unix potrafi konwertować także kodowanie -plików. Kilko stron kodowych DOS-a może być przekonwertowanych do uniksowego -Latin\-1, a windowsowy Unicode (\s-1UTF\-16\s0) do powszechniejszego pod Uniksem -kodowania Unicode \s-1UTF\-8.\s0 -.PP -Pliki binarne są pomijane automatycznie, chyba że konwersja zostanie -wymuszona. -.PP -Pliki inne niż zwykłe, np. katalogi lub \s-1FIFO,\s0 są pomijane automatycznie. -.PP -Dowiązania symboliczne i ich cele są domyślnie pozostawiane bez -zmian. Dowiązania symboliczne mogą być opcjonalnie zastępowane, albo wyjście -może być zapisywane do celu dowiązania. Zapis do celu dowiązania -symbolicznego nie jest obsługiwane pod Windows. -.PP -Dos2unix powstał na podstawie narzędzia dos2unix z systemu -SunOS/Solaris. Jest jedna istotna różnica w stosunku do oryginalnej wersji z -SunOS\-a/Solarisa: ta wersja domyślnie wykonuje konwersję w miejscu (tryb -starego pliku), podczas gdy oryginalna obsługiwała tylko konwersję parami -(tryb nowego pliku) \- p. także opcje \f(CW\*(C`\-o\*(C'\fR i \f(CW\*(C`\-n\*(C'\fR. -.SH "OPCJE" -.IX Header "OPCJE" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Potraktowanie wszystkich kolejnych opcji jako nazw plików. Tej opcji należy -użyć, aby przekonwertować pliki, których nazwy zaczynają się od -minusa. Przykładowo, aby przekonwertować plik o nazwie \*(L"\-foo\*(R", można użyć -polecenia: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -Lub w trybie nowego pliku: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo out.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Konwersja tylko znaków końca linii. Jest to domyślny tryb konwersji. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Konwersja między zestawami znaków \s-1DOS\s0 i \s-1ISO\-8859\-1.\s0 Więcej w sekcji \s-1TRYBY -KONWERSJI.\s0 -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Użycie strony kodowej Windows 1252 (zachodnioeuropejskiej). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -Użycie strony kodowej \s-1DOS 437 \s0(\s-1US\s0). Jest to domyślna strona kodowa używana -przy konwersji \s-1ISO.\s0 -.IP "\fB\-850\fR" 4 -.IX Item "-850" -Użycie strony kodowej \s-1DOS 850 \s0(zachodnioeuropejskiej). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -Użycie strony kodowej \s-1DOS 860 \s0(portugalskiej). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -Użycie strony kodowej \s-1DOS 863 \s0(kanadyjskiej francuskiej). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -Użycie strony kodowej \s-1DOS 865 \s0(nordyckiej). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Konwersja znaków 8\-bitowych do przestrzeni 7\-bitowej. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Zachowanie znaku \s-1BOM \s0(Byte Order Makr). Jeżeli plik wejściowy zawiera \s-1BOM,\s0 -powoduje zapisanie go w pliku wyjściowym. Jest to domyślne zachowanie przy -konwersji na DOS-owe końce linii. P. także opcja \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode \s-1TRYB_KONW\s0\fR" 4 -.IX Item "-c, --convmode TRYB_KONW" -Ustawienie trybu konwersji. \s-1TRYB_KONW\s0 to jeden z: \fIascii\fR, \fI7bit\fR, \fIiso\fR, -\&\fImac\fR, przy czym domyślny jest ascii. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -Wymuszenie konwersji plików binarnych. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -Pod Windows pliki w \s-1UTF\-16\s0 są domyślnie konwertowane do \s-1UTF\-8,\s0 niezależnie -od ustawienia lokalizacji. Ta opcja pozwala przekonwertować pliki w \s-1UTF\-16\s0 -do \s-1GB18030.\s0 Opcja jest dostępna tylko pod Windows, więcej w sekcji -dotyczącej \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -Wyświetlenie opisu i zakończenie. -.IP "\fB\-i[\s-1FLAGI\s0], \-\-info[=FLAGI] \s-1PLIK ...\s0\fR" 4 -.IX Item "-i[FLAGI], --info[=FLAGI] PLIK ..." -Wyświetlenie informacji o pliku. Konwersja nie jest wykonywana. -.Sp -Wypisywane są następujące informacje, w tej kolejności: liczba DOS-owych -końców linii, liczba uniksowych końców linii, liczba macowych końców linii, -znacznik \s-1BOM,\s0 tekstowy lub binarny, nazwa pliku. -.Sp -Przykładowe wyjście: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Opcjonalnie można ustawić dodatkowe flagi, aby zmienić wyjście. Można dodać -jedną lub więcej flag. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Wypisanie liczby DOS-owych końców linii. -.IP "\fBu\fR" 4 -.IX Item "u" -Wypisanie liczby uniksowych końców linii. -.IP "\fBm\fR" 4 -.IX Item "m" -Wypisanie liczby macowych końców linii. -.IP "\fBb\fR" 4 -.IX Item "b" -Wypisanie znacznika \s-1BOM.\s0 -.IP "\fBt\fR" 4 -.IX Item "t" -Wypisanie, czy plik jest tekstowy, czy binarny. -.IP "\fBc\fR" 4 -.IX Item "c" -Wypisanie tylko plików, które zostałyby przekonwertowane. -.Sp -Z flagą \f(CW\*(C`c\*(C'\fR dos2unix wypisze tylko pliki zawierające DOS-owe końce linii, a -unix2dos wypisze tylko nazwy plików zawierających uniksowe końce linii. -.RE -.RS 4 -.Sp -Przykłady: -.Sp -Pokazanie informacji o wszystkich plikach *.txt: -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Pokazanie tylko liczby DOS-owych i uniksowych końców linii: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Pokazanie tylko znacznika \s-1BOM:\s0 -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -Wypisanie listy plików zawierających DOS-owe końce linii: -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -Wypisanie listy plików zawierających uniksowe końce linii: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -Zachowanie znacznika czasu pliku wyjściowego takiego samego, jak pliku -wejściowego. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -Wyświetlenie licencji programu. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -Dodanie dodatkowego znaku końca linii. -.Sp -\&\fBdos2unix\fR: tylko DOS-owe znaki końca linii są zamieniane na dwa -uniksowe. W trybie Mac tylko macowe znaki końca linii są zamieniane na dwa -uniksowe. -.Sp -\&\fBunix2dos\fR: tylko uniksowe znaki końca linii są zamieniane na dwa -DOS-owe. W trybie Mac uniksowe znaki końca linii są zamieniane na dwa -macowe. -.IP "\fB\-m, \-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -Zapisanie znacznika \s-1BOM \s0(Byte Order Mark) w pliku wyjściowym. Domyślnie -zapisywany jest \s-1BOM UTF\-8.\s0 -.Sp -Jeśli plik wejściowy jest w kodowaniu \s-1UTF\-16\s0 i użyto opcji \f(CW\*(C`\-u\*(C'\fR, zostanie -zapisany \s-1BOM UTF\-16.\s0 -.Sp -Nigdy nie należy używać tej opcji, jeśli kodowanie wyjściowe jest inne niż -\&\s-1UTF\-8\s0 lub \s-1UTF\-16.\s0 Więcej w sekcji \s-1UNICODE.\s0 -.IP "\fB\-n, \-\-newfile \s-1PLIK_WEJ PLIK_WYJ ...\s0\fR" 4 -.IX Item "-n, --newfile PLIK_WEJ PLIK_WYJ ..." -Tryb nowego pliku. Konwersja \s-1PLIKU_WEJ\s0 z zapisem wyjścia do \s-1PLIKU_WYJ.\s0 Nazwy -plików muszą być podane parami, a masek \fInie\fR należy używać, gdyż -\&\fIspowoduje\fR to utratę plików. -.Sp -Osoba uruchamiająca konwersję w trybie nowego pliku (par) będzie -właścicielem przekonwertowanego pliku. Prawa odczytu/zapisu nowego pliku -będą pochodziły z praw pliku oryginalnego po odjęciu \fIumask\fR\|(1) osoby -uruchamiającej konwersję. -.IP "\fB\-o, \-\-oldfile \s-1PLIK ...\s0\fR" 4 -.IX Item "-o, --oldfile PLIK ..." -Tryb starego pliku. Konwersja \s-1PLIKU\s0 i nadpisanie go wyjściem. Program działa -domyślnie w tym trybie. Można używać masek. -.Sp -W trybie starego pliku (w miejscu) przekonwertowany plik otrzymuje tego -samego właściciela, grupę oraz prawa odczytu/zapisu, jak plik oryginalny \- -także wtedy, gdy plik jest konwertowany przez innego użytkownika, mającego -prawo zapisu do pliku (np. przez użytkownika root). Konwersja zostanie -przerwana, jeśli nie będzie możliwe zachowanie oryginalnych wartości. Zmiana -właściciela mogłaby oznaczać, że pierwotny właściciel nie może już odczytać -pliku. Zmiana grupy mogłaby być zagrożeniem bezpieczeństwa, plik mógłby być -czytelny dla nie zamierzonych osób. Zachowanie właściciela, grupy i praw -odczytu/zapisu jest obsługiwane tylko na Uniksie. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Tryb cichy. Pominięcie wszystkich ostrzeżeń i komunikatów. Zwracanym kodem -jest zero, chyba że podano błędne opcje linii poleceń. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -Usunięcie znaków \s-1BOM \s0(Byte Order Mark). Bez zapisywania \s-1BOM\s0 do pliku -wyjściowego. Jest to domyślne zachowanie przy konwersji na uniksowe końce -linii. P. także opcja \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s, \-\-safe\fR" 4 -.IX Item "-s, --safe" -Pominięcie plików binarnych (domyślne). -.IP "\fB\-u, \-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -Zachowanie oryginalnego kodowania pliku wejściowego \s-1UTF\-16.\s0 Plik wyjściowy -zostanie zapisany w tym samym kodowaniu \s-1UTF\-16 \s0(little lub big endian), co -plik wejściowy. Zapobiega to przekształceniu do \s-1UTF\-8.\s0 Do pliku zostanie -zapisany odpowiedni znacznik \s-1BOM UTF\-16.\s0 Tę opcję można wyłączyć opcją -\&\f(CW\*(C`\-ascii\*(C'\fR. -.IP "\fB\-ul, \-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -Przyjęcie, że format pliku wejściowego to \s-1UTF\-16LE.\s0 -.Sp -Jeśli w pliku wejściowym jest znacznik \s-1BOM \s0(Byte Order Mark), ma on -priorytet nad tą opcją. -.Sp -Jeśli przyjęto błędne założenie (plik wejściowy nie jest w formacie -\&\s-1UTF\-16LE\s0), a konwersja się uda, wynikiem będzie plik wyjściowy \s-1UTF\-8\s0 ze złym -tekstem. Konwersję tę można odwrócić przy użyciu polecenia \fIiconv\fR\|(1) do -konwersji wyjścia \s-1UTF\-8\s0 z powrotem do \s-1UTF\-16LE.\s0 Przywróci to plik -oryginalny. -.Sp -Przyjęcie \s-1UTF\-16LE\s0 działa jako \fItryb konwersji\fR. Przy przełączeniu na -domyślny tryb \fIascii\fR przyjęcie \s-1UTF\-16LE\s0 jest wyłączane. -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -Przyjęcie, że format pliku wejściowego to \s-1UTF\-16BE.\s0 -.Sp -Ta opcja działa analogicznie do \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v, \-\-verbose\fR" 4 -.IX Item "-v, --verbose" -Wyświetlanie szczegółowych komunikatów. Wyświetlane śa dodatkowe informacje -o znacznikach \s-1BOM \s0(Byte Order Mark) oraz liczbie przekonwertowanych końców -linii. -.IP "\fB\-F, \-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -Podążanie za dowiązaniami symbolicznymi i konwertowanie ich celów -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Zastępowanie dowiązań symbolicznych przekonwertowanymi plikami (oryginalne -pliki docelowe pozostają bez zmian). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -Pozostawienie dowiązań symbolicznych i celów bez zmian (domyślne). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -Wyświetlenie informacji o wersji i zakończenie. -.SH "TRYB MAC" -.IX Header "TRYB MAC" -W zwykłym trybie znaki końca linii są konwertowane z DOS-a do Uniksa i -odwrotnie. Znaki końca linii systemu Mac nie są konwertowane. -.PP -W trybie Mac znaki końca linii są konwertowane z formatu Maca do Uniksa i -odwrotnie. Znaki końca linii systemu \s-1DOS\s0 nie są zmieniane. -.PP -Aby uruchomić program w trybie Mac, należy użyć opcji linii poleceń \f(CW\*(C`\-c -mac\*(C'\fR albo użyć poleceń \f(CW\*(C`mac2unix\*(C'\fR lub \f(CW\*(C`unix2mac\*(C'\fR. -.SH "TRYBY KONWERSJI" -.IX Header "TRYBY KONWERSJI" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -W trybie \f(CW\*(C`ascii\*(C'\fR konwertowane są tylko końce linii. Jest to domyślny tryb -konwersji. -.Sp -Mimo że nazwa tego trybu to \s-1ASCII,\s0 które jest standardem 7\-bitowym, jest to -tryb 8\-bitowy. Należy zawsze używać tego trybu przy konwersji plików Unicode -\&\s-1UTF\-8.\s0 -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -W tym trybie wszystkie znaki 8\-bitowe spoza \s-1ASCII \s0(o wartościach od 128 do -255) są konwertowane do przestrzeni 7\-bitowej. -.IP "\fBiso\fR" 4 -.IX Item "iso" -W tym trybie znaki są konwertowane między zestawem znaków \s-1DOS \s0(stroną -kodową) a zestawem znaków \s-1ISO\-8859\-1 \s0(Latin\-1) używanym na Uniksie. Znaki -DOS-owe nie mające odpowiednika w \s-1ISO\-8859\-1,\s0 których nie da się -przekonwertować, są zamieniane na kropkę. To samo dotyczy znaków \s-1ISO\-8859\-1\s0 -bez odpowiednika w DOS-ie. -.Sp -Jeśli używana jest tylko opcja \f(CW\*(C`\-iso\*(C'\fR, dos2unix próbuje wykryć aktywną -stronę kodową. Jeśli nie jest to możliwe, dos2unix używa domyślnej strony -kodowej \s-1CP437,\s0 stosowanej głównie w \s-1USA.\s0 Aby wymusić określoną stronę -kodową, należy użyć opcji \f(CW\*(C`\-437\*(C'\fR (\s-1US\s0), \f(CW\*(C`\-850\*(C'\fR (zachodnioeuropejska), -\&\f(CW\*(C`\-860\*(C'\fR (portugalska), \f(CW\*(C`\-863\*(C'\fR (kanadyjska francuska) lub \f(CW\*(C`\-865\*(C'\fR -(nordycka). Ponadto obsługiwana jest strona kodowa Windows \s-1CP1252 -\&\s0(zachodnioeuropejska) przy użyciu opcji \f(CW\*(C`\-1252\*(C'\fR. W przypadku innych stron -kodowych można użyć narzędzia dos2unix wraz z \fIiconv\fR\|(1). Iconv potrafi -konwertować między wieloma kodowaniami znaków. -.Sp -Nigdy nie należy używać konwersji \s-1ISO\s0 na plikach tekstowych w -Unicode. Uszkodziłaby pliki kodowane \s-1UTF\-8.\s0 -.Sp -Kilka przykładów: -.Sp -Konwersja z domyślnej strony kodowej \s-1DOS\s0 do uniksowego Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-iso \-n in.txt out.txt -.Ve -.Sp -Konwersja ze strony kodowej \s-1DOS CP850\s0 do uniksowego Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-850 \-n in.txt out.txt -.Ve -.Sp -Konwersja ze strony kodowej Windows \s-1CP1252\s0 do uniksowego Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n in.txt out.txt -.Ve -.Sp -Konwersja ze strony kodowej Windows \s-1CP1252\s0 do uniksowego \s-1UTF\-8 \s0(Unicode): -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 in.txt | dos2unix > out.txt -.Ve -.Sp -Konwersa z uniksowego Latin\-1 do domyślnej strony kodowej \s-1DOS:\s0 -.Sp -.Vb 1 -\& unix2dos \-iso \-n in.txt out.txt -.Ve -.Sp -Konwersja z uniksowego Latin\-1 do strony kodowej \s-1DOS CP850:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n in.txt out.txt -.Ve -.Sp -Konwersja z uniksowego Latin\-1 do strony kodowej Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos \-1252 \-n in.txt out.txt -.Ve -.Sp -Konwersja z uniksowego \s-1UTF\-8 \s0(Unicode) do strony kodowej Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t CP1252 > out.txt -.Ve -.Sp -Więcej pod adresem oraz -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Kodowania" -.IX Subsection "Kodowania" -Istnieją różne kodowania Unicode. Pod Uniksem i Linuksem pliki Unicode są -zwykle kodowane z użyciem \s-1UTF\-8.\s0 Pod Windows pliki tekstowe Unicode mogą być -kodowane w \s-1UTF\-8, UTF\-16, UTF\-16\s0 big-endian, ale przeważnie są kodowane w -\&\s-1UTF\-16.\s0 -.SS "Konwersje" -.IX Subsection "Konwersje" -Pliki tekstowe Unicode mogą mieć znaki końca linii systemu \s-1DOS,\s0 Unix lub -Mac, podobnie jak zwykłe pliki tekstowe. -.PP -Wszystkie wersje dos2unix i unix2dos potrafią konwertować pliki kodowane -\&\s-1UTF\-8,\s0 ponieważ \s-1UTF\-8\s0 jest wstecznie zgodne z \s-1ASCII.\s0 -.PP -Dos2unix i unix2dos z obsługą Unicode \s-1UTF\-16\s0 potrafią odczytywać pliki -tekstowe kodowane \s-1UTF\-16\s0 little\- oraz big-endian. Aby sprawdzić, czy -dos2unix został zbudowany z obsługą \s-1UTF\-16,\s0 należy napisać \f(CW\*(C`dos2unix \-V\*(C'\fR. -.PP -Pod Uniksem/Linuksem pliki w kodowaniu \s-1UTF\-16\s0 są konwertowane do kodowania -znaków ustawionej lokalizacji. Kodowanie znaków dla lokalizacji można -sprawdzić poleceniem \fIlocale\fR\|(1). Jeśli konwersja nie jest możliwa, wystąpi -błąd, a plik zostanie pominięty. -.PP -Pod Windows pliki \s-1UTF\-16\s0 są domyślnie konwertowane do \s-1UTF\-8.\s0 Pliki tekstkowe -w kodowaniu \s-1UTF\-8\s0 są dobrze obsługiwane zarówno pod Windows, jak i -Uniksem/Linuksem. -.PP -Kodowania \s-1UTF\-16\s0 i \s-1UTF\-8\s0 są w pełni zgodne, konwersja nie spowoduje utraty -żadnej części tekstu. W przypadku wystąpienia błędu konwersji, na przykład w -przypadku błędu w pliku wejściowym \s-1UTF\-16,\s0 plik zostanie pominięty. -.PP -W przypadku użycia opcji \f(CW\*(C`\-u\*(C'\fR, plik wejściowy zostanie zapisany w tym samym -kodowaniu \s-1UTF\-16,\s0 co plik wejściowy. Opcja \f(CW\*(C`\-u\*(C'\fR zapobiega konwersji do -\&\s-1UTF\-8.\s0 -.PP -Dos2unix oraz unix2dos nie mają opcji pozwalającej na konwersję plików \s-1UTF\-8\s0 -do \s-1UTF\-16.\s0 -.PP -Tryby konwersji \s-1ISO\s0 i 7\-bit nie działają na plikach \s-1UTF\-16.\s0 -.SS "Znacznik \s-1BOM\s0" -.IX Subsection "Znacznik BOM" -W systemie Windows pliki tekstowe zwykle zawierają znacznik \s-1BOM \s0(Byte Order -Mark), ponieważ wiele programów dla Windows (w tym Notepad) dodaje domyślnie -znaczniki \s-1BOM.\s0 Więcej informacji można znaleźć pod adresem -. -.PP -Pod Uniksem pliki Unicode zwykle nie mają znacznika \s-1BOM.\s0 Pliki tekstowe są -traktowane jako kodowane zgodnie z kodowaniem znaków ustawionej lokalizacji. -.PP -Dos2unix potrafi wykryć tylko, czy plik jest w formacie \s-1UTF\-16,\s0 jeśli -zawiera znacznik \s-1BOM.\s0 Jeśli plik \s-1UTF\-16\s0 nie ma tego znacznika, dos2unix -potraktuje plik jako binarny. -.PP -Do konwersji pliku \s-1UTF\-16\s0 bez znacznika \s-1BOM\s0 można użyć opcji \f(CW\*(C`\-ul\*(C'\fR lub -\&\f(CW\*(C`\-ub\*(C'\fR. -.PP -Dos2unix nie zapisuje domyślnie znaku \s-1BOM\s0 w pliku wyjściowym. Z opcją \f(CW\*(C`\-b\*(C'\fR -Dos2unix zapisuje \s-1BOM,\s0 jeśli plik wejściowy zawiera \s-1BOM.\s0 -.PP -Unix2dos domyślnie zapisuje znaczniki \s-1BOM\s0 w pliku wyjściowym, jeśli plik -wejściowy ma \s-1BOM.\s0 Aby usunąć \s-1BOM,\s0 można użyć opcji \f(CW\*(C`\-r\*(C'\fR. -.PP -Dos2unix oraz unix2dos zawsze zapisują znaczniki \s-1BOM,\s0 jeśli użyta zostanie -opcja \f(CW\*(C`\-m\*(C'\fR. -.SS "Przykłady Unicode" -.IX Subsection "Przykłady Unicode" -Konwersja pliku \s-1UTF\-16 \s0(z \s-1BOM\s0) z formatu Windows do uniksowego \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-n in.txt out.txt -.Ve -.PP -Konwersja pliku \s-1UTF\-16LE \s0(bez \s-1BOM\s0) z formatu Windows do uniksowego \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-ul \-n in.txt out.txt -.Ve -.PP -Konwersja z uniksowego \s-1UTF\-8\s0 do \s-1UTF\-8\s0 z \s-1BOM\s0 dla Windows: -.PP -.Vb 1 -\& unix2dos \-m \-n in.txt out.txt -.Ve -.PP -Konwersja z uniksowego \s-1UTF\-8\s0 do \s-1UTF\-16\s0 dla Windows: -.PP -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t UTF\-16 > out.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 to standard urzędowy w Chinach. Obowiązkowy podzbiór standardu -\&\s-1GB18030\s0 jest oficjalnym wymaganiem każdego oprogramowania sprzedawanego w -Chinach. Więcej pod adresem . -.PP -\&\s-1GB18030\s0 jest w pełni zgodny z Unicode i może być uważany za format -transformacji unikodu. Podobnie jak \s-1UTF\-8, GB18030\s0 jest zgodny z \s-1ASCII.\s0 Jest -także zgodny ze stroną kodową Windows 936, znaną też jako \s-1GBK.\s0 -.PP -Pod Uniksem/Linuksem pliki \s-1UTF\-16\s0 są konwertowane do \s-1GB18030,\s0 jeśli -kodowanie dla lokalizacji jest ustawione na \s-1GB18030.\s0 Uwaga: będzie to -działać tylko dla lokalizacji chińskiej. W przypadku np. ustawienia -lokalizacji angielskiej/brytyjskiej \f(CW\*(C`en_GB.GB18030\*(C'\fR konwersja \s-1UTF\-16\s0 do -\&\s-1GB18030\s0 nie będzie działać, a dla lokalizacji chińskiej \f(CW\*(C`zh_CN.GB18030\*(C'\fR -będzie. -.PP -Pod Windows w celu konwersji plików \s-1UTF\-16\s0 do \s-1GB18030\s0 należy użyć opcji -\&\f(CW\*(C`\-gb\*(C'\fR. -.PP -Pliki w kodowaniu \s-1GB18030\s0 mogą mieć znacznik \s-1BOM,\s0 podobnie jak pliki w -Unicode. -.SH "PRZYKŁADY" -.IX Header "PRZYKŁADY" -Odczyt ze standardowego wejścia i zapis na standardowe wyjście: -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Konwersja i zastąpienie a.txt; konwersja i zastąpienie b.txt: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Konwersja i zastąpienie a.txt w trybie ascii: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Konwersja i zastąpienie a.txt w trybie ascii; konwersja i zastąpienie b.txt -w trybie 7\-bitowym: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Konwersja a.txt z formatu Mac do formatu uniksowego: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Konwersja a.txt z formatu uniksowego do formatu Mac: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Konwersja i zastąpienie a.txt z zachowaniem oryginalnego znacznika czasu: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Konwersja a.txt i zapis do e.txt: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Konwersja a.txt i zapis do e.txt z zachowaniem znacznika czasu e.txt -takiego, jak a.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Konwersja i zastąpienie a.txt; konwersja b.txt i zapis do e.txt: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Konwersja c.txt i zapis do e.txt; konwersja i zastąpienie a.txt; konwersja i -zastąpienie b.txt; konwersja d.txt i zapis do f.txt: -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "KONWERSJA REKURENCYJNA" -.IX Header "KONWERSJA REKURENCYJNA" -Można użyć dos2unix w połączeniu z poleceniami \fIfind\fR\|(1) i \fIxargs\fR\|(1) do -rekurencyjnej konwersji plików tekstowych w strukturze drzewa katalogów. Na -przykład, aby przekonwertować wszystkie pliki .txt w drzewie katalogów -poniżej katalogu bieżącego, należy napisać: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "LOKALIZACJA" -.IX Header "LOKALIZACJA" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -Główny język wybiera się zmienną środowiskową \s-1LANG.\s0 Zmienna \s-1LANG\s0 składa się -z kilku części. Pierwsza część to małe litery oznaczające kod języka. Druga -część jest opcjonalna i zawiera kod kraju pisany wielkimi literami, -poprzedzony podkreśleniem. Jest także opcjonalna trzecia część: kodowanie -znaków, poprzedzone kropką. Kilka przykładów dla powłok zgodnych ze -standardem \s-1POSIX:\s0 -.Sp -.Vb 7 -\& export LANG=nl holenderski -\& export LANG=nl_NL holenderski, Holandia -\& export LANG=nl_BE holenderski, Belgia -\& export LANG=es_ES hiszpański, Hiszpania -\& export LANG=es_MX hiszpański, Meksyk -\& export LANG=en_US.iso88591 angielski, USA, kodowanie Latin\-1 -\& export LANG=en_GB.UTF\-8 angielski, Wlk. Brytania, kodowanie UTF\-8 -.Ve -.Sp -Pełną listę kodów języków i krajów można znaleźć w podręczniku do gettexta: - -.Sp -W systemach uniksowych do uzyskania informacji dotyczących lokalizacji można -użyć polecenia \fIlocale\fR\|(1). -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -Przy użyciu zmiennej środowiskowej \s-1LANGUAGE\s0 można określić listę języków wg -priorytetu, oddzielonych dwukropkami. Dos2unix przyjmuje pierwszeństwo -zmiennej \s-1LANGUAGE\s0 nad \s-1LANG.\s0 Na przykład, najpierw holenderski, następnie -niemiecki: \f(CW\*(C`LANGUAGE=nl:de\*(C'\fR. Aby skorzystać z listy wg priorytetów ze -zmiennej \s-1LANGUAGE,\s0 trzeba najpierw włączyć lokalizację przez ustawienie -zmiennej \s-1LANG \s0(lub \s-1LC_ALL\s0) na wartość inną niż \*(L"C\*(R". Więcej informacji -znajduje się w podręczniku do gettexta: - -.Sp -W przypadku wybrania niedostępnego języka, otrzymamy standardowe, angielskie -komunikaty. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Przy użyciu zmiennej środowiskowej \s-1DOS2UNIX_LOCALEDIR,\s0 można nadpisać -ustawienie \s-1LOCALEDIR\s0 z czasu kompilacji. \s-1LOCALEDIR\s0 to katalog używany do -znalezienia plików lokalizacji. Domyślną wartością dla \s-1GNU\s0 jest -\&\f(CW\*(C`/usr/local/share/locale\*(C'\fR. Opcja \fB\-\-version\fR wyświetla używaną wartość -\&\s-1LOCALEDIR.\s0 -.Sp -Przykład (dla powłoki \s-1POSIX\s0): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "WARTOŚĆ ZWRACANA" -.IX Header "WARTOŚĆ ZWRACANA" -W przypadku powodzenia zwracane jest zero. Jeśli wystąpi błąd systemowy, -zwracany jest ostatni błąd systemowy. W przypadku innych błędów zwracane -jest 1. -.PP -Wartość zwracana w trybie cichym to zawsze zero, z wyjątkiem sytuacji -podania błędnych opcji linii poleceń. -.SH "STANDARDY" -.IX Header "STANDARDY" - -.PP - -.PP - -.PP - -.SH "AUTORZY" -.IX Header "AUTORZY" -Benjamin Lin ; Bernd Johannes Wuebben (tryb mac2unix) -; Christian Wurll (dodawanie dodatkowej nowej linii) -; Erwin Waterlander (prowadzący) -.PP -Strona projektu: -.PP -Strona SourceForge: -.SH "ZOBACZ TAKŻE" -.IX Header "ZOBACZ TAKŻE" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/pl/man1/mac2unix.1 b/Tools/dos2unix/share/man/pl/man1/mac2unix.1 deleted file mode 100644 index 1062354..0000000 --- a/Tools/dos2unix/share/man/pl/man1/mac2unix.1 +++ /dev/null @@ -1,756 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NAZWA" -.IX Header "NAZWA" -dos2unix \- konwerter formatu plików tekstowych między systemami DOS/Mac a -Uniksem -.SH "SKŁADNIA" -.IX Header "SKŁADNIA" -.Vb 2 -\& dos2unix [opcje] [PLIK ...] [\-n PLIK_WEJ PLIK_WYJ ...] -\& unix2dos [opcje] [PLIK ...] [\-n PLIK_WEJ PLIK_WYJ ...] -.Ve -.SH "OPIS" -.IX Header "OPIS" -Pakiet Dos2unix zawiera narzędzia \f(CW\*(C`dos2unix\*(C'\fR oraz \f(CW\*(C`unix2dos\*(C'\fR do konwersji -zwykłych plików tekstowych między formatami używanymi w systemach \s-1DOS\s0 lub -Mac a formatem uniksowym. -.PP -W plikach tekstowych systemu DOS/Windows oznaczenie końca linii to -połączenie dwóch znaków: powrotu karetki (\s-1CR\s0) i przesunięcia linii (\s-1LF\s0). W -uniksowych plikach tekstowych koniec linii to pojedynczy znak \s-1LF. W\s0 plikach -tekstowych systemu Mac sprzed Mac \s-1OS X\s0 koniec linii był pojedynczym znakiem -\&\s-1CR.\s0 Obecnie Mac \s-1OS\s0 wykorzystuje uniksowe końce linii (\s-1LF\s0). -.PP -Oprócz oznaczeń końców linii Dos2unix potrafi konwertować także kodowanie -plików. Kilko stron kodowych DOS-a może być przekonwertowanych do uniksowego -Latin\-1, a windowsowy Unicode (\s-1UTF\-16\s0) do powszechniejszego pod Uniksem -kodowania Unicode \s-1UTF\-8.\s0 -.PP -Pliki binarne są pomijane automatycznie, chyba że konwersja zostanie -wymuszona. -.PP -Pliki inne niż zwykłe, np. katalogi lub \s-1FIFO,\s0 są pomijane automatycznie. -.PP -Dowiązania symboliczne i ich cele są domyślnie pozostawiane bez -zmian. Dowiązania symboliczne mogą być opcjonalnie zastępowane, albo wyjście -może być zapisywane do celu dowiązania. Zapis do celu dowiązania -symbolicznego nie jest obsługiwane pod Windows. -.PP -Dos2unix powstał na podstawie narzędzia dos2unix z systemu -SunOS/Solaris. Jest jedna istotna różnica w stosunku do oryginalnej wersji z -SunOS\-a/Solarisa: ta wersja domyślnie wykonuje konwersję w miejscu (tryb -starego pliku), podczas gdy oryginalna obsługiwała tylko konwersję parami -(tryb nowego pliku) \- p. także opcje \f(CW\*(C`\-o\*(C'\fR i \f(CW\*(C`\-n\*(C'\fR. -.SH "OPCJE" -.IX Header "OPCJE" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Potraktowanie wszystkich kolejnych opcji jako nazw plików. Tej opcji należy -użyć, aby przekonwertować pliki, których nazwy zaczynają się od -minusa. Przykładowo, aby przekonwertować plik o nazwie \*(L"\-foo\*(R", można użyć -polecenia: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -Lub w trybie nowego pliku: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo out.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Konwersja tylko znaków końca linii. Jest to domyślny tryb konwersji. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Konwersja między zestawami znaków \s-1DOS\s0 i \s-1ISO\-8859\-1.\s0 Więcej w sekcji \s-1TRYBY -KONWERSJI.\s0 -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Użycie strony kodowej Windows 1252 (zachodnioeuropejskiej). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -Użycie strony kodowej \s-1DOS 437 \s0(\s-1US\s0). Jest to domyślna strona kodowa używana -przy konwersji \s-1ISO.\s0 -.IP "\fB\-850\fR" 4 -.IX Item "-850" -Użycie strony kodowej \s-1DOS 850 \s0(zachodnioeuropejskiej). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -Użycie strony kodowej \s-1DOS 860 \s0(portugalskiej). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -Użycie strony kodowej \s-1DOS 863 \s0(kanadyjskiej francuskiej). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -Użycie strony kodowej \s-1DOS 865 \s0(nordyckiej). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Konwersja znaków 8\-bitowych do przestrzeni 7\-bitowej. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Zachowanie znaku \s-1BOM \s0(Byte Order Makr). Jeżeli plik wejściowy zawiera \s-1BOM,\s0 -powoduje zapisanie go w pliku wyjściowym. Jest to domyślne zachowanie przy -konwersji na DOS-owe końce linii. P. także opcja \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode \s-1TRYB_KONW\s0\fR" 4 -.IX Item "-c, --convmode TRYB_KONW" -Ustawienie trybu konwersji. \s-1TRYB_KONW\s0 to jeden z: \fIascii\fR, \fI7bit\fR, \fIiso\fR, -\&\fImac\fR, przy czym domyślny jest ascii. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -Wymuszenie konwersji plików binarnych. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -Pod Windows pliki w \s-1UTF\-16\s0 są domyślnie konwertowane do \s-1UTF\-8,\s0 niezależnie -od ustawienia lokalizacji. Ta opcja pozwala przekonwertować pliki w \s-1UTF\-16\s0 -do \s-1GB18030.\s0 Opcja jest dostępna tylko pod Windows, więcej w sekcji -dotyczącej \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -Wyświetlenie opisu i zakończenie. -.IP "\fB\-i[\s-1FLAGI\s0], \-\-info[=FLAGI] \s-1PLIK ...\s0\fR" 4 -.IX Item "-i[FLAGI], --info[=FLAGI] PLIK ..." -Wyświetlenie informacji o pliku. Konwersja nie jest wykonywana. -.Sp -Wypisywane są następujące informacje, w tej kolejności: liczba DOS-owych -końców linii, liczba uniksowych końców linii, liczba macowych końców linii, -znacznik \s-1BOM,\s0 tekstowy lub binarny, nazwa pliku. -.Sp -Przykładowe wyjście: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Opcjonalnie można ustawić dodatkowe flagi, aby zmienić wyjście. Można dodać -jedną lub więcej flag. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Wypisanie liczby DOS-owych końców linii. -.IP "\fBu\fR" 4 -.IX Item "u" -Wypisanie liczby uniksowych końców linii. -.IP "\fBm\fR" 4 -.IX Item "m" -Wypisanie liczby macowych końców linii. -.IP "\fBb\fR" 4 -.IX Item "b" -Wypisanie znacznika \s-1BOM.\s0 -.IP "\fBt\fR" 4 -.IX Item "t" -Wypisanie, czy plik jest tekstowy, czy binarny. -.IP "\fBc\fR" 4 -.IX Item "c" -Wypisanie tylko plików, które zostałyby przekonwertowane. -.Sp -Z flagą \f(CW\*(C`c\*(C'\fR dos2unix wypisze tylko pliki zawierające DOS-owe końce linii, a -unix2dos wypisze tylko nazwy plików zawierających uniksowe końce linii. -.RE -.RS 4 -.Sp -Przykłady: -.Sp -Pokazanie informacji o wszystkich plikach *.txt: -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Pokazanie tylko liczby DOS-owych i uniksowych końców linii: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Pokazanie tylko znacznika \s-1BOM:\s0 -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -Wypisanie listy plików zawierających DOS-owe końce linii: -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -Wypisanie listy plików zawierających uniksowe końce linii: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -Zachowanie znacznika czasu pliku wyjściowego takiego samego, jak pliku -wejściowego. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -Wyświetlenie licencji programu. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -Dodanie dodatkowego znaku końca linii. -.Sp -\&\fBdos2unix\fR: tylko DOS-owe znaki końca linii są zamieniane na dwa -uniksowe. W trybie Mac tylko macowe znaki końca linii są zamieniane na dwa -uniksowe. -.Sp -\&\fBunix2dos\fR: tylko uniksowe znaki końca linii są zamieniane na dwa -DOS-owe. W trybie Mac uniksowe znaki końca linii są zamieniane na dwa -macowe. -.IP "\fB\-m, \-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -Zapisanie znacznika \s-1BOM \s0(Byte Order Mark) w pliku wyjściowym. Domyślnie -zapisywany jest \s-1BOM UTF\-8.\s0 -.Sp -Jeśli plik wejściowy jest w kodowaniu \s-1UTF\-16\s0 i użyto opcji \f(CW\*(C`\-u\*(C'\fR, zostanie -zapisany \s-1BOM UTF\-16.\s0 -.Sp -Nigdy nie należy używać tej opcji, jeśli kodowanie wyjściowe jest inne niż -\&\s-1UTF\-8\s0 lub \s-1UTF\-16.\s0 Więcej w sekcji \s-1UNICODE.\s0 -.IP "\fB\-n, \-\-newfile \s-1PLIK_WEJ PLIK_WYJ ...\s0\fR" 4 -.IX Item "-n, --newfile PLIK_WEJ PLIK_WYJ ..." -Tryb nowego pliku. Konwersja \s-1PLIKU_WEJ\s0 z zapisem wyjścia do \s-1PLIKU_WYJ.\s0 Nazwy -plików muszą być podane parami, a masek \fInie\fR należy używać, gdyż -\&\fIspowoduje\fR to utratę plików. -.Sp -Osoba uruchamiająca konwersję w trybie nowego pliku (par) będzie -właścicielem przekonwertowanego pliku. Prawa odczytu/zapisu nowego pliku -będą pochodziły z praw pliku oryginalnego po odjęciu \fIumask\fR\|(1) osoby -uruchamiającej konwersję. -.IP "\fB\-o, \-\-oldfile \s-1PLIK ...\s0\fR" 4 -.IX Item "-o, --oldfile PLIK ..." -Tryb starego pliku. Konwersja \s-1PLIKU\s0 i nadpisanie go wyjściem. Program działa -domyślnie w tym trybie. Można używać masek. -.Sp -W trybie starego pliku (w miejscu) przekonwertowany plik otrzymuje tego -samego właściciela, grupę oraz prawa odczytu/zapisu, jak plik oryginalny \- -także wtedy, gdy plik jest konwertowany przez innego użytkownika, mającego -prawo zapisu do pliku (np. przez użytkownika root). Konwersja zostanie -przerwana, jeśli nie będzie możliwe zachowanie oryginalnych wartości. Zmiana -właściciela mogłaby oznaczać, że pierwotny właściciel nie może już odczytać -pliku. Zmiana grupy mogłaby być zagrożeniem bezpieczeństwa, plik mógłby być -czytelny dla nie zamierzonych osób. Zachowanie właściciela, grupy i praw -odczytu/zapisu jest obsługiwane tylko na Uniksie. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Tryb cichy. Pominięcie wszystkich ostrzeżeń i komunikatów. Zwracanym kodem -jest zero, chyba że podano błędne opcje linii poleceń. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -Usunięcie znaków \s-1BOM \s0(Byte Order Mark). Bez zapisywania \s-1BOM\s0 do pliku -wyjściowego. Jest to domyślne zachowanie przy konwersji na uniksowe końce -linii. P. także opcja \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s, \-\-safe\fR" 4 -.IX Item "-s, --safe" -Pominięcie plików binarnych (domyślne). -.IP "\fB\-u, \-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -Zachowanie oryginalnego kodowania pliku wejściowego \s-1UTF\-16.\s0 Plik wyjściowy -zostanie zapisany w tym samym kodowaniu \s-1UTF\-16 \s0(little lub big endian), co -plik wejściowy. Zapobiega to przekształceniu do \s-1UTF\-8.\s0 Do pliku zostanie -zapisany odpowiedni znacznik \s-1BOM UTF\-16.\s0 Tę opcję można wyłączyć opcją -\&\f(CW\*(C`\-ascii\*(C'\fR. -.IP "\fB\-ul, \-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -Przyjęcie, że format pliku wejściowego to \s-1UTF\-16LE.\s0 -.Sp -Jeśli w pliku wejściowym jest znacznik \s-1BOM \s0(Byte Order Mark), ma on -priorytet nad tą opcją. -.Sp -Jeśli przyjęto błędne założenie (plik wejściowy nie jest w formacie -\&\s-1UTF\-16LE\s0), a konwersja się uda, wynikiem będzie plik wyjściowy \s-1UTF\-8\s0 ze złym -tekstem. Konwersję tę można odwrócić przy użyciu polecenia \fIiconv\fR\|(1) do -konwersji wyjścia \s-1UTF\-8\s0 z powrotem do \s-1UTF\-16LE.\s0 Przywróci to plik -oryginalny. -.Sp -Przyjęcie \s-1UTF\-16LE\s0 działa jako \fItryb konwersji\fR. Przy przełączeniu na -domyślny tryb \fIascii\fR przyjęcie \s-1UTF\-16LE\s0 jest wyłączane. -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -Przyjęcie, że format pliku wejściowego to \s-1UTF\-16BE.\s0 -.Sp -Ta opcja działa analogicznie do \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v, \-\-verbose\fR" 4 -.IX Item "-v, --verbose" -Wyświetlanie szczegółowych komunikatów. Wyświetlane śa dodatkowe informacje -o znacznikach \s-1BOM \s0(Byte Order Mark) oraz liczbie przekonwertowanych końców -linii. -.IP "\fB\-F, \-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -Podążanie za dowiązaniami symbolicznymi i konwertowanie ich celów -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Zastępowanie dowiązań symbolicznych przekonwertowanymi plikami (oryginalne -pliki docelowe pozostają bez zmian). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -Pozostawienie dowiązań symbolicznych i celów bez zmian (domyślne). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -Wyświetlenie informacji o wersji i zakończenie. -.SH "TRYB MAC" -.IX Header "TRYB MAC" -W zwykłym trybie znaki końca linii są konwertowane z DOS-a do Uniksa i -odwrotnie. Znaki końca linii systemu Mac nie są konwertowane. -.PP -W trybie Mac znaki końca linii są konwertowane z formatu Maca do Uniksa i -odwrotnie. Znaki końca linii systemu \s-1DOS\s0 nie są zmieniane. -.PP -Aby uruchomić program w trybie Mac, należy użyć opcji linii poleceń \f(CW\*(C`\-c -mac\*(C'\fR albo użyć poleceń \f(CW\*(C`mac2unix\*(C'\fR lub \f(CW\*(C`unix2mac\*(C'\fR. -.SH "TRYBY KONWERSJI" -.IX Header "TRYBY KONWERSJI" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -W trybie \f(CW\*(C`ascii\*(C'\fR konwertowane są tylko końce linii. Jest to domyślny tryb -konwersji. -.Sp -Mimo że nazwa tego trybu to \s-1ASCII,\s0 które jest standardem 7\-bitowym, jest to -tryb 8\-bitowy. Należy zawsze używać tego trybu przy konwersji plików Unicode -\&\s-1UTF\-8.\s0 -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -W tym trybie wszystkie znaki 8\-bitowe spoza \s-1ASCII \s0(o wartościach od 128 do -255) są konwertowane do przestrzeni 7\-bitowej. -.IP "\fBiso\fR" 4 -.IX Item "iso" -W tym trybie znaki są konwertowane między zestawem znaków \s-1DOS \s0(stroną -kodową) a zestawem znaków \s-1ISO\-8859\-1 \s0(Latin\-1) używanym na Uniksie. Znaki -DOS-owe nie mające odpowiednika w \s-1ISO\-8859\-1,\s0 których nie da się -przekonwertować, są zamieniane na kropkę. To samo dotyczy znaków \s-1ISO\-8859\-1\s0 -bez odpowiednika w DOS-ie. -.Sp -Jeśli używana jest tylko opcja \f(CW\*(C`\-iso\*(C'\fR, dos2unix próbuje wykryć aktywną -stronę kodową. Jeśli nie jest to możliwe, dos2unix używa domyślnej strony -kodowej \s-1CP437,\s0 stosowanej głównie w \s-1USA.\s0 Aby wymusić określoną stronę -kodową, należy użyć opcji \f(CW\*(C`\-437\*(C'\fR (\s-1US\s0), \f(CW\*(C`\-850\*(C'\fR (zachodnioeuropejska), -\&\f(CW\*(C`\-860\*(C'\fR (portugalska), \f(CW\*(C`\-863\*(C'\fR (kanadyjska francuska) lub \f(CW\*(C`\-865\*(C'\fR -(nordycka). Ponadto obsługiwana jest strona kodowa Windows \s-1CP1252 -\&\s0(zachodnioeuropejska) przy użyciu opcji \f(CW\*(C`\-1252\*(C'\fR. W przypadku innych stron -kodowych można użyć narzędzia dos2unix wraz z \fIiconv\fR\|(1). Iconv potrafi -konwertować między wieloma kodowaniami znaków. -.Sp -Nigdy nie należy używać konwersji \s-1ISO\s0 na plikach tekstowych w -Unicode. Uszkodziłaby pliki kodowane \s-1UTF\-8.\s0 -.Sp -Kilka przykładów: -.Sp -Konwersja z domyślnej strony kodowej \s-1DOS\s0 do uniksowego Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-iso \-n in.txt out.txt -.Ve -.Sp -Konwersja ze strony kodowej \s-1DOS CP850\s0 do uniksowego Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-850 \-n in.txt out.txt -.Ve -.Sp -Konwersja ze strony kodowej Windows \s-1CP1252\s0 do uniksowego Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n in.txt out.txt -.Ve -.Sp -Konwersja ze strony kodowej Windows \s-1CP1252\s0 do uniksowego \s-1UTF\-8 \s0(Unicode): -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 in.txt | dos2unix > out.txt -.Ve -.Sp -Konwersa z uniksowego Latin\-1 do domyślnej strony kodowej \s-1DOS:\s0 -.Sp -.Vb 1 -\& unix2dos \-iso \-n in.txt out.txt -.Ve -.Sp -Konwersja z uniksowego Latin\-1 do strony kodowej \s-1DOS CP850:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n in.txt out.txt -.Ve -.Sp -Konwersja z uniksowego Latin\-1 do strony kodowej Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos \-1252 \-n in.txt out.txt -.Ve -.Sp -Konwersja z uniksowego \s-1UTF\-8 \s0(Unicode) do strony kodowej Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t CP1252 > out.txt -.Ve -.Sp -Więcej pod adresem oraz -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Kodowania" -.IX Subsection "Kodowania" -Istnieją różne kodowania Unicode. Pod Uniksem i Linuksem pliki Unicode są -zwykle kodowane z użyciem \s-1UTF\-8.\s0 Pod Windows pliki tekstowe Unicode mogą być -kodowane w \s-1UTF\-8, UTF\-16, UTF\-16\s0 big-endian, ale przeważnie są kodowane w -\&\s-1UTF\-16.\s0 -.SS "Konwersje" -.IX Subsection "Konwersje" -Pliki tekstowe Unicode mogą mieć znaki końca linii systemu \s-1DOS,\s0 Unix lub -Mac, podobnie jak zwykłe pliki tekstowe. -.PP -Wszystkie wersje dos2unix i unix2dos potrafią konwertować pliki kodowane -\&\s-1UTF\-8,\s0 ponieważ \s-1UTF\-8\s0 jest wstecznie zgodne z \s-1ASCII.\s0 -.PP -Dos2unix i unix2dos z obsługą Unicode \s-1UTF\-16\s0 potrafią odczytywać pliki -tekstowe kodowane \s-1UTF\-16\s0 little\- oraz big-endian. Aby sprawdzić, czy -dos2unix został zbudowany z obsługą \s-1UTF\-16,\s0 należy napisać \f(CW\*(C`dos2unix \-V\*(C'\fR. -.PP -Pod Uniksem/Linuksem pliki w kodowaniu \s-1UTF\-16\s0 są konwertowane do kodowania -znaków ustawionej lokalizacji. Kodowanie znaków dla lokalizacji można -sprawdzić poleceniem \fIlocale\fR\|(1). Jeśli konwersja nie jest możliwa, wystąpi -błąd, a plik zostanie pominięty. -.PP -Pod Windows pliki \s-1UTF\-16\s0 są domyślnie konwertowane do \s-1UTF\-8.\s0 Pliki tekstkowe -w kodowaniu \s-1UTF\-8\s0 są dobrze obsługiwane zarówno pod Windows, jak i -Uniksem/Linuksem. -.PP -Kodowania \s-1UTF\-16\s0 i \s-1UTF\-8\s0 są w pełni zgodne, konwersja nie spowoduje utraty -żadnej części tekstu. W przypadku wystąpienia błędu konwersji, na przykład w -przypadku błędu w pliku wejściowym \s-1UTF\-16,\s0 plik zostanie pominięty. -.PP -W przypadku użycia opcji \f(CW\*(C`\-u\*(C'\fR, plik wejściowy zostanie zapisany w tym samym -kodowaniu \s-1UTF\-16,\s0 co plik wejściowy. Opcja \f(CW\*(C`\-u\*(C'\fR zapobiega konwersji do -\&\s-1UTF\-8.\s0 -.PP -Dos2unix oraz unix2dos nie mają opcji pozwalającej na konwersję plików \s-1UTF\-8\s0 -do \s-1UTF\-16.\s0 -.PP -Tryby konwersji \s-1ISO\s0 i 7\-bit nie działają na plikach \s-1UTF\-16.\s0 -.SS "Znacznik \s-1BOM\s0" -.IX Subsection "Znacznik BOM" -W systemie Windows pliki tekstowe zwykle zawierają znacznik \s-1BOM \s0(Byte Order -Mark), ponieważ wiele programów dla Windows (w tym Notepad) dodaje domyślnie -znaczniki \s-1BOM.\s0 Więcej informacji można znaleźć pod adresem -. -.PP -Pod Uniksem pliki Unicode zwykle nie mają znacznika \s-1BOM.\s0 Pliki tekstowe są -traktowane jako kodowane zgodnie z kodowaniem znaków ustawionej lokalizacji. -.PP -Dos2unix potrafi wykryć tylko, czy plik jest w formacie \s-1UTF\-16,\s0 jeśli -zawiera znacznik \s-1BOM.\s0 Jeśli plik \s-1UTF\-16\s0 nie ma tego znacznika, dos2unix -potraktuje plik jako binarny. -.PP -Do konwersji pliku \s-1UTF\-16\s0 bez znacznika \s-1BOM\s0 można użyć opcji \f(CW\*(C`\-ul\*(C'\fR lub -\&\f(CW\*(C`\-ub\*(C'\fR. -.PP -Dos2unix nie zapisuje domyślnie znaku \s-1BOM\s0 w pliku wyjściowym. Z opcją \f(CW\*(C`\-b\*(C'\fR -Dos2unix zapisuje \s-1BOM,\s0 jeśli plik wejściowy zawiera \s-1BOM.\s0 -.PP -Unix2dos domyślnie zapisuje znaczniki \s-1BOM\s0 w pliku wyjściowym, jeśli plik -wejściowy ma \s-1BOM.\s0 Aby usunąć \s-1BOM,\s0 można użyć opcji \f(CW\*(C`\-r\*(C'\fR. -.PP -Dos2unix oraz unix2dos zawsze zapisują znaczniki \s-1BOM,\s0 jeśli użyta zostanie -opcja \f(CW\*(C`\-m\*(C'\fR. -.SS "Przykłady Unicode" -.IX Subsection "Przykłady Unicode" -Konwersja pliku \s-1UTF\-16 \s0(z \s-1BOM\s0) z formatu Windows do uniksowego \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-n in.txt out.txt -.Ve -.PP -Konwersja pliku \s-1UTF\-16LE \s0(bez \s-1BOM\s0) z formatu Windows do uniksowego \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-ul \-n in.txt out.txt -.Ve -.PP -Konwersja z uniksowego \s-1UTF\-8\s0 do \s-1UTF\-8\s0 z \s-1BOM\s0 dla Windows: -.PP -.Vb 1 -\& unix2dos \-m \-n in.txt out.txt -.Ve -.PP -Konwersja z uniksowego \s-1UTF\-8\s0 do \s-1UTF\-16\s0 dla Windows: -.PP -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t UTF\-16 > out.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 to standard urzędowy w Chinach. Obowiązkowy podzbiór standardu -\&\s-1GB18030\s0 jest oficjalnym wymaganiem każdego oprogramowania sprzedawanego w -Chinach. Więcej pod adresem . -.PP -\&\s-1GB18030\s0 jest w pełni zgodny z Unicode i może być uważany za format -transformacji unikodu. Podobnie jak \s-1UTF\-8, GB18030\s0 jest zgodny z \s-1ASCII.\s0 Jest -także zgodny ze stroną kodową Windows 936, znaną też jako \s-1GBK.\s0 -.PP -Pod Uniksem/Linuksem pliki \s-1UTF\-16\s0 są konwertowane do \s-1GB18030,\s0 jeśli -kodowanie dla lokalizacji jest ustawione na \s-1GB18030.\s0 Uwaga: będzie to -działać tylko dla lokalizacji chińskiej. W przypadku np. ustawienia -lokalizacji angielskiej/brytyjskiej \f(CW\*(C`en_GB.GB18030\*(C'\fR konwersja \s-1UTF\-16\s0 do -\&\s-1GB18030\s0 nie będzie działać, a dla lokalizacji chińskiej \f(CW\*(C`zh_CN.GB18030\*(C'\fR -będzie. -.PP -Pod Windows w celu konwersji plików \s-1UTF\-16\s0 do \s-1GB18030\s0 należy użyć opcji -\&\f(CW\*(C`\-gb\*(C'\fR. -.PP -Pliki w kodowaniu \s-1GB18030\s0 mogą mieć znacznik \s-1BOM,\s0 podobnie jak pliki w -Unicode. -.SH "PRZYKŁADY" -.IX Header "PRZYKŁADY" -Odczyt ze standardowego wejścia i zapis na standardowe wyjście: -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Konwersja i zastąpienie a.txt; konwersja i zastąpienie b.txt: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Konwersja i zastąpienie a.txt w trybie ascii: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Konwersja i zastąpienie a.txt w trybie ascii; konwersja i zastąpienie b.txt -w trybie 7\-bitowym: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Konwersja a.txt z formatu Mac do formatu uniksowego: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Konwersja a.txt z formatu uniksowego do formatu Mac: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Konwersja i zastąpienie a.txt z zachowaniem oryginalnego znacznika czasu: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Konwersja a.txt i zapis do e.txt: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Konwersja a.txt i zapis do e.txt z zachowaniem znacznika czasu e.txt -takiego, jak a.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Konwersja i zastąpienie a.txt; konwersja b.txt i zapis do e.txt: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Konwersja c.txt i zapis do e.txt; konwersja i zastąpienie a.txt; konwersja i -zastąpienie b.txt; konwersja d.txt i zapis do f.txt: -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "KONWERSJA REKURENCYJNA" -.IX Header "KONWERSJA REKURENCYJNA" -Można użyć dos2unix w połączeniu z poleceniami \fIfind\fR\|(1) i \fIxargs\fR\|(1) do -rekurencyjnej konwersji plików tekstowych w strukturze drzewa katalogów. Na -przykład, aby przekonwertować wszystkie pliki .txt w drzewie katalogów -poniżej katalogu bieżącego, należy napisać: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "LOKALIZACJA" -.IX Header "LOKALIZACJA" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -Główny język wybiera się zmienną środowiskową \s-1LANG.\s0 Zmienna \s-1LANG\s0 składa się -z kilku części. Pierwsza część to małe litery oznaczające kod języka. Druga -część jest opcjonalna i zawiera kod kraju pisany wielkimi literami, -poprzedzony podkreśleniem. Jest także opcjonalna trzecia część: kodowanie -znaków, poprzedzone kropką. Kilka przykładów dla powłok zgodnych ze -standardem \s-1POSIX:\s0 -.Sp -.Vb 7 -\& export LANG=nl holenderski -\& export LANG=nl_NL holenderski, Holandia -\& export LANG=nl_BE holenderski, Belgia -\& export LANG=es_ES hiszpański, Hiszpania -\& export LANG=es_MX hiszpański, Meksyk -\& export LANG=en_US.iso88591 angielski, USA, kodowanie Latin\-1 -\& export LANG=en_GB.UTF\-8 angielski, Wlk. Brytania, kodowanie UTF\-8 -.Ve -.Sp -Pełną listę kodów języków i krajów można znaleźć w podręczniku do gettexta: - -.Sp -W systemach uniksowych do uzyskania informacji dotyczących lokalizacji można -użyć polecenia \fIlocale\fR\|(1). -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -Przy użyciu zmiennej środowiskowej \s-1LANGUAGE\s0 można określić listę języków wg -priorytetu, oddzielonych dwukropkami. Dos2unix przyjmuje pierwszeństwo -zmiennej \s-1LANGUAGE\s0 nad \s-1LANG.\s0 Na przykład, najpierw holenderski, następnie -niemiecki: \f(CW\*(C`LANGUAGE=nl:de\*(C'\fR. Aby skorzystać z listy wg priorytetów ze -zmiennej \s-1LANGUAGE,\s0 trzeba najpierw włączyć lokalizację przez ustawienie -zmiennej \s-1LANG \s0(lub \s-1LC_ALL\s0) na wartość inną niż \*(L"C\*(R". Więcej informacji -znajduje się w podręczniku do gettexta: - -.Sp -W przypadku wybrania niedostępnego języka, otrzymamy standardowe, angielskie -komunikaty. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Przy użyciu zmiennej środowiskowej \s-1DOS2UNIX_LOCALEDIR,\s0 można nadpisać -ustawienie \s-1LOCALEDIR\s0 z czasu kompilacji. \s-1LOCALEDIR\s0 to katalog używany do -znalezienia plików lokalizacji. Domyślną wartością dla \s-1GNU\s0 jest -\&\f(CW\*(C`/usr/local/share/locale\*(C'\fR. Opcja \fB\-\-version\fR wyświetla używaną wartość -\&\s-1LOCALEDIR.\s0 -.Sp -Przykład (dla powłoki \s-1POSIX\s0): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "WARTOŚĆ ZWRACANA" -.IX Header "WARTOŚĆ ZWRACANA" -W przypadku powodzenia zwracane jest zero. Jeśli wystąpi błąd systemowy, -zwracany jest ostatni błąd systemowy. W przypadku innych błędów zwracane -jest 1. -.PP -Wartość zwracana w trybie cichym to zawsze zero, z wyjątkiem sytuacji -podania błędnych opcji linii poleceń. -.SH "STANDARDY" -.IX Header "STANDARDY" - -.PP - -.PP - -.PP - -.SH "AUTORZY" -.IX Header "AUTORZY" -Benjamin Lin ; Bernd Johannes Wuebben (tryb mac2unix) -; Christian Wurll (dodawanie dodatkowej nowej linii) -; Erwin Waterlander (prowadzący) -.PP -Strona projektu: -.PP -Strona SourceForge: -.SH "ZOBACZ TAKŻE" -.IX Header "ZOBACZ TAKŻE" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/pl/man1/unix2dos.1 b/Tools/dos2unix/share/man/pl/man1/unix2dos.1 deleted file mode 100644 index 1062354..0000000 --- a/Tools/dos2unix/share/man/pl/man1/unix2dos.1 +++ /dev/null @@ -1,756 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NAZWA" -.IX Header "NAZWA" -dos2unix \- konwerter formatu plików tekstowych między systemami DOS/Mac a -Uniksem -.SH "SKŁADNIA" -.IX Header "SKŁADNIA" -.Vb 2 -\& dos2unix [opcje] [PLIK ...] [\-n PLIK_WEJ PLIK_WYJ ...] -\& unix2dos [opcje] [PLIK ...] [\-n PLIK_WEJ PLIK_WYJ ...] -.Ve -.SH "OPIS" -.IX Header "OPIS" -Pakiet Dos2unix zawiera narzędzia \f(CW\*(C`dos2unix\*(C'\fR oraz \f(CW\*(C`unix2dos\*(C'\fR do konwersji -zwykłych plików tekstowych między formatami używanymi w systemach \s-1DOS\s0 lub -Mac a formatem uniksowym. -.PP -W plikach tekstowych systemu DOS/Windows oznaczenie końca linii to -połączenie dwóch znaków: powrotu karetki (\s-1CR\s0) i przesunięcia linii (\s-1LF\s0). W -uniksowych plikach tekstowych koniec linii to pojedynczy znak \s-1LF. W\s0 plikach -tekstowych systemu Mac sprzed Mac \s-1OS X\s0 koniec linii był pojedynczym znakiem -\&\s-1CR.\s0 Obecnie Mac \s-1OS\s0 wykorzystuje uniksowe końce linii (\s-1LF\s0). -.PP -Oprócz oznaczeń końców linii Dos2unix potrafi konwertować także kodowanie -plików. Kilko stron kodowych DOS-a może być przekonwertowanych do uniksowego -Latin\-1, a windowsowy Unicode (\s-1UTF\-16\s0) do powszechniejszego pod Uniksem -kodowania Unicode \s-1UTF\-8.\s0 -.PP -Pliki binarne są pomijane automatycznie, chyba że konwersja zostanie -wymuszona. -.PP -Pliki inne niż zwykłe, np. katalogi lub \s-1FIFO,\s0 są pomijane automatycznie. -.PP -Dowiązania symboliczne i ich cele są domyślnie pozostawiane bez -zmian. Dowiązania symboliczne mogą być opcjonalnie zastępowane, albo wyjście -może być zapisywane do celu dowiązania. Zapis do celu dowiązania -symbolicznego nie jest obsługiwane pod Windows. -.PP -Dos2unix powstał na podstawie narzędzia dos2unix z systemu -SunOS/Solaris. Jest jedna istotna różnica w stosunku do oryginalnej wersji z -SunOS\-a/Solarisa: ta wersja domyślnie wykonuje konwersję w miejscu (tryb -starego pliku), podczas gdy oryginalna obsługiwała tylko konwersję parami -(tryb nowego pliku) \- p. także opcje \f(CW\*(C`\-o\*(C'\fR i \f(CW\*(C`\-n\*(C'\fR. -.SH "OPCJE" -.IX Header "OPCJE" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Potraktowanie wszystkich kolejnych opcji jako nazw plików. Tej opcji należy -użyć, aby przekonwertować pliki, których nazwy zaczynają się od -minusa. Przykładowo, aby przekonwertować plik o nazwie \*(L"\-foo\*(R", można użyć -polecenia: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -Lub w trybie nowego pliku: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo out.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Konwersja tylko znaków końca linii. Jest to domyślny tryb konwersji. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Konwersja między zestawami znaków \s-1DOS\s0 i \s-1ISO\-8859\-1.\s0 Więcej w sekcji \s-1TRYBY -KONWERSJI.\s0 -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Użycie strony kodowej Windows 1252 (zachodnioeuropejskiej). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -Użycie strony kodowej \s-1DOS 437 \s0(\s-1US\s0). Jest to domyślna strona kodowa używana -przy konwersji \s-1ISO.\s0 -.IP "\fB\-850\fR" 4 -.IX Item "-850" -Użycie strony kodowej \s-1DOS 850 \s0(zachodnioeuropejskiej). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -Użycie strony kodowej \s-1DOS 860 \s0(portugalskiej). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -Użycie strony kodowej \s-1DOS 863 \s0(kanadyjskiej francuskiej). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -Użycie strony kodowej \s-1DOS 865 \s0(nordyckiej). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Konwersja znaków 8\-bitowych do przestrzeni 7\-bitowej. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Zachowanie znaku \s-1BOM \s0(Byte Order Makr). Jeżeli plik wejściowy zawiera \s-1BOM,\s0 -powoduje zapisanie go w pliku wyjściowym. Jest to domyślne zachowanie przy -konwersji na DOS-owe końce linii. P. także opcja \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode \s-1TRYB_KONW\s0\fR" 4 -.IX Item "-c, --convmode TRYB_KONW" -Ustawienie trybu konwersji. \s-1TRYB_KONW\s0 to jeden z: \fIascii\fR, \fI7bit\fR, \fIiso\fR, -\&\fImac\fR, przy czym domyślny jest ascii. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -Wymuszenie konwersji plików binarnych. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -Pod Windows pliki w \s-1UTF\-16\s0 są domyślnie konwertowane do \s-1UTF\-8,\s0 niezależnie -od ustawienia lokalizacji. Ta opcja pozwala przekonwertować pliki w \s-1UTF\-16\s0 -do \s-1GB18030.\s0 Opcja jest dostępna tylko pod Windows, więcej w sekcji -dotyczącej \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -Wyświetlenie opisu i zakończenie. -.IP "\fB\-i[\s-1FLAGI\s0], \-\-info[=FLAGI] \s-1PLIK ...\s0\fR" 4 -.IX Item "-i[FLAGI], --info[=FLAGI] PLIK ..." -Wyświetlenie informacji o pliku. Konwersja nie jest wykonywana. -.Sp -Wypisywane są następujące informacje, w tej kolejności: liczba DOS-owych -końców linii, liczba uniksowych końców linii, liczba macowych końców linii, -znacznik \s-1BOM,\s0 tekstowy lub binarny, nazwa pliku. -.Sp -Przykładowe wyjście: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Opcjonalnie można ustawić dodatkowe flagi, aby zmienić wyjście. Można dodać -jedną lub więcej flag. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Wypisanie liczby DOS-owych końców linii. -.IP "\fBu\fR" 4 -.IX Item "u" -Wypisanie liczby uniksowych końców linii. -.IP "\fBm\fR" 4 -.IX Item "m" -Wypisanie liczby macowych końców linii. -.IP "\fBb\fR" 4 -.IX Item "b" -Wypisanie znacznika \s-1BOM.\s0 -.IP "\fBt\fR" 4 -.IX Item "t" -Wypisanie, czy plik jest tekstowy, czy binarny. -.IP "\fBc\fR" 4 -.IX Item "c" -Wypisanie tylko plików, które zostałyby przekonwertowane. -.Sp -Z flagą \f(CW\*(C`c\*(C'\fR dos2unix wypisze tylko pliki zawierające DOS-owe końce linii, a -unix2dos wypisze tylko nazwy plików zawierających uniksowe końce linii. -.RE -.RS 4 -.Sp -Przykłady: -.Sp -Pokazanie informacji o wszystkich plikach *.txt: -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Pokazanie tylko liczby DOS-owych i uniksowych końców linii: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Pokazanie tylko znacznika \s-1BOM:\s0 -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -Wypisanie listy plików zawierających DOS-owe końce linii: -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -Wypisanie listy plików zawierających uniksowe końce linii: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -Zachowanie znacznika czasu pliku wyjściowego takiego samego, jak pliku -wejściowego. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -Wyświetlenie licencji programu. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -Dodanie dodatkowego znaku końca linii. -.Sp -\&\fBdos2unix\fR: tylko DOS-owe znaki końca linii są zamieniane na dwa -uniksowe. W trybie Mac tylko macowe znaki końca linii są zamieniane na dwa -uniksowe. -.Sp -\&\fBunix2dos\fR: tylko uniksowe znaki końca linii są zamieniane na dwa -DOS-owe. W trybie Mac uniksowe znaki końca linii są zamieniane na dwa -macowe. -.IP "\fB\-m, \-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -Zapisanie znacznika \s-1BOM \s0(Byte Order Mark) w pliku wyjściowym. Domyślnie -zapisywany jest \s-1BOM UTF\-8.\s0 -.Sp -Jeśli plik wejściowy jest w kodowaniu \s-1UTF\-16\s0 i użyto opcji \f(CW\*(C`\-u\*(C'\fR, zostanie -zapisany \s-1BOM UTF\-16.\s0 -.Sp -Nigdy nie należy używać tej opcji, jeśli kodowanie wyjściowe jest inne niż -\&\s-1UTF\-8\s0 lub \s-1UTF\-16.\s0 Więcej w sekcji \s-1UNICODE.\s0 -.IP "\fB\-n, \-\-newfile \s-1PLIK_WEJ PLIK_WYJ ...\s0\fR" 4 -.IX Item "-n, --newfile PLIK_WEJ PLIK_WYJ ..." -Tryb nowego pliku. Konwersja \s-1PLIKU_WEJ\s0 z zapisem wyjścia do \s-1PLIKU_WYJ.\s0 Nazwy -plików muszą być podane parami, a masek \fInie\fR należy używać, gdyż -\&\fIspowoduje\fR to utratę plików. -.Sp -Osoba uruchamiająca konwersję w trybie nowego pliku (par) będzie -właścicielem przekonwertowanego pliku. Prawa odczytu/zapisu nowego pliku -będą pochodziły z praw pliku oryginalnego po odjęciu \fIumask\fR\|(1) osoby -uruchamiającej konwersję. -.IP "\fB\-o, \-\-oldfile \s-1PLIK ...\s0\fR" 4 -.IX Item "-o, --oldfile PLIK ..." -Tryb starego pliku. Konwersja \s-1PLIKU\s0 i nadpisanie go wyjściem. Program działa -domyślnie w tym trybie. Można używać masek. -.Sp -W trybie starego pliku (w miejscu) przekonwertowany plik otrzymuje tego -samego właściciela, grupę oraz prawa odczytu/zapisu, jak plik oryginalny \- -także wtedy, gdy plik jest konwertowany przez innego użytkownika, mającego -prawo zapisu do pliku (np. przez użytkownika root). Konwersja zostanie -przerwana, jeśli nie będzie możliwe zachowanie oryginalnych wartości. Zmiana -właściciela mogłaby oznaczać, że pierwotny właściciel nie może już odczytać -pliku. Zmiana grupy mogłaby być zagrożeniem bezpieczeństwa, plik mógłby być -czytelny dla nie zamierzonych osób. Zachowanie właściciela, grupy i praw -odczytu/zapisu jest obsługiwane tylko na Uniksie. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Tryb cichy. Pominięcie wszystkich ostrzeżeń i komunikatów. Zwracanym kodem -jest zero, chyba że podano błędne opcje linii poleceń. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -Usunięcie znaków \s-1BOM \s0(Byte Order Mark). Bez zapisywania \s-1BOM\s0 do pliku -wyjściowego. Jest to domyślne zachowanie przy konwersji na uniksowe końce -linii. P. także opcja \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s, \-\-safe\fR" 4 -.IX Item "-s, --safe" -Pominięcie plików binarnych (domyślne). -.IP "\fB\-u, \-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -Zachowanie oryginalnego kodowania pliku wejściowego \s-1UTF\-16.\s0 Plik wyjściowy -zostanie zapisany w tym samym kodowaniu \s-1UTF\-16 \s0(little lub big endian), co -plik wejściowy. Zapobiega to przekształceniu do \s-1UTF\-8.\s0 Do pliku zostanie -zapisany odpowiedni znacznik \s-1BOM UTF\-16.\s0 Tę opcję można wyłączyć opcją -\&\f(CW\*(C`\-ascii\*(C'\fR. -.IP "\fB\-ul, \-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -Przyjęcie, że format pliku wejściowego to \s-1UTF\-16LE.\s0 -.Sp -Jeśli w pliku wejściowym jest znacznik \s-1BOM \s0(Byte Order Mark), ma on -priorytet nad tą opcją. -.Sp -Jeśli przyjęto błędne założenie (plik wejściowy nie jest w formacie -\&\s-1UTF\-16LE\s0), a konwersja się uda, wynikiem będzie plik wyjściowy \s-1UTF\-8\s0 ze złym -tekstem. Konwersję tę można odwrócić przy użyciu polecenia \fIiconv\fR\|(1) do -konwersji wyjścia \s-1UTF\-8\s0 z powrotem do \s-1UTF\-16LE.\s0 Przywróci to plik -oryginalny. -.Sp -Przyjęcie \s-1UTF\-16LE\s0 działa jako \fItryb konwersji\fR. Przy przełączeniu na -domyślny tryb \fIascii\fR przyjęcie \s-1UTF\-16LE\s0 jest wyłączane. -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -Przyjęcie, że format pliku wejściowego to \s-1UTF\-16BE.\s0 -.Sp -Ta opcja działa analogicznie do \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v, \-\-verbose\fR" 4 -.IX Item "-v, --verbose" -Wyświetlanie szczegółowych komunikatów. Wyświetlane śa dodatkowe informacje -o znacznikach \s-1BOM \s0(Byte Order Mark) oraz liczbie przekonwertowanych końców -linii. -.IP "\fB\-F, \-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -Podążanie za dowiązaniami symbolicznymi i konwertowanie ich celów -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Zastępowanie dowiązań symbolicznych przekonwertowanymi plikami (oryginalne -pliki docelowe pozostają bez zmian). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -Pozostawienie dowiązań symbolicznych i celów bez zmian (domyślne). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -Wyświetlenie informacji o wersji i zakończenie. -.SH "TRYB MAC" -.IX Header "TRYB MAC" -W zwykłym trybie znaki końca linii są konwertowane z DOS-a do Uniksa i -odwrotnie. Znaki końca linii systemu Mac nie są konwertowane. -.PP -W trybie Mac znaki końca linii są konwertowane z formatu Maca do Uniksa i -odwrotnie. Znaki końca linii systemu \s-1DOS\s0 nie są zmieniane. -.PP -Aby uruchomić program w trybie Mac, należy użyć opcji linii poleceń \f(CW\*(C`\-c -mac\*(C'\fR albo użyć poleceń \f(CW\*(C`mac2unix\*(C'\fR lub \f(CW\*(C`unix2mac\*(C'\fR. -.SH "TRYBY KONWERSJI" -.IX Header "TRYBY KONWERSJI" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -W trybie \f(CW\*(C`ascii\*(C'\fR konwertowane są tylko końce linii. Jest to domyślny tryb -konwersji. -.Sp -Mimo że nazwa tego trybu to \s-1ASCII,\s0 które jest standardem 7\-bitowym, jest to -tryb 8\-bitowy. Należy zawsze używać tego trybu przy konwersji plików Unicode -\&\s-1UTF\-8.\s0 -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -W tym trybie wszystkie znaki 8\-bitowe spoza \s-1ASCII \s0(o wartościach od 128 do -255) są konwertowane do przestrzeni 7\-bitowej. -.IP "\fBiso\fR" 4 -.IX Item "iso" -W tym trybie znaki są konwertowane między zestawem znaków \s-1DOS \s0(stroną -kodową) a zestawem znaków \s-1ISO\-8859\-1 \s0(Latin\-1) używanym na Uniksie. Znaki -DOS-owe nie mające odpowiednika w \s-1ISO\-8859\-1,\s0 których nie da się -przekonwertować, są zamieniane na kropkę. To samo dotyczy znaków \s-1ISO\-8859\-1\s0 -bez odpowiednika w DOS-ie. -.Sp -Jeśli używana jest tylko opcja \f(CW\*(C`\-iso\*(C'\fR, dos2unix próbuje wykryć aktywną -stronę kodową. Jeśli nie jest to możliwe, dos2unix używa domyślnej strony -kodowej \s-1CP437,\s0 stosowanej głównie w \s-1USA.\s0 Aby wymusić określoną stronę -kodową, należy użyć opcji \f(CW\*(C`\-437\*(C'\fR (\s-1US\s0), \f(CW\*(C`\-850\*(C'\fR (zachodnioeuropejska), -\&\f(CW\*(C`\-860\*(C'\fR (portugalska), \f(CW\*(C`\-863\*(C'\fR (kanadyjska francuska) lub \f(CW\*(C`\-865\*(C'\fR -(nordycka). Ponadto obsługiwana jest strona kodowa Windows \s-1CP1252 -\&\s0(zachodnioeuropejska) przy użyciu opcji \f(CW\*(C`\-1252\*(C'\fR. W przypadku innych stron -kodowych można użyć narzędzia dos2unix wraz z \fIiconv\fR\|(1). Iconv potrafi -konwertować między wieloma kodowaniami znaków. -.Sp -Nigdy nie należy używać konwersji \s-1ISO\s0 na plikach tekstowych w -Unicode. Uszkodziłaby pliki kodowane \s-1UTF\-8.\s0 -.Sp -Kilka przykładów: -.Sp -Konwersja z domyślnej strony kodowej \s-1DOS\s0 do uniksowego Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-iso \-n in.txt out.txt -.Ve -.Sp -Konwersja ze strony kodowej \s-1DOS CP850\s0 do uniksowego Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-850 \-n in.txt out.txt -.Ve -.Sp -Konwersja ze strony kodowej Windows \s-1CP1252\s0 do uniksowego Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n in.txt out.txt -.Ve -.Sp -Konwersja ze strony kodowej Windows \s-1CP1252\s0 do uniksowego \s-1UTF\-8 \s0(Unicode): -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 in.txt | dos2unix > out.txt -.Ve -.Sp -Konwersa z uniksowego Latin\-1 do domyślnej strony kodowej \s-1DOS:\s0 -.Sp -.Vb 1 -\& unix2dos \-iso \-n in.txt out.txt -.Ve -.Sp -Konwersja z uniksowego Latin\-1 do strony kodowej \s-1DOS CP850:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n in.txt out.txt -.Ve -.Sp -Konwersja z uniksowego Latin\-1 do strony kodowej Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos \-1252 \-n in.txt out.txt -.Ve -.Sp -Konwersja z uniksowego \s-1UTF\-8 \s0(Unicode) do strony kodowej Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t CP1252 > out.txt -.Ve -.Sp -Więcej pod adresem oraz -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Kodowania" -.IX Subsection "Kodowania" -Istnieją różne kodowania Unicode. Pod Uniksem i Linuksem pliki Unicode są -zwykle kodowane z użyciem \s-1UTF\-8.\s0 Pod Windows pliki tekstowe Unicode mogą być -kodowane w \s-1UTF\-8, UTF\-16, UTF\-16\s0 big-endian, ale przeważnie są kodowane w -\&\s-1UTF\-16.\s0 -.SS "Konwersje" -.IX Subsection "Konwersje" -Pliki tekstowe Unicode mogą mieć znaki końca linii systemu \s-1DOS,\s0 Unix lub -Mac, podobnie jak zwykłe pliki tekstowe. -.PP -Wszystkie wersje dos2unix i unix2dos potrafią konwertować pliki kodowane -\&\s-1UTF\-8,\s0 ponieważ \s-1UTF\-8\s0 jest wstecznie zgodne z \s-1ASCII.\s0 -.PP -Dos2unix i unix2dos z obsługą Unicode \s-1UTF\-16\s0 potrafią odczytywać pliki -tekstowe kodowane \s-1UTF\-16\s0 little\- oraz big-endian. Aby sprawdzić, czy -dos2unix został zbudowany z obsługą \s-1UTF\-16,\s0 należy napisać \f(CW\*(C`dos2unix \-V\*(C'\fR. -.PP -Pod Uniksem/Linuksem pliki w kodowaniu \s-1UTF\-16\s0 są konwertowane do kodowania -znaków ustawionej lokalizacji. Kodowanie znaków dla lokalizacji można -sprawdzić poleceniem \fIlocale\fR\|(1). Jeśli konwersja nie jest możliwa, wystąpi -błąd, a plik zostanie pominięty. -.PP -Pod Windows pliki \s-1UTF\-16\s0 są domyślnie konwertowane do \s-1UTF\-8.\s0 Pliki tekstkowe -w kodowaniu \s-1UTF\-8\s0 są dobrze obsługiwane zarówno pod Windows, jak i -Uniksem/Linuksem. -.PP -Kodowania \s-1UTF\-16\s0 i \s-1UTF\-8\s0 są w pełni zgodne, konwersja nie spowoduje utraty -żadnej części tekstu. W przypadku wystąpienia błędu konwersji, na przykład w -przypadku błędu w pliku wejściowym \s-1UTF\-16,\s0 plik zostanie pominięty. -.PP -W przypadku użycia opcji \f(CW\*(C`\-u\*(C'\fR, plik wejściowy zostanie zapisany w tym samym -kodowaniu \s-1UTF\-16,\s0 co plik wejściowy. Opcja \f(CW\*(C`\-u\*(C'\fR zapobiega konwersji do -\&\s-1UTF\-8.\s0 -.PP -Dos2unix oraz unix2dos nie mają opcji pozwalającej na konwersję plików \s-1UTF\-8\s0 -do \s-1UTF\-16.\s0 -.PP -Tryby konwersji \s-1ISO\s0 i 7\-bit nie działają na plikach \s-1UTF\-16.\s0 -.SS "Znacznik \s-1BOM\s0" -.IX Subsection "Znacznik BOM" -W systemie Windows pliki tekstowe zwykle zawierają znacznik \s-1BOM \s0(Byte Order -Mark), ponieważ wiele programów dla Windows (w tym Notepad) dodaje domyślnie -znaczniki \s-1BOM.\s0 Więcej informacji można znaleźć pod adresem -. -.PP -Pod Uniksem pliki Unicode zwykle nie mają znacznika \s-1BOM.\s0 Pliki tekstowe są -traktowane jako kodowane zgodnie z kodowaniem znaków ustawionej lokalizacji. -.PP -Dos2unix potrafi wykryć tylko, czy plik jest w formacie \s-1UTF\-16,\s0 jeśli -zawiera znacznik \s-1BOM.\s0 Jeśli plik \s-1UTF\-16\s0 nie ma tego znacznika, dos2unix -potraktuje plik jako binarny. -.PP -Do konwersji pliku \s-1UTF\-16\s0 bez znacznika \s-1BOM\s0 można użyć opcji \f(CW\*(C`\-ul\*(C'\fR lub -\&\f(CW\*(C`\-ub\*(C'\fR. -.PP -Dos2unix nie zapisuje domyślnie znaku \s-1BOM\s0 w pliku wyjściowym. Z opcją \f(CW\*(C`\-b\*(C'\fR -Dos2unix zapisuje \s-1BOM,\s0 jeśli plik wejściowy zawiera \s-1BOM.\s0 -.PP -Unix2dos domyślnie zapisuje znaczniki \s-1BOM\s0 w pliku wyjściowym, jeśli plik -wejściowy ma \s-1BOM.\s0 Aby usunąć \s-1BOM,\s0 można użyć opcji \f(CW\*(C`\-r\*(C'\fR. -.PP -Dos2unix oraz unix2dos zawsze zapisują znaczniki \s-1BOM,\s0 jeśli użyta zostanie -opcja \f(CW\*(C`\-m\*(C'\fR. -.SS "Przykłady Unicode" -.IX Subsection "Przykłady Unicode" -Konwersja pliku \s-1UTF\-16 \s0(z \s-1BOM\s0) z formatu Windows do uniksowego \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-n in.txt out.txt -.Ve -.PP -Konwersja pliku \s-1UTF\-16LE \s0(bez \s-1BOM\s0) z formatu Windows do uniksowego \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-ul \-n in.txt out.txt -.Ve -.PP -Konwersja z uniksowego \s-1UTF\-8\s0 do \s-1UTF\-8\s0 z \s-1BOM\s0 dla Windows: -.PP -.Vb 1 -\& unix2dos \-m \-n in.txt out.txt -.Ve -.PP -Konwersja z uniksowego \s-1UTF\-8\s0 do \s-1UTF\-16\s0 dla Windows: -.PP -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t UTF\-16 > out.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 to standard urzędowy w Chinach. Obowiązkowy podzbiór standardu -\&\s-1GB18030\s0 jest oficjalnym wymaganiem każdego oprogramowania sprzedawanego w -Chinach. Więcej pod adresem . -.PP -\&\s-1GB18030\s0 jest w pełni zgodny z Unicode i może być uważany za format -transformacji unikodu. Podobnie jak \s-1UTF\-8, GB18030\s0 jest zgodny z \s-1ASCII.\s0 Jest -także zgodny ze stroną kodową Windows 936, znaną też jako \s-1GBK.\s0 -.PP -Pod Uniksem/Linuksem pliki \s-1UTF\-16\s0 są konwertowane do \s-1GB18030,\s0 jeśli -kodowanie dla lokalizacji jest ustawione na \s-1GB18030.\s0 Uwaga: będzie to -działać tylko dla lokalizacji chińskiej. W przypadku np. ustawienia -lokalizacji angielskiej/brytyjskiej \f(CW\*(C`en_GB.GB18030\*(C'\fR konwersja \s-1UTF\-16\s0 do -\&\s-1GB18030\s0 nie będzie działać, a dla lokalizacji chińskiej \f(CW\*(C`zh_CN.GB18030\*(C'\fR -będzie. -.PP -Pod Windows w celu konwersji plików \s-1UTF\-16\s0 do \s-1GB18030\s0 należy użyć opcji -\&\f(CW\*(C`\-gb\*(C'\fR. -.PP -Pliki w kodowaniu \s-1GB18030\s0 mogą mieć znacznik \s-1BOM,\s0 podobnie jak pliki w -Unicode. -.SH "PRZYKŁADY" -.IX Header "PRZYKŁADY" -Odczyt ze standardowego wejścia i zapis na standardowe wyjście: -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Konwersja i zastąpienie a.txt; konwersja i zastąpienie b.txt: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Konwersja i zastąpienie a.txt w trybie ascii: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Konwersja i zastąpienie a.txt w trybie ascii; konwersja i zastąpienie b.txt -w trybie 7\-bitowym: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Konwersja a.txt z formatu Mac do formatu uniksowego: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Konwersja a.txt z formatu uniksowego do formatu Mac: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Konwersja i zastąpienie a.txt z zachowaniem oryginalnego znacznika czasu: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Konwersja a.txt i zapis do e.txt: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Konwersja a.txt i zapis do e.txt z zachowaniem znacznika czasu e.txt -takiego, jak a.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Konwersja i zastąpienie a.txt; konwersja b.txt i zapis do e.txt: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Konwersja c.txt i zapis do e.txt; konwersja i zastąpienie a.txt; konwersja i -zastąpienie b.txt; konwersja d.txt i zapis do f.txt: -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "KONWERSJA REKURENCYJNA" -.IX Header "KONWERSJA REKURENCYJNA" -Można użyć dos2unix w połączeniu z poleceniami \fIfind\fR\|(1) i \fIxargs\fR\|(1) do -rekurencyjnej konwersji plików tekstowych w strukturze drzewa katalogów. Na -przykład, aby przekonwertować wszystkie pliki .txt w drzewie katalogów -poniżej katalogu bieżącego, należy napisać: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "LOKALIZACJA" -.IX Header "LOKALIZACJA" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -Główny język wybiera się zmienną środowiskową \s-1LANG.\s0 Zmienna \s-1LANG\s0 składa się -z kilku części. Pierwsza część to małe litery oznaczające kod języka. Druga -część jest opcjonalna i zawiera kod kraju pisany wielkimi literami, -poprzedzony podkreśleniem. Jest także opcjonalna trzecia część: kodowanie -znaków, poprzedzone kropką. Kilka przykładów dla powłok zgodnych ze -standardem \s-1POSIX:\s0 -.Sp -.Vb 7 -\& export LANG=nl holenderski -\& export LANG=nl_NL holenderski, Holandia -\& export LANG=nl_BE holenderski, Belgia -\& export LANG=es_ES hiszpański, Hiszpania -\& export LANG=es_MX hiszpański, Meksyk -\& export LANG=en_US.iso88591 angielski, USA, kodowanie Latin\-1 -\& export LANG=en_GB.UTF\-8 angielski, Wlk. Brytania, kodowanie UTF\-8 -.Ve -.Sp -Pełną listę kodów języków i krajów można znaleźć w podręczniku do gettexta: - -.Sp -W systemach uniksowych do uzyskania informacji dotyczących lokalizacji można -użyć polecenia \fIlocale\fR\|(1). -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -Przy użyciu zmiennej środowiskowej \s-1LANGUAGE\s0 można określić listę języków wg -priorytetu, oddzielonych dwukropkami. Dos2unix przyjmuje pierwszeństwo -zmiennej \s-1LANGUAGE\s0 nad \s-1LANG.\s0 Na przykład, najpierw holenderski, następnie -niemiecki: \f(CW\*(C`LANGUAGE=nl:de\*(C'\fR. Aby skorzystać z listy wg priorytetów ze -zmiennej \s-1LANGUAGE,\s0 trzeba najpierw włączyć lokalizację przez ustawienie -zmiennej \s-1LANG \s0(lub \s-1LC_ALL\s0) na wartość inną niż \*(L"C\*(R". Więcej informacji -znajduje się w podręczniku do gettexta: - -.Sp -W przypadku wybrania niedostępnego języka, otrzymamy standardowe, angielskie -komunikaty. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Przy użyciu zmiennej środowiskowej \s-1DOS2UNIX_LOCALEDIR,\s0 można nadpisać -ustawienie \s-1LOCALEDIR\s0 z czasu kompilacji. \s-1LOCALEDIR\s0 to katalog używany do -znalezienia plików lokalizacji. Domyślną wartością dla \s-1GNU\s0 jest -\&\f(CW\*(C`/usr/local/share/locale\*(C'\fR. Opcja \fB\-\-version\fR wyświetla używaną wartość -\&\s-1LOCALEDIR.\s0 -.Sp -Przykład (dla powłoki \s-1POSIX\s0): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "WARTOŚĆ ZWRACANA" -.IX Header "WARTOŚĆ ZWRACANA" -W przypadku powodzenia zwracane jest zero. Jeśli wystąpi błąd systemowy, -zwracany jest ostatni błąd systemowy. W przypadku innych błędów zwracane -jest 1. -.PP -Wartość zwracana w trybie cichym to zawsze zero, z wyjątkiem sytuacji -podania błędnych opcji linii poleceń. -.SH "STANDARDY" -.IX Header "STANDARDY" - -.PP - -.PP - -.PP - -.SH "AUTORZY" -.IX Header "AUTORZY" -Benjamin Lin ; Bernd Johannes Wuebben (tryb mac2unix) -; Christian Wurll (dodawanie dodatkowej nowej linii) -; Erwin Waterlander (prowadzący) -.PP -Strona projektu: -.PP -Strona SourceForge: -.SH "ZOBACZ TAKŻE" -.IX Header "ZOBACZ TAKŻE" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/pl/man1/unix2mac.1 b/Tools/dos2unix/share/man/pl/man1/unix2mac.1 deleted file mode 100644 index 1062354..0000000 --- a/Tools/dos2unix/share/man/pl/man1/unix2mac.1 +++ /dev/null @@ -1,756 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NAZWA" -.IX Header "NAZWA" -dos2unix \- konwerter formatu plików tekstowych między systemami DOS/Mac a -Uniksem -.SH "SKŁADNIA" -.IX Header "SKŁADNIA" -.Vb 2 -\& dos2unix [opcje] [PLIK ...] [\-n PLIK_WEJ PLIK_WYJ ...] -\& unix2dos [opcje] [PLIK ...] [\-n PLIK_WEJ PLIK_WYJ ...] -.Ve -.SH "OPIS" -.IX Header "OPIS" -Pakiet Dos2unix zawiera narzędzia \f(CW\*(C`dos2unix\*(C'\fR oraz \f(CW\*(C`unix2dos\*(C'\fR do konwersji -zwykłych plików tekstowych między formatami używanymi w systemach \s-1DOS\s0 lub -Mac a formatem uniksowym. -.PP -W plikach tekstowych systemu DOS/Windows oznaczenie końca linii to -połączenie dwóch znaków: powrotu karetki (\s-1CR\s0) i przesunięcia linii (\s-1LF\s0). W -uniksowych plikach tekstowych koniec linii to pojedynczy znak \s-1LF. W\s0 plikach -tekstowych systemu Mac sprzed Mac \s-1OS X\s0 koniec linii był pojedynczym znakiem -\&\s-1CR.\s0 Obecnie Mac \s-1OS\s0 wykorzystuje uniksowe końce linii (\s-1LF\s0). -.PP -Oprócz oznaczeń końców linii Dos2unix potrafi konwertować także kodowanie -plików. Kilko stron kodowych DOS-a może być przekonwertowanych do uniksowego -Latin\-1, a windowsowy Unicode (\s-1UTF\-16\s0) do powszechniejszego pod Uniksem -kodowania Unicode \s-1UTF\-8.\s0 -.PP -Pliki binarne są pomijane automatycznie, chyba że konwersja zostanie -wymuszona. -.PP -Pliki inne niż zwykłe, np. katalogi lub \s-1FIFO,\s0 są pomijane automatycznie. -.PP -Dowiązania symboliczne i ich cele są domyślnie pozostawiane bez -zmian. Dowiązania symboliczne mogą być opcjonalnie zastępowane, albo wyjście -może być zapisywane do celu dowiązania. Zapis do celu dowiązania -symbolicznego nie jest obsługiwane pod Windows. -.PP -Dos2unix powstał na podstawie narzędzia dos2unix z systemu -SunOS/Solaris. Jest jedna istotna różnica w stosunku do oryginalnej wersji z -SunOS\-a/Solarisa: ta wersja domyślnie wykonuje konwersję w miejscu (tryb -starego pliku), podczas gdy oryginalna obsługiwała tylko konwersję parami -(tryb nowego pliku) \- p. także opcje \f(CW\*(C`\-o\*(C'\fR i \f(CW\*(C`\-n\*(C'\fR. -.SH "OPCJE" -.IX Header "OPCJE" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Potraktowanie wszystkich kolejnych opcji jako nazw plików. Tej opcji należy -użyć, aby przekonwertować pliki, których nazwy zaczynają się od -minusa. Przykładowo, aby przekonwertować plik o nazwie \*(L"\-foo\*(R", można użyć -polecenia: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -Lub w trybie nowego pliku: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo out.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Konwersja tylko znaków końca linii. Jest to domyślny tryb konwersji. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Konwersja między zestawami znaków \s-1DOS\s0 i \s-1ISO\-8859\-1.\s0 Więcej w sekcji \s-1TRYBY -KONWERSJI.\s0 -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Użycie strony kodowej Windows 1252 (zachodnioeuropejskiej). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -Użycie strony kodowej \s-1DOS 437 \s0(\s-1US\s0). Jest to domyślna strona kodowa używana -przy konwersji \s-1ISO.\s0 -.IP "\fB\-850\fR" 4 -.IX Item "-850" -Użycie strony kodowej \s-1DOS 850 \s0(zachodnioeuropejskiej). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -Użycie strony kodowej \s-1DOS 860 \s0(portugalskiej). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -Użycie strony kodowej \s-1DOS 863 \s0(kanadyjskiej francuskiej). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -Użycie strony kodowej \s-1DOS 865 \s0(nordyckiej). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Konwersja znaków 8\-bitowych do przestrzeni 7\-bitowej. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Zachowanie znaku \s-1BOM \s0(Byte Order Makr). Jeżeli plik wejściowy zawiera \s-1BOM,\s0 -powoduje zapisanie go w pliku wyjściowym. Jest to domyślne zachowanie przy -konwersji na DOS-owe końce linii. P. także opcja \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode \s-1TRYB_KONW\s0\fR" 4 -.IX Item "-c, --convmode TRYB_KONW" -Ustawienie trybu konwersji. \s-1TRYB_KONW\s0 to jeden z: \fIascii\fR, \fI7bit\fR, \fIiso\fR, -\&\fImac\fR, przy czym domyślny jest ascii. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -Wymuszenie konwersji plików binarnych. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -Pod Windows pliki w \s-1UTF\-16\s0 są domyślnie konwertowane do \s-1UTF\-8,\s0 niezależnie -od ustawienia lokalizacji. Ta opcja pozwala przekonwertować pliki w \s-1UTF\-16\s0 -do \s-1GB18030.\s0 Opcja jest dostępna tylko pod Windows, więcej w sekcji -dotyczącej \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -Wyświetlenie opisu i zakończenie. -.IP "\fB\-i[\s-1FLAGI\s0], \-\-info[=FLAGI] \s-1PLIK ...\s0\fR" 4 -.IX Item "-i[FLAGI], --info[=FLAGI] PLIK ..." -Wyświetlenie informacji o pliku. Konwersja nie jest wykonywana. -.Sp -Wypisywane są następujące informacje, w tej kolejności: liczba DOS-owych -końców linii, liczba uniksowych końców linii, liczba macowych końców linii, -znacznik \s-1BOM,\s0 tekstowy lub binarny, nazwa pliku. -.Sp -Przykładowe wyjście: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Opcjonalnie można ustawić dodatkowe flagi, aby zmienić wyjście. Można dodać -jedną lub więcej flag. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Wypisanie liczby DOS-owych końców linii. -.IP "\fBu\fR" 4 -.IX Item "u" -Wypisanie liczby uniksowych końców linii. -.IP "\fBm\fR" 4 -.IX Item "m" -Wypisanie liczby macowych końców linii. -.IP "\fBb\fR" 4 -.IX Item "b" -Wypisanie znacznika \s-1BOM.\s0 -.IP "\fBt\fR" 4 -.IX Item "t" -Wypisanie, czy plik jest tekstowy, czy binarny. -.IP "\fBc\fR" 4 -.IX Item "c" -Wypisanie tylko plików, które zostałyby przekonwertowane. -.Sp -Z flagą \f(CW\*(C`c\*(C'\fR dos2unix wypisze tylko pliki zawierające DOS-owe końce linii, a -unix2dos wypisze tylko nazwy plików zawierających uniksowe końce linii. -.RE -.RS 4 -.Sp -Przykłady: -.Sp -Pokazanie informacji o wszystkich plikach *.txt: -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Pokazanie tylko liczby DOS-owych i uniksowych końców linii: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Pokazanie tylko znacznika \s-1BOM:\s0 -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -Wypisanie listy plików zawierających DOS-owe końce linii: -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -Wypisanie listy plików zawierających uniksowe końce linii: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -Zachowanie znacznika czasu pliku wyjściowego takiego samego, jak pliku -wejściowego. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -Wyświetlenie licencji programu. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -Dodanie dodatkowego znaku końca linii. -.Sp -\&\fBdos2unix\fR: tylko DOS-owe znaki końca linii są zamieniane na dwa -uniksowe. W trybie Mac tylko macowe znaki końca linii są zamieniane na dwa -uniksowe. -.Sp -\&\fBunix2dos\fR: tylko uniksowe znaki końca linii są zamieniane na dwa -DOS-owe. W trybie Mac uniksowe znaki końca linii są zamieniane na dwa -macowe. -.IP "\fB\-m, \-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -Zapisanie znacznika \s-1BOM \s0(Byte Order Mark) w pliku wyjściowym. Domyślnie -zapisywany jest \s-1BOM UTF\-8.\s0 -.Sp -Jeśli plik wejściowy jest w kodowaniu \s-1UTF\-16\s0 i użyto opcji \f(CW\*(C`\-u\*(C'\fR, zostanie -zapisany \s-1BOM UTF\-16.\s0 -.Sp -Nigdy nie należy używać tej opcji, jeśli kodowanie wyjściowe jest inne niż -\&\s-1UTF\-8\s0 lub \s-1UTF\-16.\s0 Więcej w sekcji \s-1UNICODE.\s0 -.IP "\fB\-n, \-\-newfile \s-1PLIK_WEJ PLIK_WYJ ...\s0\fR" 4 -.IX Item "-n, --newfile PLIK_WEJ PLIK_WYJ ..." -Tryb nowego pliku. Konwersja \s-1PLIKU_WEJ\s0 z zapisem wyjścia do \s-1PLIKU_WYJ.\s0 Nazwy -plików muszą być podane parami, a masek \fInie\fR należy używać, gdyż -\&\fIspowoduje\fR to utratę plików. -.Sp -Osoba uruchamiająca konwersję w trybie nowego pliku (par) będzie -właścicielem przekonwertowanego pliku. Prawa odczytu/zapisu nowego pliku -będą pochodziły z praw pliku oryginalnego po odjęciu \fIumask\fR\|(1) osoby -uruchamiającej konwersję. -.IP "\fB\-o, \-\-oldfile \s-1PLIK ...\s0\fR" 4 -.IX Item "-o, --oldfile PLIK ..." -Tryb starego pliku. Konwersja \s-1PLIKU\s0 i nadpisanie go wyjściem. Program działa -domyślnie w tym trybie. Można używać masek. -.Sp -W trybie starego pliku (w miejscu) przekonwertowany plik otrzymuje tego -samego właściciela, grupę oraz prawa odczytu/zapisu, jak plik oryginalny \- -także wtedy, gdy plik jest konwertowany przez innego użytkownika, mającego -prawo zapisu do pliku (np. przez użytkownika root). Konwersja zostanie -przerwana, jeśli nie będzie możliwe zachowanie oryginalnych wartości. Zmiana -właściciela mogłaby oznaczać, że pierwotny właściciel nie może już odczytać -pliku. Zmiana grupy mogłaby być zagrożeniem bezpieczeństwa, plik mógłby być -czytelny dla nie zamierzonych osób. Zachowanie właściciela, grupy i praw -odczytu/zapisu jest obsługiwane tylko na Uniksie. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Tryb cichy. Pominięcie wszystkich ostrzeżeń i komunikatów. Zwracanym kodem -jest zero, chyba że podano błędne opcje linii poleceń. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -Usunięcie znaków \s-1BOM \s0(Byte Order Mark). Bez zapisywania \s-1BOM\s0 do pliku -wyjściowego. Jest to domyślne zachowanie przy konwersji na uniksowe końce -linii. P. także opcja \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s, \-\-safe\fR" 4 -.IX Item "-s, --safe" -Pominięcie plików binarnych (domyślne). -.IP "\fB\-u, \-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -Zachowanie oryginalnego kodowania pliku wejściowego \s-1UTF\-16.\s0 Plik wyjściowy -zostanie zapisany w tym samym kodowaniu \s-1UTF\-16 \s0(little lub big endian), co -plik wejściowy. Zapobiega to przekształceniu do \s-1UTF\-8.\s0 Do pliku zostanie -zapisany odpowiedni znacznik \s-1BOM UTF\-16.\s0 Tę opcję można wyłączyć opcją -\&\f(CW\*(C`\-ascii\*(C'\fR. -.IP "\fB\-ul, \-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -Przyjęcie, że format pliku wejściowego to \s-1UTF\-16LE.\s0 -.Sp -Jeśli w pliku wejściowym jest znacznik \s-1BOM \s0(Byte Order Mark), ma on -priorytet nad tą opcją. -.Sp -Jeśli przyjęto błędne założenie (plik wejściowy nie jest w formacie -\&\s-1UTF\-16LE\s0), a konwersja się uda, wynikiem będzie plik wyjściowy \s-1UTF\-8\s0 ze złym -tekstem. Konwersję tę można odwrócić przy użyciu polecenia \fIiconv\fR\|(1) do -konwersji wyjścia \s-1UTF\-8\s0 z powrotem do \s-1UTF\-16LE.\s0 Przywróci to plik -oryginalny. -.Sp -Przyjęcie \s-1UTF\-16LE\s0 działa jako \fItryb konwersji\fR. Przy przełączeniu na -domyślny tryb \fIascii\fR przyjęcie \s-1UTF\-16LE\s0 jest wyłączane. -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -Przyjęcie, że format pliku wejściowego to \s-1UTF\-16BE.\s0 -.Sp -Ta opcja działa analogicznie do \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v, \-\-verbose\fR" 4 -.IX Item "-v, --verbose" -Wyświetlanie szczegółowych komunikatów. Wyświetlane śa dodatkowe informacje -o znacznikach \s-1BOM \s0(Byte Order Mark) oraz liczbie przekonwertowanych końców -linii. -.IP "\fB\-F, \-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -Podążanie za dowiązaniami symbolicznymi i konwertowanie ich celów -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Zastępowanie dowiązań symbolicznych przekonwertowanymi plikami (oryginalne -pliki docelowe pozostają bez zmian). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -Pozostawienie dowiązań symbolicznych i celów bez zmian (domyślne). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -Wyświetlenie informacji o wersji i zakończenie. -.SH "TRYB MAC" -.IX Header "TRYB MAC" -W zwykłym trybie znaki końca linii są konwertowane z DOS-a do Uniksa i -odwrotnie. Znaki końca linii systemu Mac nie są konwertowane. -.PP -W trybie Mac znaki końca linii są konwertowane z formatu Maca do Uniksa i -odwrotnie. Znaki końca linii systemu \s-1DOS\s0 nie są zmieniane. -.PP -Aby uruchomić program w trybie Mac, należy użyć opcji linii poleceń \f(CW\*(C`\-c -mac\*(C'\fR albo użyć poleceń \f(CW\*(C`mac2unix\*(C'\fR lub \f(CW\*(C`unix2mac\*(C'\fR. -.SH "TRYBY KONWERSJI" -.IX Header "TRYBY KONWERSJI" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -W trybie \f(CW\*(C`ascii\*(C'\fR konwertowane są tylko końce linii. Jest to domyślny tryb -konwersji. -.Sp -Mimo że nazwa tego trybu to \s-1ASCII,\s0 które jest standardem 7\-bitowym, jest to -tryb 8\-bitowy. Należy zawsze używać tego trybu przy konwersji plików Unicode -\&\s-1UTF\-8.\s0 -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -W tym trybie wszystkie znaki 8\-bitowe spoza \s-1ASCII \s0(o wartościach od 128 do -255) są konwertowane do przestrzeni 7\-bitowej. -.IP "\fBiso\fR" 4 -.IX Item "iso" -W tym trybie znaki są konwertowane między zestawem znaków \s-1DOS \s0(stroną -kodową) a zestawem znaków \s-1ISO\-8859\-1 \s0(Latin\-1) używanym na Uniksie. Znaki -DOS-owe nie mające odpowiednika w \s-1ISO\-8859\-1,\s0 których nie da się -przekonwertować, są zamieniane na kropkę. To samo dotyczy znaków \s-1ISO\-8859\-1\s0 -bez odpowiednika w DOS-ie. -.Sp -Jeśli używana jest tylko opcja \f(CW\*(C`\-iso\*(C'\fR, dos2unix próbuje wykryć aktywną -stronę kodową. Jeśli nie jest to możliwe, dos2unix używa domyślnej strony -kodowej \s-1CP437,\s0 stosowanej głównie w \s-1USA.\s0 Aby wymusić określoną stronę -kodową, należy użyć opcji \f(CW\*(C`\-437\*(C'\fR (\s-1US\s0), \f(CW\*(C`\-850\*(C'\fR (zachodnioeuropejska), -\&\f(CW\*(C`\-860\*(C'\fR (portugalska), \f(CW\*(C`\-863\*(C'\fR (kanadyjska francuska) lub \f(CW\*(C`\-865\*(C'\fR -(nordycka). Ponadto obsługiwana jest strona kodowa Windows \s-1CP1252 -\&\s0(zachodnioeuropejska) przy użyciu opcji \f(CW\*(C`\-1252\*(C'\fR. W przypadku innych stron -kodowych można użyć narzędzia dos2unix wraz z \fIiconv\fR\|(1). Iconv potrafi -konwertować między wieloma kodowaniami znaków. -.Sp -Nigdy nie należy używać konwersji \s-1ISO\s0 na plikach tekstowych w -Unicode. Uszkodziłaby pliki kodowane \s-1UTF\-8.\s0 -.Sp -Kilka przykładów: -.Sp -Konwersja z domyślnej strony kodowej \s-1DOS\s0 do uniksowego Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-iso \-n in.txt out.txt -.Ve -.Sp -Konwersja ze strony kodowej \s-1DOS CP850\s0 do uniksowego Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-850 \-n in.txt out.txt -.Ve -.Sp -Konwersja ze strony kodowej Windows \s-1CP1252\s0 do uniksowego Latin\-1: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n in.txt out.txt -.Ve -.Sp -Konwersja ze strony kodowej Windows \s-1CP1252\s0 do uniksowego \s-1UTF\-8 \s0(Unicode): -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 in.txt | dos2unix > out.txt -.Ve -.Sp -Konwersa z uniksowego Latin\-1 do domyślnej strony kodowej \s-1DOS:\s0 -.Sp -.Vb 1 -\& unix2dos \-iso \-n in.txt out.txt -.Ve -.Sp -Konwersja z uniksowego Latin\-1 do strony kodowej \s-1DOS CP850:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n in.txt out.txt -.Ve -.Sp -Konwersja z uniksowego Latin\-1 do strony kodowej Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos \-1252 \-n in.txt out.txt -.Ve -.Sp -Konwersja z uniksowego \s-1UTF\-8 \s0(Unicode) do strony kodowej Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t CP1252 > out.txt -.Ve -.Sp -Więcej pod adresem oraz -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Kodowania" -.IX Subsection "Kodowania" -Istnieją różne kodowania Unicode. Pod Uniksem i Linuksem pliki Unicode są -zwykle kodowane z użyciem \s-1UTF\-8.\s0 Pod Windows pliki tekstowe Unicode mogą być -kodowane w \s-1UTF\-8, UTF\-16, UTF\-16\s0 big-endian, ale przeważnie są kodowane w -\&\s-1UTF\-16.\s0 -.SS "Konwersje" -.IX Subsection "Konwersje" -Pliki tekstowe Unicode mogą mieć znaki końca linii systemu \s-1DOS,\s0 Unix lub -Mac, podobnie jak zwykłe pliki tekstowe. -.PP -Wszystkie wersje dos2unix i unix2dos potrafią konwertować pliki kodowane -\&\s-1UTF\-8,\s0 ponieważ \s-1UTF\-8\s0 jest wstecznie zgodne z \s-1ASCII.\s0 -.PP -Dos2unix i unix2dos z obsługą Unicode \s-1UTF\-16\s0 potrafią odczytywać pliki -tekstowe kodowane \s-1UTF\-16\s0 little\- oraz big-endian. Aby sprawdzić, czy -dos2unix został zbudowany z obsługą \s-1UTF\-16,\s0 należy napisać \f(CW\*(C`dos2unix \-V\*(C'\fR. -.PP -Pod Uniksem/Linuksem pliki w kodowaniu \s-1UTF\-16\s0 są konwertowane do kodowania -znaków ustawionej lokalizacji. Kodowanie znaków dla lokalizacji można -sprawdzić poleceniem \fIlocale\fR\|(1). Jeśli konwersja nie jest możliwa, wystąpi -błąd, a plik zostanie pominięty. -.PP -Pod Windows pliki \s-1UTF\-16\s0 są domyślnie konwertowane do \s-1UTF\-8.\s0 Pliki tekstkowe -w kodowaniu \s-1UTF\-8\s0 są dobrze obsługiwane zarówno pod Windows, jak i -Uniksem/Linuksem. -.PP -Kodowania \s-1UTF\-16\s0 i \s-1UTF\-8\s0 są w pełni zgodne, konwersja nie spowoduje utraty -żadnej części tekstu. W przypadku wystąpienia błędu konwersji, na przykład w -przypadku błędu w pliku wejściowym \s-1UTF\-16,\s0 plik zostanie pominięty. -.PP -W przypadku użycia opcji \f(CW\*(C`\-u\*(C'\fR, plik wejściowy zostanie zapisany w tym samym -kodowaniu \s-1UTF\-16,\s0 co plik wejściowy. Opcja \f(CW\*(C`\-u\*(C'\fR zapobiega konwersji do -\&\s-1UTF\-8.\s0 -.PP -Dos2unix oraz unix2dos nie mają opcji pozwalającej na konwersję plików \s-1UTF\-8\s0 -do \s-1UTF\-16.\s0 -.PP -Tryby konwersji \s-1ISO\s0 i 7\-bit nie działają na plikach \s-1UTF\-16.\s0 -.SS "Znacznik \s-1BOM\s0" -.IX Subsection "Znacznik BOM" -W systemie Windows pliki tekstowe zwykle zawierają znacznik \s-1BOM \s0(Byte Order -Mark), ponieważ wiele programów dla Windows (w tym Notepad) dodaje domyślnie -znaczniki \s-1BOM.\s0 Więcej informacji można znaleźć pod adresem -. -.PP -Pod Uniksem pliki Unicode zwykle nie mają znacznika \s-1BOM.\s0 Pliki tekstowe są -traktowane jako kodowane zgodnie z kodowaniem znaków ustawionej lokalizacji. -.PP -Dos2unix potrafi wykryć tylko, czy plik jest w formacie \s-1UTF\-16,\s0 jeśli -zawiera znacznik \s-1BOM.\s0 Jeśli plik \s-1UTF\-16\s0 nie ma tego znacznika, dos2unix -potraktuje plik jako binarny. -.PP -Do konwersji pliku \s-1UTF\-16\s0 bez znacznika \s-1BOM\s0 można użyć opcji \f(CW\*(C`\-ul\*(C'\fR lub -\&\f(CW\*(C`\-ub\*(C'\fR. -.PP -Dos2unix nie zapisuje domyślnie znaku \s-1BOM\s0 w pliku wyjściowym. Z opcją \f(CW\*(C`\-b\*(C'\fR -Dos2unix zapisuje \s-1BOM,\s0 jeśli plik wejściowy zawiera \s-1BOM.\s0 -.PP -Unix2dos domyślnie zapisuje znaczniki \s-1BOM\s0 w pliku wyjściowym, jeśli plik -wejściowy ma \s-1BOM.\s0 Aby usunąć \s-1BOM,\s0 można użyć opcji \f(CW\*(C`\-r\*(C'\fR. -.PP -Dos2unix oraz unix2dos zawsze zapisują znaczniki \s-1BOM,\s0 jeśli użyta zostanie -opcja \f(CW\*(C`\-m\*(C'\fR. -.SS "Przykłady Unicode" -.IX Subsection "Przykłady Unicode" -Konwersja pliku \s-1UTF\-16 \s0(z \s-1BOM\s0) z formatu Windows do uniksowego \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-n in.txt out.txt -.Ve -.PP -Konwersja pliku \s-1UTF\-16LE \s0(bez \s-1BOM\s0) z formatu Windows do uniksowego \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-ul \-n in.txt out.txt -.Ve -.PP -Konwersja z uniksowego \s-1UTF\-8\s0 do \s-1UTF\-8\s0 z \s-1BOM\s0 dla Windows: -.PP -.Vb 1 -\& unix2dos \-m \-n in.txt out.txt -.Ve -.PP -Konwersja z uniksowego \s-1UTF\-8\s0 do \s-1UTF\-16\s0 dla Windows: -.PP -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t UTF\-16 > out.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 to standard urzędowy w Chinach. Obowiązkowy podzbiór standardu -\&\s-1GB18030\s0 jest oficjalnym wymaganiem każdego oprogramowania sprzedawanego w -Chinach. Więcej pod adresem . -.PP -\&\s-1GB18030\s0 jest w pełni zgodny z Unicode i może być uważany za format -transformacji unikodu. Podobnie jak \s-1UTF\-8, GB18030\s0 jest zgodny z \s-1ASCII.\s0 Jest -także zgodny ze stroną kodową Windows 936, znaną też jako \s-1GBK.\s0 -.PP -Pod Uniksem/Linuksem pliki \s-1UTF\-16\s0 są konwertowane do \s-1GB18030,\s0 jeśli -kodowanie dla lokalizacji jest ustawione na \s-1GB18030.\s0 Uwaga: będzie to -działać tylko dla lokalizacji chińskiej. W przypadku np. ustawienia -lokalizacji angielskiej/brytyjskiej \f(CW\*(C`en_GB.GB18030\*(C'\fR konwersja \s-1UTF\-16\s0 do -\&\s-1GB18030\s0 nie będzie działać, a dla lokalizacji chińskiej \f(CW\*(C`zh_CN.GB18030\*(C'\fR -będzie. -.PP -Pod Windows w celu konwersji plików \s-1UTF\-16\s0 do \s-1GB18030\s0 należy użyć opcji -\&\f(CW\*(C`\-gb\*(C'\fR. -.PP -Pliki w kodowaniu \s-1GB18030\s0 mogą mieć znacznik \s-1BOM,\s0 podobnie jak pliki w -Unicode. -.SH "PRZYKŁADY" -.IX Header "PRZYKŁADY" -Odczyt ze standardowego wejścia i zapis na standardowe wyjście: -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Konwersja i zastąpienie a.txt; konwersja i zastąpienie b.txt: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Konwersja i zastąpienie a.txt w trybie ascii: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Konwersja i zastąpienie a.txt w trybie ascii; konwersja i zastąpienie b.txt -w trybie 7\-bitowym: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Konwersja a.txt z formatu Mac do formatu uniksowego: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Konwersja a.txt z formatu uniksowego do formatu Mac: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Konwersja i zastąpienie a.txt z zachowaniem oryginalnego znacznika czasu: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Konwersja a.txt i zapis do e.txt: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Konwersja a.txt i zapis do e.txt z zachowaniem znacznika czasu e.txt -takiego, jak a.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Konwersja i zastąpienie a.txt; konwersja b.txt i zapis do e.txt: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Konwersja c.txt i zapis do e.txt; konwersja i zastąpienie a.txt; konwersja i -zastąpienie b.txt; konwersja d.txt i zapis do f.txt: -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "KONWERSJA REKURENCYJNA" -.IX Header "KONWERSJA REKURENCYJNA" -Można użyć dos2unix w połączeniu z poleceniami \fIfind\fR\|(1) i \fIxargs\fR\|(1) do -rekurencyjnej konwersji plików tekstowych w strukturze drzewa katalogów. Na -przykład, aby przekonwertować wszystkie pliki .txt w drzewie katalogów -poniżej katalogu bieżącego, należy napisać: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "LOKALIZACJA" -.IX Header "LOKALIZACJA" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -Główny język wybiera się zmienną środowiskową \s-1LANG.\s0 Zmienna \s-1LANG\s0 składa się -z kilku części. Pierwsza część to małe litery oznaczające kod języka. Druga -część jest opcjonalna i zawiera kod kraju pisany wielkimi literami, -poprzedzony podkreśleniem. Jest także opcjonalna trzecia część: kodowanie -znaków, poprzedzone kropką. Kilka przykładów dla powłok zgodnych ze -standardem \s-1POSIX:\s0 -.Sp -.Vb 7 -\& export LANG=nl holenderski -\& export LANG=nl_NL holenderski, Holandia -\& export LANG=nl_BE holenderski, Belgia -\& export LANG=es_ES hiszpański, Hiszpania -\& export LANG=es_MX hiszpański, Meksyk -\& export LANG=en_US.iso88591 angielski, USA, kodowanie Latin\-1 -\& export LANG=en_GB.UTF\-8 angielski, Wlk. Brytania, kodowanie UTF\-8 -.Ve -.Sp -Pełną listę kodów języków i krajów można znaleźć w podręczniku do gettexta: - -.Sp -W systemach uniksowych do uzyskania informacji dotyczących lokalizacji można -użyć polecenia \fIlocale\fR\|(1). -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -Przy użyciu zmiennej środowiskowej \s-1LANGUAGE\s0 można określić listę języków wg -priorytetu, oddzielonych dwukropkami. Dos2unix przyjmuje pierwszeństwo -zmiennej \s-1LANGUAGE\s0 nad \s-1LANG.\s0 Na przykład, najpierw holenderski, następnie -niemiecki: \f(CW\*(C`LANGUAGE=nl:de\*(C'\fR. Aby skorzystać z listy wg priorytetów ze -zmiennej \s-1LANGUAGE,\s0 trzeba najpierw włączyć lokalizację przez ustawienie -zmiennej \s-1LANG \s0(lub \s-1LC_ALL\s0) na wartość inną niż \*(L"C\*(R". Więcej informacji -znajduje się w podręczniku do gettexta: - -.Sp -W przypadku wybrania niedostępnego języka, otrzymamy standardowe, angielskie -komunikaty. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Przy użyciu zmiennej środowiskowej \s-1DOS2UNIX_LOCALEDIR,\s0 można nadpisać -ustawienie \s-1LOCALEDIR\s0 z czasu kompilacji. \s-1LOCALEDIR\s0 to katalog używany do -znalezienia plików lokalizacji. Domyślną wartością dla \s-1GNU\s0 jest -\&\f(CW\*(C`/usr/local/share/locale\*(C'\fR. Opcja \fB\-\-version\fR wyświetla używaną wartość -\&\s-1LOCALEDIR.\s0 -.Sp -Przykład (dla powłoki \s-1POSIX\s0): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "WARTOŚĆ ZWRACANA" -.IX Header "WARTOŚĆ ZWRACANA" -W przypadku powodzenia zwracane jest zero. Jeśli wystąpi błąd systemowy, -zwracany jest ostatni błąd systemowy. W przypadku innych błędów zwracane -jest 1. -.PP -Wartość zwracana w trybie cichym to zawsze zero, z wyjątkiem sytuacji -podania błędnych opcji linii poleceń. -.SH "STANDARDY" -.IX Header "STANDARDY" - -.PP - -.PP - -.PP - -.SH "AUTORZY" -.IX Header "AUTORZY" -Benjamin Lin ; Bernd Johannes Wuebben (tryb mac2unix) -; Christian Wurll (dodawanie dodatkowej nowej linii) -; Erwin Waterlander (prowadzący) -.PP -Strona projektu: -.PP -Strona SourceForge: -.SH "ZOBACZ TAKŻE" -.IX Header "ZOBACZ TAKŻE" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/pt_BR/man1/dos2unix.1 b/Tools/dos2unix/share/man/pt_BR/man1/dos2unix.1 deleted file mode 100644 index e603db8..0000000 --- a/Tools/dos2unix/share/man/pt_BR/man1/dos2unix.1 +++ /dev/null @@ -1,754 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NOME" -.IX Header "NOME" -dos2unix \- Conversor de formato de arquivo texto de DOS/Mac para Unix e -vice-versa -.SH "SINOPSE" -.IX Header "SINOPSE" -.Vb 2 -\& dos2unix [opções] [ARQUIVO ...] [\-n ARQENT ARQSAÍDA ...] -\& unix2dos [opções] [ARQUIVO ...] [\-n ARQENT ARQSAÍDA ...] -.Ve -.SH "DESCRIÇÃO" -.IX Header "DESCRIÇÃO" -O pacote Dos2unix inclui utilitários de \f(CW\*(C`dos2unix\*(C'\fR e \f(CW\*(C`unix2dos\*(C'\fR para -converter arquivos texto nos formatos \s-1DOS\s0 ou Mac para formato Unix e -vice-versa. -.PP -Em arquivos texto DOS/Windows uma quebra de linha, também conhecida como -nova linha, é uma combinação de dois caracteres: um Carriage Return (\s-1CR\s0) -seguido por um Line Feed (\s-1LF\s0). Em arquivos texto do Unix uma quebra de linha -é um único caractere: o Line Feed (\s-1LF\s0). Em arquivos texto do Mac, anteriores -ao Mac \s-1OS X,\s0 uma quebra de linha era um único caractere Carriage Return -(\s-1CR\s0). Hoje em dia, Mac \s-1OS\s0 usa quebras de linha no estilo do Unix (\s-1LF\s0). -.PP -Além das quebras de linhas, Dos2unix também pode converter as codificações -de arquivos. Algumas poucas páginas podem ser convertidos para Latin\-1 para -Unix. E arquivos Unicode do Windows (\s-1UTF\-16\s0) podem ser convertidos para -arquivos Unicode do Unix (\s-1UTF\-8\s0). -.PP -Arquivos binários são ignorados automaticamente, a menos que a conversão -seja forçada. -.PP -Arquivos não regulares, tais como diretórios e FIFOs, são ignorados -automaticamente. -.PP -Ligações simbólicas e seus alvos são por padrão mantidas -intocáveis. Ligações simbólicas podem opcionalmente ser substituídas, ou a -saída pode ser escrita para o alvo das ligações simbólicas. Não há suporte -às ligações simbólicas do Windows. -.PP -Dos2unix foi modelado seguindo dos2unix do SunOS/Solaris. Há uma diferença -importante em relação à versão original do SunOS/Solaris. Essa versão faz -conversão no-lugar (modo arquivo antigo) por padrão, enquanto a versão -original do SunOS/Solaris fornecia suporte apenas a conversão pareada (modo -de novo arquivo). Veja também as opções \f(CW\*(C`\-o\*(C'\fR e \f(CW\*(C`\-n\*(C'\fR. -.SH "OPÇÕES" -.IX Header "OPÇÕES" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Trata as opções seguintes como nomes de arquivos. Use essa opção se você -quiser converter arquivos cujos nomes iniciam com um traço. Por exemplo, -para converter um arquivo chamado \*(L"foo\*(R", você pode usar este comando: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -Ou em modo de novo arquivo: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo saída.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Converte apenas as quebras de linhas. Esse é o modo de conversão padrão. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Conversão entre conjunto de caractere do \s-1DOS\s0 e \s-1ISO\-8859\-1.\s0 Veja também a -seção \s-1MODOS DE\s0 CONVERSÃO. -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Usa a página de código 1252 do Windows (Europa ocidental). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -Usa a página de código 437 do \s-1DOS \s0(\s-1EUA\s0). Essa é a página de código padrão -usada para conversão \s-1ISO.\s0 -.IP "\fB\-850\fR" 4 -.IX Item "-850" -Usa a página de código 850 do \s-1DOS \s0(Europa ocidental). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -Usa a página de código 860 do \s-1DOS \s0(Português). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -Usa a página de código 863 do \s-1DOS \s0(Francês do Canadá). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -Usa a página de código 865 do \s-1DOS \s0(Nórdico). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Converte caracteres de 8 bit para espaço de 7 bit. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Mantém marca de ordem de bytes (\s-1BOM\s0). Quando o arquivo de entrada possuir um -\&\s-1BOM,\s0 escreve um \s-1BOM\s0 no arquivo de saída. Esse é o comportamento padrão ao -converter para quebras de linha do \s-1DOS.\s0 Veja também a opção \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode \s-1MODOCONV\s0\fR" 4 -.IX Item "-c, --convmode MODOCONV" -Define o modo de conversão, sendo \s-1MODOCONV\s0 um dentre: \fIascii\fR, \fI7bit\fR, -\&\fIiso\fR, \fImac\fR com ascii sendo o padrão. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -Força a conversão de arquivos binários. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -No Windows, arquivos \s-1UTF\-16\s0 são convertidos, por padrão, para \s-1UTF\-8,\s0 -independentemente da localização definida. Use esta opção para converter -arquivos \s-1UTF\-16\s0 para \s-1GB18030.\s0 Essa opção está disponível apenas no -Windows. Veja também a seção \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -Exibe ajuda e sai. -.IP "\fB\-i[OPÇÕES], \-\-info[=OPÇÕES] \s-1ARQUIVO ...\s0\fR" 4 -.IX Item "-i[OPÇÕES], --info[=OPÇÕES] ARQUIVO ..." -Exibe informação do arquivo. Nenhuma conversão é feita. -.Sp -A seguinte informação é exibida, nesta ordem: número de quebras de linha do -\&\s-1DOS,\s0 número de quebras de linha do Unix, número de quebras de linha do Mac, -marca de ordem de byte, \*(L"text\*(R" ou \*(L"binário\*(R", nome de arquivo. -.Sp -Saída de exemplo: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Opcionalmente, opções extra podem ser definidas para alterar a saída. Uma ou -mais opções podem ser adicionadas. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Exibe o número de quebras de linhas do \s-1DOS.\s0 -.IP "\fBu\fR" 4 -.IX Item "u" -Exibe o número de quebras de linhas do Unix. -.IP "\fBm\fR" 4 -.IX Item "m" -Exibe o número de quebras de linhas do Mac. -.IP "\fBb\fR" 4 -.IX Item "b" -Exibe a marca de ordem de byte. -.IP "\fBt\fR" 4 -.IX Item "t" -Exibe se arquivo é texto ou binário. -.IP "\fBc\fR" 4 -.IX Item "c" -Exib apenas os arquivos que seriam convertidos. -.Sp -Com a opção \f(CW\*(C`c\*(C'\fR, dos2unix vai exibir apenas os arquivos que contêm quebras -de linha do \s-1DOS,\s0 unix2dos vai exibir apenas os nomes de arquivos que contêm -quebras de linha do Unix. -.RE -.RS 4 -.Sp -Exemplos: -.Sp -Mostra informação sobre todos os arquivos *.txt: -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Mostra apenas o número de quebras de linha \s-1DOS\s0 e Unix: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Mostra apenas a marca de ordem de byte: -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -Lista os arquivos que possuem quebras de linha do \s-1DOS:\s0 -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -Lista os arquivos que possuem quebras de linha do Unix: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -Mantém a marca da data do arquivo de saída igual ao do arquivo de entrada. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -Exibe a licença do programa. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -Adiciona nova linha adicional. -.Sp -\&\fBdos2unix\fR: Apenas quebras de linha do \s-1DOS\s0 são alteradas para duas quebras -de linha do Unix. No modo Mac, apenas quebras de linha do Mac são alterados -para duas quebras de linha do Unix. -.Sp -\&\fBunix2dos\fR: Apenas quebras de linha do Unix são alteradas para duas quebras -de linha do \s-1DOS.\s0 No modo Mac, quebras de linha do Unix são alteradas para -duas quebras de linha do Mac. -.IP "\fB\-m, \-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -Escreve uma marca de ordem de byte (\s-1BOM\s0) no arquivo de saída. Por padrão, um -\&\s-1BOM UTF\-8\s0 é escrito. -.Sp -Quando o arquivo de entrada é \s-1UTF\-16,\s0 e a opção \f(CW\*(C`\-u\*(C'\fR é usada, um \s-1BOM UTF\-16\s0 -será escrito. -.Sp -Nunca use essa opção quando a codificação de saída é outra além de \s-1UTF\-8\s0 ou -\&\s-1UTF\-16.\s0 Veja também a seção \s-1UNICODE.\s0 -.IP "\fB\-n, \-\-newfile \s-1ARQENT\s0 ARQSAÍDA ...\fR" 4 -.IX Item "-n, --newfile ARQENT ARQSAÍDA ..." -Modo de novo arquivo. Converte o arquivo \s-1ARQENT\s0 e escreve a saída para o -arquivo ARQSAÍDA. Os nomes de arquivos devem ser fornecidos em pares e nome -coringa \fInão\fR deveriam ser usados ou você \fIvai\fR perder seus arquivos. -.Sp -A pessoa que começa a conversão em modo novo arquivo (pareado) será o dono -do arquivo convertido. As permissões de leitura/escrita do novo arquivo -serão as permissões do arquivo original menos a \fIumask\fR\|(1) da pessoa que -executa a conversão. -.IP "\fB\-o, \-\-oldfile \s-1ARQUIVO ...\s0\fR" 4 -.IX Item "-o, --oldfile ARQUIVO ..." -Modo arquivo antigo. Converte o arquivo \s-1ARQUIVO\s0 e o sobrescreve com a -saída. O programa, por padrão, executa neste modo. Nomes coringas podem ser -usados. -.Sp -No modo de arquivo antigo (no-lugar) o arquivo convertido recebe no mesmo -dono, grupo e permissões de leitura/escrita que o arquivo original. Também, -quando o arquivo é convertido por outro usuário que tenha permissões de -escrita no arquivo (ex.: usuário root). A conversão será abortada quando não -for possível preservar os valores originais. Alteração do dono pode -significar que o dono original não é mais capaz de ler o arquivo. Alteração -do grupo pode ser um risco para a segurança, pois o arquivo pode ficar -legível para pessoas cujo acesso não é desejado. Preservação do dono, grupo -e permissões de leitura/escrita tem suporte apenas no Unix. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Modo quieto. Suprime todos os avios e mensagens. O valor retornado é -zero. Exceto quando opções de linha de comando erradas forem usadas. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -remove marca de ordem de bytes (\s-1BOM\s0). Não escreve um \s-1BOM\s0 no arquivo de -saída. Esse é o comportamento padrão ao converter para quebras de linha -Unix. Veja também a opção \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s, \-\-safe\fR" 4 -.IX Item "-s, --safe" -Ignora arquivo binários (padrão). -.IP "\fB\-u, \-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -Mantém a codificação \s-1UTF\-16\s0 original do arquivo de entrada. O arquivo de -saída será escrito na mesma codificação \s-1UTF\-16,\s0 em little ou big endian, -como o arquivo de entrada. Isso evita transformação para \s-1UTF\-8.\s0 Como -consequência, um \s-1BOM UTF\-16\s0 será escrito. Essa opção pode ser desabilitada -com a opção \f(CW\*(C`\-ascii\*(C'\fR. -.IP "\fB\-ul, \-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -Presume que o formato de arquivo de entrada é \s-1UTF\-16LE.\s0 -.Sp -Quando há uma marca de ordem de byte no arquivo de entrada, esta tem -prioridade sobre essa opção. -.Sp -Quando você fizer uma presunção equivocada (o arquivo de entrada não estava -no formato \s-1UTF\-16LE\s0) e a conversão funcionar, você terá um arquivo de saída -\&\s-1UTF\-8\s0 com texto errado. Você pode desfazer a conversão errada com \fIiconv\fR\|(1) -pela conversão do arquivo de saída \s-1UTF\-8\s0 de volta para \s-1UTF\-16LE.\s0 Isso vai -trazer de volta o arquivo para o original. -.Sp -A presunção de \s-1UTF\-16LE\s0 funciona como um \fImodo de conversão\fR. Ao alternara -o modo \fIascii\fR padrão, a presunção de \s-1UTF\-16LE\s0 é desativada. -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -Presume que o formato de arquivo de entrada é \s-1UTF\-16BE.\s0 -.Sp -Essa opção funciona o mesmo que a opção \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v, \-\-verbose\fR" 4 -.IX Item "-v, --verbose" -Exibe mensagens detalhadas. Informação extra é exibida sobre marcas de ordem -de byte e a quantidade de quebras de linha convertidas. -.IP "\fB\-F, \-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -Segue ligações simbólicas e converte os alvos. -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Substitui ligações simbólicas com arquivos convertidos (arquivos alvo -originais permanecem inalterados). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -Mentém ligações simbólicas e alvos inalterados (padrão). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -Exibe informação da versão e sai. -.SH "MODO MAC" -.IX Header "MODO MAC" -No modo normal, as quebras de linhas são convertidas de \s-1DOS\s0 para Unix e -vice-versa. Quebras de linha do Mac não são convertidas. -.PP -No modo Mac, quebras de linha são convertidas de Mac para Unix e -vice-versa. Quebras de linha do \s-1DOS\s0 não são alteradas. -.PP -Para executar no modo Mac, use a opção de linha de comando \f(CW\*(C`\-c mac\*(C'\fR ou use -os comandos \f(CW\*(C`mac2unix\*(C'\fR ou \f(CW\*(C`unix2mac\*(C'\fR. -.SH "MODOS DE CONVERSÃO" -.IX Header "MODOS DE CONVERSÃO" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -No modo \f(CW\*(C`ascii\*(C'\fR, apenas as quebras de linha são convertidas. Esse é o modo -de conversão padrão. -.Sp -Apesar do nome deste modo ser \s-1ASCII,\s0 o qual é um padrão de 7 bit, o modo é -em verdade 8 bit. Sempre use este modo quando quiser converter arquivos -Unicode \s-1UTF\-8.\s0 -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -Neste modo todos os caracteres não\-ASCII de 8 bit (com valores entre 128 e -255) são convertidos para um espaço de 7 bit. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Caracteres são convertidos entre um conjunto de caracteres do \s-1DOS \s0(página de -código) e conjunto de caracteres \s-1ISO\-8859\-1 \s0(Latin\-1) no Unix. Caracteres de -\&\s-1DOS\s0 sem um equivalente \s-1ISO\-8859\-1,\s0 para os quais a conversão não é possível, -são convertidos para um ponto. O mesmo vale para caracteres \s-1ISO\-8859\-1\s0 sem a -contraparte \s-1DOS.\s0 -.Sp -Quando apenas a opção \f(CW\*(C`\-iso\*(C'\fR for usada, dos2unix vai tentar determinar a -página de código ativa. Quando isso não for possível, dos2unix vai usar a -página de código padrão \s-1CP437,\s0 a qual é usada principalmente nos \s-1EUA.\s0 Para -forçar uma página de código específica, use as opções \f(CW\*(C`\-437\*(C'\fR (\s-1EUA\s0), \f(CW\*(C`\-850\*(C'\fR -(Europeu oriental), \f(CW\*(C`\-860\*(C'\fR (Português), \f(CW\*(C`\-863\*(C'\fR (Franco-canadense) ou -\&\f(CW\*(C`\-865\*(C'\fR (Nórdico). Também há suporte à página de código do Windows \s-1CP1252 -\&\s0(Europeu ocidental) com a opção \f(CW\*(C`\-1252\*(C'\fR. Para outras páginas de código, use -dos2unix em combinação cm \fIiconv\fR\|(1). Iconv pode converter entre uma lista -grande de codificações de caracteres. -.Sp -Nunca use conversão \s-1ISO\s0 em arquivos textos Unicode. Isso vai corromper os -arquivos codificados em \s-1UTF\-8.\s0 -.Sp -Alguns exemplos: -.Sp -Conversão da página de código padrão do \s-1DOS\s0 para Latin\-1 do Unix: -.Sp -.Vb 1 -\& dos2unix \-iso \-n entrada.txt saída.txt -.Ve -.Sp -Conversão da \s-1CP850\s0 do \s-1DOS\s0 para Latin\-1 do Unix: -.Sp -.Vb 1 -\& dos2unix \-850 \-n entrada.txt saída.txt -.Ve -.Sp -Conversão da \s-1CP1252\s0 do Windows para Latin\-1 do Unix: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n entrada.txt saída.txt -.Ve -.Sp -Conversão da \s-1CP1252\s0 do Windows para \s-1UTF\-8 \s0(Unicode) do Unix: -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 entrada.txt | dos2unix > saída.txt -.Ve -.Sp -Conversão de Latin\-1 do Unix para página de código padrão do \s-1DOS:\s0 -.Sp -.Vb 1 -\& unix2dos \-iso \-n entrada.txt saída.txt -.Ve -.Sp -Conversão do Latin\-1 do Unix para \s-1CP850\s0 do \s-1DOS:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n entrada.txt saída.txt -.Ve -.Sp -Conversão do Latin\-1 do unix para \s-1CP1252\s0 do Windows: -.Sp -.Vb 1 -\& unix2dos \-1252 \-n entrada.txt saída.txt -.Ve -.Sp -Conversão do \s-1UTF\-8 \s0(Unicode) do Unix para \s-1CP1252\s0 do Windows: -.Sp -.Vb 1 -\& unix2dos < entrada.txt | iconv \-f UTF\-8 \-t CP1252 > saída.txt -.Ve -.Sp -Veja também e -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Codificações" -.IX Subsection "Codificações" -Exitem codificações Unicode diferentes. No Unix e no Linux, arquivos Unicode -são geralmente codificados em \s-1UTF\-8.\s0 No Windows, arquivos texto Unicode -podem ser codificados em \s-1UTF\-8, UTF\-16\s0 ou \s-1UTF\-16\s0 big endian, mas na maioria -das vezes são codificados no formato \s-1UTF\-16.\s0 -.SS "Conversão" -.IX Subsection "Conversão" -Arquivos texto em Unicode pode ter quebras de linha \s-1DOS,\s0 Unix ou Mac, como -arquivos texto comuns. -.PP -Todas as versões do dos2unix e unix2dos podem converter arquivos codificados -em \s-1UTF\-8\s0 porque \s-1UTF\-8\s0 foi projetado para ter compatibilidade reversa com -\&\s-1ASCII.\s0 -.PP -Dos2unix e unix2dos com suporte a Unicode \s-1UTF\-16\s0 podem ler arquivos texto -codificados em little e big endian \s-1UTF\-16.\s0 Para ver se dos2unix foi -compilado com suporte a \s-1UTF\-16,\s0 digite \f(CW\*(C`dos2unix \-V\*(C'\fR. -.PP -No Unix/Linux, arquivos codificados em \s-1UTF\-16\s0 são convertidos para a -codificação de caracteres do localização. Use o comando \fIlocale\fR\|(1) para -descobrir qual é a codificação de caracteres da localização. Quando a -conversão não for possível, ocorrerá um erro e o arquivo será ignorado. -.PP -No Windows, arquivos \s-1UTF\-16\s0 são convertidos, por padrão, para -\&\s-1UTF\-8.\s0 Arquivos texto formatados em \s-1UTF\-8\s0 possuem ótimo suporte em ambos -Windows e Unix/Linux. -.PP -Codificações \s-1UTF\-16\s0 e \s-1UTF\-8\s0 são completamente compatíveis, não havendo -qualquer perda de texto na conversão. Quando um erro de conversão \s-1UTF\-16\s0 -para \s-1UTF\-8\s0 ocorre, por exemplo quando o arquivo de entrada \s-1UTF\-16 \s0 contém um -erro, o arquivo será ignorado. -.PP -Quando a opção \f(CW\*(C`\-u\*(C'\fR é usada, o arquivo de saída será escrito na mesma -codificação \s-1UTF\-16\s0 que o arquivo de saída. A opção \f(CW\*(C`\-u\*(C'\fR evita conversão -para \s-1UTF\-8.\s0 -.PP -Dos2unix e unix2dos não possuem opção para converter arquivos \s-1UTF\-8\s0 ára -\&\s-1UTF\-16.\s0 -.PP -Modo de conversão \s-1ISO\s0 e 7\-bit não funciona em arquivos \s-1UTF\-16.\s0 -.SS "Marca de ordem de byte" -.IX Subsection "Marca de ordem de byte" -No Windows, arquivos Unicode normalmente têm uma Marca de Ordem de Byte -(\s-1BOM\s0), porque muitos programas (incluindo o Bloco de Notas) adiciona BOMs -por padrão. Veja também . -.PP -No Unix, arquivos Unicode normalmente não têm \s-1BOM.\s0 Presume-se que arquivos -texto são codificados na codificação de caracteres da localização. -.PP -Dos2unix pode detectar apenas se um arquivo está no formato \s-1UTF\-16\s0 se o -arquivo tiver \s-1BOM.\s0 Quando um arquivo \s-1UTF\-16\s0 não tiver \s-1BOM,\s0 dos2unix vai ver -se o arquivo é um arquivo binário. -.PP -Use a opção \f(CW\*(C`\-ul\*(C'\fR ou \f(CW\*(C`\-ub\*(C'\fR para converter um arquivo \s-1UTF\-16\s0 sem \s-1BOM.\s0 -.PP -Dos2unix escreve por padrão nenhum \s-1BOM\s0 no arquivo de saída. Com a opção -\&\f(CW\*(C`\-b\*(C'\fR, o Dos2unix escreve um \s-1BOM\s0 quando o arquivo de entrada possuir \s-1BOM.\s0 -.PP -Unix2dos escreve por padrão um \s-1BOM\s0 no arquivo de saída quando o arquivo de -entrada tem \s-1BOM.\s0 Use a opção \f(CW\*(C`\-m\*(C'\fR para remover \s-1BOM.\s0 -.PP -Dos2unix e unix2dos sempre escrevem \s-1BOM\s0 quando a opção \f(CW\*(C`\-m\*(C'\fR é usada. -.SS "Exemplos de Unicode" -.IX Subsection "Exemplos de Unicode" -Conversão de \s-1UTF\-16\s0 do Windows (com \s-1BOM\s0) para \s-1UTF\-8\s0 do Unix: -.PP -.Vb 1 -\& dos2unix \-n entrada.txt saída.txt -.Ve -.PP -Conversão de \s-1UTF\-16LE\s0 do Windows (sem \s-1BOM\s0) para \s-1UTF\-8\s0 do Unix: -.PP -.Vb 1 -\& dos2unix \-ul \-n entrada.txt saída.txt -.Ve -.PP -Conversão de \s-1UTF\-8\s0 Unix para \s-1UTF\-8\s0 do Windows com \s-1BOM:\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n entrada.txt saída.txt -.Ve -.PP -Conversão de \s-1UTF\-8\s0 do Unix para \s-1UTF\-16\s0 do Windows: -.PP -.Vb 1 -\& unix2dos < entrada.txt | iconv \-f UTF\-8 \-t UTF\-16 > saída.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 é um padrão governamental chinês. Um subconjunto obrigatório do -padrão \s-1GB18030\s0 é exigido oficialmente para todos os produtos de software -vendidos na China. Veja também . -.PP -\&\s-1GB18030\s0 é completamente compatível com Unicode e pode ser considerado um -formato de transformação de unicode. Assim como \s-1UTF\-8, GB18030\s0 é compatível -com \s-1ASCII. GB18030\s0 também é compatível com a página de código 936 do -Windows, também conhecida como \s-1GBK.\s0 -.PP -No Unix/Linux, arquivos \s-1UTF\-16\s0 são convertidos para \s-1GB18030\s0 quando a -codificação da localização é definida para \s-1GB18030.\s0 Note que isso vai -funcionar apenas se a localização estiver definida para China. Por exemplo, -em uma configuração de localização inglesa (Britânia) a conversão -\&\f(CW\*(C`en_GB.GB18030\*(C'\fR de \s-1UTF\-16\s0 para \s-1GB18030\s0 não vai funcionar, mas em uma -configuração de localização \f(CW\*(C`zh_CN.GB18030\*(C'\fR chinesa vai funcionar. -.PP -No Windows, você precisa usar a opção \f(CW\*(C`\-gb\*(C'\fR para converter arquivos \s-1UTF\-16\s0 -para \s-1GB18030.\s0 -.PP -Arquivos codificados em \s-1GB18030\s0 possuem uma marca de ordem de bytes, como -arquivos Unicode. -.SH "EXEMPLOS" -.IX Header "EXEMPLOS" -Lê a entrada da \*(L"stdin\*(R" e escreve a saída para \*(L"stdout\*(R": -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Converte e substitui a.txt. Converte e substitui b.txt: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Converte e substitui a.txt no modo de conversão ascii: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Converte e substitui a.txt no modo de conversão ascii. Converte e substitui -b.txt no modo de conversão 7bit: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Converte a.txt do formato do Mac para Unix: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Converte a.txt do formato do Unix para Mac: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Converte e substitui a.txt enquanto mantém a marca de data original: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Converte a.txt e escreve para e.txt: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Converte a.txt e escreve para e.txt, mantém a marca de data de e.txt igual a -a.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Converte e substitui a.txt. Converte b.txt e escreve para e.txt: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Converte c.txt e escreve para e.txt. Converte e substitui a.txt. Converte e -substitui b.txt. Converte d.txt e escreve para f.txt: -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "Conversão recursiva" -.IX Header "Conversão recursiva" -Use dos2unix em combinação com os comandos \fIfind\fR\|(1) e \fIxargs\fR\|(1) para converter -recursivamente arquivos texto em uma estrutura de árvore de diretórios. Por -exemplo, para converter todos os arquivos .txt na árvore de diretórios sob o -diretório atual, digite: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "LOCALIZAÇÃO" -.IX Header "LOCALIZAÇÃO" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -O idioma primário é selecionado com a variável de ambiente \s-1LANG. A\s0 variável -\&\s-1LANG\s0 consiste em várias partes. A primeira parte está em letras pequenas no -código do idioma. A segunda parte é opcional e é o código do país em letras -maiúsculo, precedido de um ponto. Alguns exemplos para shells do tipo padrão -\&\s-1POSIX:\s0 -.Sp -.Vb 7 -\& export LANG=nl Holandês -\& export LANG=nl_NL Holandês, Holanda -\& export LANG=nl_BE Holandês, Bélgica -\& export LANG=es_ES Espanhol, Espanha -\& export LANG=es_MX Espanhol, México -\& export LANG=en_US.iso88591 Inglês, EUA, codificação Latin\-1 -\& export LANG=en_GB.UTF\-8 Inglês, Reino Unido, codificação UTF\-8 -.Ve -.Sp -Para a lista completa de códigos de idioma e país, veja o manual do gettext: - -.Sp -Nos sistemas Unix, você pode usar o comando \fIlocale\fR\|(1) para obter informação -específica da localização. -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -Com a variável de ambiente \s-1LANGUAGE,\s0 você pode especificar uma lista de -prioridades de idiomas, separada por vírgulas. Dos2unix fornece preferência -à \s-1LANGUAGE\s0 sobre \s-1LANG.\s0 Por exemplo, primeiro holandês e, então, alemão: -\&\f(CW\*(C`LANGUAGE=nl:de\*(C'\fR. Você primeiro tem que habilitar localização, definindo -\&\s-1LANG \s0(ou \s-1LC_ALL\s0) para um valor diferente de \*(L"C\*(R", antes que você possa usar -uma lista de prioridade de idioma por meio da variável \s-1LANGUAGE.\s0 Veja também -o manual do gettext: - -.Sp -Se você selecionou um idioma que não está disponível, você vai terá as -mensagens em inglês (padrão). -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Com a variável de ambiente \s-1DOS2UNIX_LOCALEDIR,\s0 o \s-1LOCALEDIR\s0 definido durante -a compilação pode ser sobrescrito. \s-1LOCALEDIR\s0 é usada para localizar os -arquivos de idioma. O valor padrão do \s-1GNU\s0 é \f(CW\*(C`/usr/local/share/locale\*(C'\fR. A -opção \fB\-\-version\fR vai exibir o \s-1LOCALEDIR\s0 que é usado. -.Sp -Exemplo (shell \s-1POSIX\s0): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "VALOR RETORNADO" -.IX Header "VALOR RETORNADO" -No sucesso, zero é retornado. Quando um erro de sistema ocorre, o último -erro de sistema será retornado. Para outros erros, 1 é retornado. -.PP -O valor retornado é sempre zero no modo quieto, exceto quando opções de -linha de comando erradas são usadas. -.SH "PADRÕES" -.IX Header "PADRÕES" - -.PP - -.PP - -.PP - -.SH "AUTORES" -.IX Header "AUTORES" -Benjamin Lin \- Bernd Johannes Wuebben (modo mac2unix) -\&\- , Christian Wurll (adiciona nova linha extra) \- -, Erwin Waterlander \- (mantenedor) -.PP -Página do projeto: -.PP -Página do SourceForge: -.SH "Veja também" -.IX Header "Veja também" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/pt_BR/man1/mac2unix.1 b/Tools/dos2unix/share/man/pt_BR/man1/mac2unix.1 deleted file mode 100644 index e603db8..0000000 --- a/Tools/dos2unix/share/man/pt_BR/man1/mac2unix.1 +++ /dev/null @@ -1,754 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NOME" -.IX Header "NOME" -dos2unix \- Conversor de formato de arquivo texto de DOS/Mac para Unix e -vice-versa -.SH "SINOPSE" -.IX Header "SINOPSE" -.Vb 2 -\& dos2unix [opções] [ARQUIVO ...] [\-n ARQENT ARQSAÍDA ...] -\& unix2dos [opções] [ARQUIVO ...] [\-n ARQENT ARQSAÍDA ...] -.Ve -.SH "DESCRIÇÃO" -.IX Header "DESCRIÇÃO" -O pacote Dos2unix inclui utilitários de \f(CW\*(C`dos2unix\*(C'\fR e \f(CW\*(C`unix2dos\*(C'\fR para -converter arquivos texto nos formatos \s-1DOS\s0 ou Mac para formato Unix e -vice-versa. -.PP -Em arquivos texto DOS/Windows uma quebra de linha, também conhecida como -nova linha, é uma combinação de dois caracteres: um Carriage Return (\s-1CR\s0) -seguido por um Line Feed (\s-1LF\s0). Em arquivos texto do Unix uma quebra de linha -é um único caractere: o Line Feed (\s-1LF\s0). Em arquivos texto do Mac, anteriores -ao Mac \s-1OS X,\s0 uma quebra de linha era um único caractere Carriage Return -(\s-1CR\s0). Hoje em dia, Mac \s-1OS\s0 usa quebras de linha no estilo do Unix (\s-1LF\s0). -.PP -Além das quebras de linhas, Dos2unix também pode converter as codificações -de arquivos. Algumas poucas páginas podem ser convertidos para Latin\-1 para -Unix. E arquivos Unicode do Windows (\s-1UTF\-16\s0) podem ser convertidos para -arquivos Unicode do Unix (\s-1UTF\-8\s0). -.PP -Arquivos binários são ignorados automaticamente, a menos que a conversão -seja forçada. -.PP -Arquivos não regulares, tais como diretórios e FIFOs, são ignorados -automaticamente. -.PP -Ligações simbólicas e seus alvos são por padrão mantidas -intocáveis. Ligações simbólicas podem opcionalmente ser substituídas, ou a -saída pode ser escrita para o alvo das ligações simbólicas. Não há suporte -às ligações simbólicas do Windows. -.PP -Dos2unix foi modelado seguindo dos2unix do SunOS/Solaris. Há uma diferença -importante em relação à versão original do SunOS/Solaris. Essa versão faz -conversão no-lugar (modo arquivo antigo) por padrão, enquanto a versão -original do SunOS/Solaris fornecia suporte apenas a conversão pareada (modo -de novo arquivo). Veja também as opções \f(CW\*(C`\-o\*(C'\fR e \f(CW\*(C`\-n\*(C'\fR. -.SH "OPÇÕES" -.IX Header "OPÇÕES" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Trata as opções seguintes como nomes de arquivos. Use essa opção se você -quiser converter arquivos cujos nomes iniciam com um traço. Por exemplo, -para converter um arquivo chamado \*(L"foo\*(R", você pode usar este comando: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -Ou em modo de novo arquivo: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo saída.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Converte apenas as quebras de linhas. Esse é o modo de conversão padrão. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Conversão entre conjunto de caractere do \s-1DOS\s0 e \s-1ISO\-8859\-1.\s0 Veja também a -seção \s-1MODOS DE\s0 CONVERSÃO. -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Usa a página de código 1252 do Windows (Europa ocidental). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -Usa a página de código 437 do \s-1DOS \s0(\s-1EUA\s0). Essa é a página de código padrão -usada para conversão \s-1ISO.\s0 -.IP "\fB\-850\fR" 4 -.IX Item "-850" -Usa a página de código 850 do \s-1DOS \s0(Europa ocidental). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -Usa a página de código 860 do \s-1DOS \s0(Português). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -Usa a página de código 863 do \s-1DOS \s0(Francês do Canadá). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -Usa a página de código 865 do \s-1DOS \s0(Nórdico). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Converte caracteres de 8 bit para espaço de 7 bit. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Mantém marca de ordem de bytes (\s-1BOM\s0). Quando o arquivo de entrada possuir um -\&\s-1BOM,\s0 escreve um \s-1BOM\s0 no arquivo de saída. Esse é o comportamento padrão ao -converter para quebras de linha do \s-1DOS.\s0 Veja também a opção \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode \s-1MODOCONV\s0\fR" 4 -.IX Item "-c, --convmode MODOCONV" -Define o modo de conversão, sendo \s-1MODOCONV\s0 um dentre: \fIascii\fR, \fI7bit\fR, -\&\fIiso\fR, \fImac\fR com ascii sendo o padrão. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -Força a conversão de arquivos binários. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -No Windows, arquivos \s-1UTF\-16\s0 são convertidos, por padrão, para \s-1UTF\-8,\s0 -independentemente da localização definida. Use esta opção para converter -arquivos \s-1UTF\-16\s0 para \s-1GB18030.\s0 Essa opção está disponível apenas no -Windows. Veja também a seção \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -Exibe ajuda e sai. -.IP "\fB\-i[OPÇÕES], \-\-info[=OPÇÕES] \s-1ARQUIVO ...\s0\fR" 4 -.IX Item "-i[OPÇÕES], --info[=OPÇÕES] ARQUIVO ..." -Exibe informação do arquivo. Nenhuma conversão é feita. -.Sp -A seguinte informação é exibida, nesta ordem: número de quebras de linha do -\&\s-1DOS,\s0 número de quebras de linha do Unix, número de quebras de linha do Mac, -marca de ordem de byte, \*(L"text\*(R" ou \*(L"binário\*(R", nome de arquivo. -.Sp -Saída de exemplo: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Opcionalmente, opções extra podem ser definidas para alterar a saída. Uma ou -mais opções podem ser adicionadas. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Exibe o número de quebras de linhas do \s-1DOS.\s0 -.IP "\fBu\fR" 4 -.IX Item "u" -Exibe o número de quebras de linhas do Unix. -.IP "\fBm\fR" 4 -.IX Item "m" -Exibe o número de quebras de linhas do Mac. -.IP "\fBb\fR" 4 -.IX Item "b" -Exibe a marca de ordem de byte. -.IP "\fBt\fR" 4 -.IX Item "t" -Exibe se arquivo é texto ou binário. -.IP "\fBc\fR" 4 -.IX Item "c" -Exib apenas os arquivos que seriam convertidos. -.Sp -Com a opção \f(CW\*(C`c\*(C'\fR, dos2unix vai exibir apenas os arquivos que contêm quebras -de linha do \s-1DOS,\s0 unix2dos vai exibir apenas os nomes de arquivos que contêm -quebras de linha do Unix. -.RE -.RS 4 -.Sp -Exemplos: -.Sp -Mostra informação sobre todos os arquivos *.txt: -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Mostra apenas o número de quebras de linha \s-1DOS\s0 e Unix: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Mostra apenas a marca de ordem de byte: -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -Lista os arquivos que possuem quebras de linha do \s-1DOS:\s0 -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -Lista os arquivos que possuem quebras de linha do Unix: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -Mantém a marca da data do arquivo de saída igual ao do arquivo de entrada. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -Exibe a licença do programa. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -Adiciona nova linha adicional. -.Sp -\&\fBdos2unix\fR: Apenas quebras de linha do \s-1DOS\s0 são alteradas para duas quebras -de linha do Unix. No modo Mac, apenas quebras de linha do Mac são alterados -para duas quebras de linha do Unix. -.Sp -\&\fBunix2dos\fR: Apenas quebras de linha do Unix são alteradas para duas quebras -de linha do \s-1DOS.\s0 No modo Mac, quebras de linha do Unix são alteradas para -duas quebras de linha do Mac. -.IP "\fB\-m, \-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -Escreve uma marca de ordem de byte (\s-1BOM\s0) no arquivo de saída. Por padrão, um -\&\s-1BOM UTF\-8\s0 é escrito. -.Sp -Quando o arquivo de entrada é \s-1UTF\-16,\s0 e a opção \f(CW\*(C`\-u\*(C'\fR é usada, um \s-1BOM UTF\-16\s0 -será escrito. -.Sp -Nunca use essa opção quando a codificação de saída é outra além de \s-1UTF\-8\s0 ou -\&\s-1UTF\-16.\s0 Veja também a seção \s-1UNICODE.\s0 -.IP "\fB\-n, \-\-newfile \s-1ARQENT\s0 ARQSAÍDA ...\fR" 4 -.IX Item "-n, --newfile ARQENT ARQSAÍDA ..." -Modo de novo arquivo. Converte o arquivo \s-1ARQENT\s0 e escreve a saída para o -arquivo ARQSAÍDA. Os nomes de arquivos devem ser fornecidos em pares e nome -coringa \fInão\fR deveriam ser usados ou você \fIvai\fR perder seus arquivos. -.Sp -A pessoa que começa a conversão em modo novo arquivo (pareado) será o dono -do arquivo convertido. As permissões de leitura/escrita do novo arquivo -serão as permissões do arquivo original menos a \fIumask\fR\|(1) da pessoa que -executa a conversão. -.IP "\fB\-o, \-\-oldfile \s-1ARQUIVO ...\s0\fR" 4 -.IX Item "-o, --oldfile ARQUIVO ..." -Modo arquivo antigo. Converte o arquivo \s-1ARQUIVO\s0 e o sobrescreve com a -saída. O programa, por padrão, executa neste modo. Nomes coringas podem ser -usados. -.Sp -No modo de arquivo antigo (no-lugar) o arquivo convertido recebe no mesmo -dono, grupo e permissões de leitura/escrita que o arquivo original. Também, -quando o arquivo é convertido por outro usuário que tenha permissões de -escrita no arquivo (ex.: usuário root). A conversão será abortada quando não -for possível preservar os valores originais. Alteração do dono pode -significar que o dono original não é mais capaz de ler o arquivo. Alteração -do grupo pode ser um risco para a segurança, pois o arquivo pode ficar -legível para pessoas cujo acesso não é desejado. Preservação do dono, grupo -e permissões de leitura/escrita tem suporte apenas no Unix. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Modo quieto. Suprime todos os avios e mensagens. O valor retornado é -zero. Exceto quando opções de linha de comando erradas forem usadas. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -remove marca de ordem de bytes (\s-1BOM\s0). Não escreve um \s-1BOM\s0 no arquivo de -saída. Esse é o comportamento padrão ao converter para quebras de linha -Unix. Veja também a opção \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s, \-\-safe\fR" 4 -.IX Item "-s, --safe" -Ignora arquivo binários (padrão). -.IP "\fB\-u, \-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -Mantém a codificação \s-1UTF\-16\s0 original do arquivo de entrada. O arquivo de -saída será escrito na mesma codificação \s-1UTF\-16,\s0 em little ou big endian, -como o arquivo de entrada. Isso evita transformação para \s-1UTF\-8.\s0 Como -consequência, um \s-1BOM UTF\-16\s0 será escrito. Essa opção pode ser desabilitada -com a opção \f(CW\*(C`\-ascii\*(C'\fR. -.IP "\fB\-ul, \-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -Presume que o formato de arquivo de entrada é \s-1UTF\-16LE.\s0 -.Sp -Quando há uma marca de ordem de byte no arquivo de entrada, esta tem -prioridade sobre essa opção. -.Sp -Quando você fizer uma presunção equivocada (o arquivo de entrada não estava -no formato \s-1UTF\-16LE\s0) e a conversão funcionar, você terá um arquivo de saída -\&\s-1UTF\-8\s0 com texto errado. Você pode desfazer a conversão errada com \fIiconv\fR\|(1) -pela conversão do arquivo de saída \s-1UTF\-8\s0 de volta para \s-1UTF\-16LE.\s0 Isso vai -trazer de volta o arquivo para o original. -.Sp -A presunção de \s-1UTF\-16LE\s0 funciona como um \fImodo de conversão\fR. Ao alternara -o modo \fIascii\fR padrão, a presunção de \s-1UTF\-16LE\s0 é desativada. -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -Presume que o formato de arquivo de entrada é \s-1UTF\-16BE.\s0 -.Sp -Essa opção funciona o mesmo que a opção \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v, \-\-verbose\fR" 4 -.IX Item "-v, --verbose" -Exibe mensagens detalhadas. Informação extra é exibida sobre marcas de ordem -de byte e a quantidade de quebras de linha convertidas. -.IP "\fB\-F, \-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -Segue ligações simbólicas e converte os alvos. -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Substitui ligações simbólicas com arquivos convertidos (arquivos alvo -originais permanecem inalterados). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -Mentém ligações simbólicas e alvos inalterados (padrão). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -Exibe informação da versão e sai. -.SH "MODO MAC" -.IX Header "MODO MAC" -No modo normal, as quebras de linhas são convertidas de \s-1DOS\s0 para Unix e -vice-versa. Quebras de linha do Mac não são convertidas. -.PP -No modo Mac, quebras de linha são convertidas de Mac para Unix e -vice-versa. Quebras de linha do \s-1DOS\s0 não são alteradas. -.PP -Para executar no modo Mac, use a opção de linha de comando \f(CW\*(C`\-c mac\*(C'\fR ou use -os comandos \f(CW\*(C`mac2unix\*(C'\fR ou \f(CW\*(C`unix2mac\*(C'\fR. -.SH "MODOS DE CONVERSÃO" -.IX Header "MODOS DE CONVERSÃO" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -No modo \f(CW\*(C`ascii\*(C'\fR, apenas as quebras de linha são convertidas. Esse é o modo -de conversão padrão. -.Sp -Apesar do nome deste modo ser \s-1ASCII,\s0 o qual é um padrão de 7 bit, o modo é -em verdade 8 bit. Sempre use este modo quando quiser converter arquivos -Unicode \s-1UTF\-8.\s0 -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -Neste modo todos os caracteres não\-ASCII de 8 bit (com valores entre 128 e -255) são convertidos para um espaço de 7 bit. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Caracteres são convertidos entre um conjunto de caracteres do \s-1DOS \s0(página de -código) e conjunto de caracteres \s-1ISO\-8859\-1 \s0(Latin\-1) no Unix. Caracteres de -\&\s-1DOS\s0 sem um equivalente \s-1ISO\-8859\-1,\s0 para os quais a conversão não é possível, -são convertidos para um ponto. O mesmo vale para caracteres \s-1ISO\-8859\-1\s0 sem a -contraparte \s-1DOS.\s0 -.Sp -Quando apenas a opção \f(CW\*(C`\-iso\*(C'\fR for usada, dos2unix vai tentar determinar a -página de código ativa. Quando isso não for possível, dos2unix vai usar a -página de código padrão \s-1CP437,\s0 a qual é usada principalmente nos \s-1EUA.\s0 Para -forçar uma página de código específica, use as opções \f(CW\*(C`\-437\*(C'\fR (\s-1EUA\s0), \f(CW\*(C`\-850\*(C'\fR -(Europeu oriental), \f(CW\*(C`\-860\*(C'\fR (Português), \f(CW\*(C`\-863\*(C'\fR (Franco-canadense) ou -\&\f(CW\*(C`\-865\*(C'\fR (Nórdico). Também há suporte à página de código do Windows \s-1CP1252 -\&\s0(Europeu ocidental) com a opção \f(CW\*(C`\-1252\*(C'\fR. Para outras páginas de código, use -dos2unix em combinação cm \fIiconv\fR\|(1). Iconv pode converter entre uma lista -grande de codificações de caracteres. -.Sp -Nunca use conversão \s-1ISO\s0 em arquivos textos Unicode. Isso vai corromper os -arquivos codificados em \s-1UTF\-8.\s0 -.Sp -Alguns exemplos: -.Sp -Conversão da página de código padrão do \s-1DOS\s0 para Latin\-1 do Unix: -.Sp -.Vb 1 -\& dos2unix \-iso \-n entrada.txt saída.txt -.Ve -.Sp -Conversão da \s-1CP850\s0 do \s-1DOS\s0 para Latin\-1 do Unix: -.Sp -.Vb 1 -\& dos2unix \-850 \-n entrada.txt saída.txt -.Ve -.Sp -Conversão da \s-1CP1252\s0 do Windows para Latin\-1 do Unix: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n entrada.txt saída.txt -.Ve -.Sp -Conversão da \s-1CP1252\s0 do Windows para \s-1UTF\-8 \s0(Unicode) do Unix: -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 entrada.txt | dos2unix > saída.txt -.Ve -.Sp -Conversão de Latin\-1 do Unix para página de código padrão do \s-1DOS:\s0 -.Sp -.Vb 1 -\& unix2dos \-iso \-n entrada.txt saída.txt -.Ve -.Sp -Conversão do Latin\-1 do Unix para \s-1CP850\s0 do \s-1DOS:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n entrada.txt saída.txt -.Ve -.Sp -Conversão do Latin\-1 do unix para \s-1CP1252\s0 do Windows: -.Sp -.Vb 1 -\& unix2dos \-1252 \-n entrada.txt saída.txt -.Ve -.Sp -Conversão do \s-1UTF\-8 \s0(Unicode) do Unix para \s-1CP1252\s0 do Windows: -.Sp -.Vb 1 -\& unix2dos < entrada.txt | iconv \-f UTF\-8 \-t CP1252 > saída.txt -.Ve -.Sp -Veja também e -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Codificações" -.IX Subsection "Codificações" -Exitem codificações Unicode diferentes. No Unix e no Linux, arquivos Unicode -são geralmente codificados em \s-1UTF\-8.\s0 No Windows, arquivos texto Unicode -podem ser codificados em \s-1UTF\-8, UTF\-16\s0 ou \s-1UTF\-16\s0 big endian, mas na maioria -das vezes são codificados no formato \s-1UTF\-16.\s0 -.SS "Conversão" -.IX Subsection "Conversão" -Arquivos texto em Unicode pode ter quebras de linha \s-1DOS,\s0 Unix ou Mac, como -arquivos texto comuns. -.PP -Todas as versões do dos2unix e unix2dos podem converter arquivos codificados -em \s-1UTF\-8\s0 porque \s-1UTF\-8\s0 foi projetado para ter compatibilidade reversa com -\&\s-1ASCII.\s0 -.PP -Dos2unix e unix2dos com suporte a Unicode \s-1UTF\-16\s0 podem ler arquivos texto -codificados em little e big endian \s-1UTF\-16.\s0 Para ver se dos2unix foi -compilado com suporte a \s-1UTF\-16,\s0 digite \f(CW\*(C`dos2unix \-V\*(C'\fR. -.PP -No Unix/Linux, arquivos codificados em \s-1UTF\-16\s0 são convertidos para a -codificação de caracteres do localização. Use o comando \fIlocale\fR\|(1) para -descobrir qual é a codificação de caracteres da localização. Quando a -conversão não for possível, ocorrerá um erro e o arquivo será ignorado. -.PP -No Windows, arquivos \s-1UTF\-16\s0 são convertidos, por padrão, para -\&\s-1UTF\-8.\s0 Arquivos texto formatados em \s-1UTF\-8\s0 possuem ótimo suporte em ambos -Windows e Unix/Linux. -.PP -Codificações \s-1UTF\-16\s0 e \s-1UTF\-8\s0 são completamente compatíveis, não havendo -qualquer perda de texto na conversão. Quando um erro de conversão \s-1UTF\-16\s0 -para \s-1UTF\-8\s0 ocorre, por exemplo quando o arquivo de entrada \s-1UTF\-16 \s0 contém um -erro, o arquivo será ignorado. -.PP -Quando a opção \f(CW\*(C`\-u\*(C'\fR é usada, o arquivo de saída será escrito na mesma -codificação \s-1UTF\-16\s0 que o arquivo de saída. A opção \f(CW\*(C`\-u\*(C'\fR evita conversão -para \s-1UTF\-8.\s0 -.PP -Dos2unix e unix2dos não possuem opção para converter arquivos \s-1UTF\-8\s0 ára -\&\s-1UTF\-16.\s0 -.PP -Modo de conversão \s-1ISO\s0 e 7\-bit não funciona em arquivos \s-1UTF\-16.\s0 -.SS "Marca de ordem de byte" -.IX Subsection "Marca de ordem de byte" -No Windows, arquivos Unicode normalmente têm uma Marca de Ordem de Byte -(\s-1BOM\s0), porque muitos programas (incluindo o Bloco de Notas) adiciona BOMs -por padrão. Veja também . -.PP -No Unix, arquivos Unicode normalmente não têm \s-1BOM.\s0 Presume-se que arquivos -texto são codificados na codificação de caracteres da localização. -.PP -Dos2unix pode detectar apenas se um arquivo está no formato \s-1UTF\-16\s0 se o -arquivo tiver \s-1BOM.\s0 Quando um arquivo \s-1UTF\-16\s0 não tiver \s-1BOM,\s0 dos2unix vai ver -se o arquivo é um arquivo binário. -.PP -Use a opção \f(CW\*(C`\-ul\*(C'\fR ou \f(CW\*(C`\-ub\*(C'\fR para converter um arquivo \s-1UTF\-16\s0 sem \s-1BOM.\s0 -.PP -Dos2unix escreve por padrão nenhum \s-1BOM\s0 no arquivo de saída. Com a opção -\&\f(CW\*(C`\-b\*(C'\fR, o Dos2unix escreve um \s-1BOM\s0 quando o arquivo de entrada possuir \s-1BOM.\s0 -.PP -Unix2dos escreve por padrão um \s-1BOM\s0 no arquivo de saída quando o arquivo de -entrada tem \s-1BOM.\s0 Use a opção \f(CW\*(C`\-m\*(C'\fR para remover \s-1BOM.\s0 -.PP -Dos2unix e unix2dos sempre escrevem \s-1BOM\s0 quando a opção \f(CW\*(C`\-m\*(C'\fR é usada. -.SS "Exemplos de Unicode" -.IX Subsection "Exemplos de Unicode" -Conversão de \s-1UTF\-16\s0 do Windows (com \s-1BOM\s0) para \s-1UTF\-8\s0 do Unix: -.PP -.Vb 1 -\& dos2unix \-n entrada.txt saída.txt -.Ve -.PP -Conversão de \s-1UTF\-16LE\s0 do Windows (sem \s-1BOM\s0) para \s-1UTF\-8\s0 do Unix: -.PP -.Vb 1 -\& dos2unix \-ul \-n entrada.txt saída.txt -.Ve -.PP -Conversão de \s-1UTF\-8\s0 Unix para \s-1UTF\-8\s0 do Windows com \s-1BOM:\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n entrada.txt saída.txt -.Ve -.PP -Conversão de \s-1UTF\-8\s0 do Unix para \s-1UTF\-16\s0 do Windows: -.PP -.Vb 1 -\& unix2dos < entrada.txt | iconv \-f UTF\-8 \-t UTF\-16 > saída.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 é um padrão governamental chinês. Um subconjunto obrigatório do -padrão \s-1GB18030\s0 é exigido oficialmente para todos os produtos de software -vendidos na China. Veja também . -.PP -\&\s-1GB18030\s0 é completamente compatível com Unicode e pode ser considerado um -formato de transformação de unicode. Assim como \s-1UTF\-8, GB18030\s0 é compatível -com \s-1ASCII. GB18030\s0 também é compatível com a página de código 936 do -Windows, também conhecida como \s-1GBK.\s0 -.PP -No Unix/Linux, arquivos \s-1UTF\-16\s0 são convertidos para \s-1GB18030\s0 quando a -codificação da localização é definida para \s-1GB18030.\s0 Note que isso vai -funcionar apenas se a localização estiver definida para China. Por exemplo, -em uma configuração de localização inglesa (Britânia) a conversão -\&\f(CW\*(C`en_GB.GB18030\*(C'\fR de \s-1UTF\-16\s0 para \s-1GB18030\s0 não vai funcionar, mas em uma -configuração de localização \f(CW\*(C`zh_CN.GB18030\*(C'\fR chinesa vai funcionar. -.PP -No Windows, você precisa usar a opção \f(CW\*(C`\-gb\*(C'\fR para converter arquivos \s-1UTF\-16\s0 -para \s-1GB18030.\s0 -.PP -Arquivos codificados em \s-1GB18030\s0 possuem uma marca de ordem de bytes, como -arquivos Unicode. -.SH "EXEMPLOS" -.IX Header "EXEMPLOS" -Lê a entrada da \*(L"stdin\*(R" e escreve a saída para \*(L"stdout\*(R": -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Converte e substitui a.txt. Converte e substitui b.txt: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Converte e substitui a.txt no modo de conversão ascii: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Converte e substitui a.txt no modo de conversão ascii. Converte e substitui -b.txt no modo de conversão 7bit: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Converte a.txt do formato do Mac para Unix: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Converte a.txt do formato do Unix para Mac: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Converte e substitui a.txt enquanto mantém a marca de data original: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Converte a.txt e escreve para e.txt: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Converte a.txt e escreve para e.txt, mantém a marca de data de e.txt igual a -a.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Converte e substitui a.txt. Converte b.txt e escreve para e.txt: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Converte c.txt e escreve para e.txt. Converte e substitui a.txt. Converte e -substitui b.txt. Converte d.txt e escreve para f.txt: -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "Conversão recursiva" -.IX Header "Conversão recursiva" -Use dos2unix em combinação com os comandos \fIfind\fR\|(1) e \fIxargs\fR\|(1) para converter -recursivamente arquivos texto em uma estrutura de árvore de diretórios. Por -exemplo, para converter todos os arquivos .txt na árvore de diretórios sob o -diretório atual, digite: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "LOCALIZAÇÃO" -.IX Header "LOCALIZAÇÃO" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -O idioma primário é selecionado com a variável de ambiente \s-1LANG. A\s0 variável -\&\s-1LANG\s0 consiste em várias partes. A primeira parte está em letras pequenas no -código do idioma. A segunda parte é opcional e é o código do país em letras -maiúsculo, precedido de um ponto. Alguns exemplos para shells do tipo padrão -\&\s-1POSIX:\s0 -.Sp -.Vb 7 -\& export LANG=nl Holandês -\& export LANG=nl_NL Holandês, Holanda -\& export LANG=nl_BE Holandês, Bélgica -\& export LANG=es_ES Espanhol, Espanha -\& export LANG=es_MX Espanhol, México -\& export LANG=en_US.iso88591 Inglês, EUA, codificação Latin\-1 -\& export LANG=en_GB.UTF\-8 Inglês, Reino Unido, codificação UTF\-8 -.Ve -.Sp -Para a lista completa de códigos de idioma e país, veja o manual do gettext: - -.Sp -Nos sistemas Unix, você pode usar o comando \fIlocale\fR\|(1) para obter informação -específica da localização. -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -Com a variável de ambiente \s-1LANGUAGE,\s0 você pode especificar uma lista de -prioridades de idiomas, separada por vírgulas. Dos2unix fornece preferência -à \s-1LANGUAGE\s0 sobre \s-1LANG.\s0 Por exemplo, primeiro holandês e, então, alemão: -\&\f(CW\*(C`LANGUAGE=nl:de\*(C'\fR. Você primeiro tem que habilitar localização, definindo -\&\s-1LANG \s0(ou \s-1LC_ALL\s0) para um valor diferente de \*(L"C\*(R", antes que você possa usar -uma lista de prioridade de idioma por meio da variável \s-1LANGUAGE.\s0 Veja também -o manual do gettext: - -.Sp -Se você selecionou um idioma que não está disponível, você vai terá as -mensagens em inglês (padrão). -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Com a variável de ambiente \s-1DOS2UNIX_LOCALEDIR,\s0 o \s-1LOCALEDIR\s0 definido durante -a compilação pode ser sobrescrito. \s-1LOCALEDIR\s0 é usada para localizar os -arquivos de idioma. O valor padrão do \s-1GNU\s0 é \f(CW\*(C`/usr/local/share/locale\*(C'\fR. A -opção \fB\-\-version\fR vai exibir o \s-1LOCALEDIR\s0 que é usado. -.Sp -Exemplo (shell \s-1POSIX\s0): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "VALOR RETORNADO" -.IX Header "VALOR RETORNADO" -No sucesso, zero é retornado. Quando um erro de sistema ocorre, o último -erro de sistema será retornado. Para outros erros, 1 é retornado. -.PP -O valor retornado é sempre zero no modo quieto, exceto quando opções de -linha de comando erradas são usadas. -.SH "PADRÕES" -.IX Header "PADRÕES" - -.PP - -.PP - -.PP - -.SH "AUTORES" -.IX Header "AUTORES" -Benjamin Lin \- Bernd Johannes Wuebben (modo mac2unix) -\&\- , Christian Wurll (adiciona nova linha extra) \- -, Erwin Waterlander \- (mantenedor) -.PP -Página do projeto: -.PP -Página do SourceForge: -.SH "Veja também" -.IX Header "Veja também" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/pt_BR/man1/unix2dos.1 b/Tools/dos2unix/share/man/pt_BR/man1/unix2dos.1 deleted file mode 100644 index e603db8..0000000 --- a/Tools/dos2unix/share/man/pt_BR/man1/unix2dos.1 +++ /dev/null @@ -1,754 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NOME" -.IX Header "NOME" -dos2unix \- Conversor de formato de arquivo texto de DOS/Mac para Unix e -vice-versa -.SH "SINOPSE" -.IX Header "SINOPSE" -.Vb 2 -\& dos2unix [opções] [ARQUIVO ...] [\-n ARQENT ARQSAÍDA ...] -\& unix2dos [opções] [ARQUIVO ...] [\-n ARQENT ARQSAÍDA ...] -.Ve -.SH "DESCRIÇÃO" -.IX Header "DESCRIÇÃO" -O pacote Dos2unix inclui utilitários de \f(CW\*(C`dos2unix\*(C'\fR e \f(CW\*(C`unix2dos\*(C'\fR para -converter arquivos texto nos formatos \s-1DOS\s0 ou Mac para formato Unix e -vice-versa. -.PP -Em arquivos texto DOS/Windows uma quebra de linha, também conhecida como -nova linha, é uma combinação de dois caracteres: um Carriage Return (\s-1CR\s0) -seguido por um Line Feed (\s-1LF\s0). Em arquivos texto do Unix uma quebra de linha -é um único caractere: o Line Feed (\s-1LF\s0). Em arquivos texto do Mac, anteriores -ao Mac \s-1OS X,\s0 uma quebra de linha era um único caractere Carriage Return -(\s-1CR\s0). Hoje em dia, Mac \s-1OS\s0 usa quebras de linha no estilo do Unix (\s-1LF\s0). -.PP -Além das quebras de linhas, Dos2unix também pode converter as codificações -de arquivos. Algumas poucas páginas podem ser convertidos para Latin\-1 para -Unix. E arquivos Unicode do Windows (\s-1UTF\-16\s0) podem ser convertidos para -arquivos Unicode do Unix (\s-1UTF\-8\s0). -.PP -Arquivos binários são ignorados automaticamente, a menos que a conversão -seja forçada. -.PP -Arquivos não regulares, tais como diretórios e FIFOs, são ignorados -automaticamente. -.PP -Ligações simbólicas e seus alvos são por padrão mantidas -intocáveis. Ligações simbólicas podem opcionalmente ser substituídas, ou a -saída pode ser escrita para o alvo das ligações simbólicas. Não há suporte -às ligações simbólicas do Windows. -.PP -Dos2unix foi modelado seguindo dos2unix do SunOS/Solaris. Há uma diferença -importante em relação à versão original do SunOS/Solaris. Essa versão faz -conversão no-lugar (modo arquivo antigo) por padrão, enquanto a versão -original do SunOS/Solaris fornecia suporte apenas a conversão pareada (modo -de novo arquivo). Veja também as opções \f(CW\*(C`\-o\*(C'\fR e \f(CW\*(C`\-n\*(C'\fR. -.SH "OPÇÕES" -.IX Header "OPÇÕES" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Trata as opções seguintes como nomes de arquivos. Use essa opção se você -quiser converter arquivos cujos nomes iniciam com um traço. Por exemplo, -para converter um arquivo chamado \*(L"foo\*(R", você pode usar este comando: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -Ou em modo de novo arquivo: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo saída.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Converte apenas as quebras de linhas. Esse é o modo de conversão padrão. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Conversão entre conjunto de caractere do \s-1DOS\s0 e \s-1ISO\-8859\-1.\s0 Veja também a -seção \s-1MODOS DE\s0 CONVERSÃO. -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Usa a página de código 1252 do Windows (Europa ocidental). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -Usa a página de código 437 do \s-1DOS \s0(\s-1EUA\s0). Essa é a página de código padrão -usada para conversão \s-1ISO.\s0 -.IP "\fB\-850\fR" 4 -.IX Item "-850" -Usa a página de código 850 do \s-1DOS \s0(Europa ocidental). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -Usa a página de código 860 do \s-1DOS \s0(Português). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -Usa a página de código 863 do \s-1DOS \s0(Francês do Canadá). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -Usa a página de código 865 do \s-1DOS \s0(Nórdico). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Converte caracteres de 8 bit para espaço de 7 bit. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Mantém marca de ordem de bytes (\s-1BOM\s0). Quando o arquivo de entrada possuir um -\&\s-1BOM,\s0 escreve um \s-1BOM\s0 no arquivo de saída. Esse é o comportamento padrão ao -converter para quebras de linha do \s-1DOS.\s0 Veja também a opção \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode \s-1MODOCONV\s0\fR" 4 -.IX Item "-c, --convmode MODOCONV" -Define o modo de conversão, sendo \s-1MODOCONV\s0 um dentre: \fIascii\fR, \fI7bit\fR, -\&\fIiso\fR, \fImac\fR com ascii sendo o padrão. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -Força a conversão de arquivos binários. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -No Windows, arquivos \s-1UTF\-16\s0 são convertidos, por padrão, para \s-1UTF\-8,\s0 -independentemente da localização definida. Use esta opção para converter -arquivos \s-1UTF\-16\s0 para \s-1GB18030.\s0 Essa opção está disponível apenas no -Windows. Veja também a seção \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -Exibe ajuda e sai. -.IP "\fB\-i[OPÇÕES], \-\-info[=OPÇÕES] \s-1ARQUIVO ...\s0\fR" 4 -.IX Item "-i[OPÇÕES], --info[=OPÇÕES] ARQUIVO ..." -Exibe informação do arquivo. Nenhuma conversão é feita. -.Sp -A seguinte informação é exibida, nesta ordem: número de quebras de linha do -\&\s-1DOS,\s0 número de quebras de linha do Unix, número de quebras de linha do Mac, -marca de ordem de byte, \*(L"text\*(R" ou \*(L"binário\*(R", nome de arquivo. -.Sp -Saída de exemplo: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Opcionalmente, opções extra podem ser definidas para alterar a saída. Uma ou -mais opções podem ser adicionadas. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Exibe o número de quebras de linhas do \s-1DOS.\s0 -.IP "\fBu\fR" 4 -.IX Item "u" -Exibe o número de quebras de linhas do Unix. -.IP "\fBm\fR" 4 -.IX Item "m" -Exibe o número de quebras de linhas do Mac. -.IP "\fBb\fR" 4 -.IX Item "b" -Exibe a marca de ordem de byte. -.IP "\fBt\fR" 4 -.IX Item "t" -Exibe se arquivo é texto ou binário. -.IP "\fBc\fR" 4 -.IX Item "c" -Exib apenas os arquivos que seriam convertidos. -.Sp -Com a opção \f(CW\*(C`c\*(C'\fR, dos2unix vai exibir apenas os arquivos que contêm quebras -de linha do \s-1DOS,\s0 unix2dos vai exibir apenas os nomes de arquivos que contêm -quebras de linha do Unix. -.RE -.RS 4 -.Sp -Exemplos: -.Sp -Mostra informação sobre todos os arquivos *.txt: -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Mostra apenas o número de quebras de linha \s-1DOS\s0 e Unix: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Mostra apenas a marca de ordem de byte: -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -Lista os arquivos que possuem quebras de linha do \s-1DOS:\s0 -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -Lista os arquivos que possuem quebras de linha do Unix: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -Mantém a marca da data do arquivo de saída igual ao do arquivo de entrada. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -Exibe a licença do programa. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -Adiciona nova linha adicional. -.Sp -\&\fBdos2unix\fR: Apenas quebras de linha do \s-1DOS\s0 são alteradas para duas quebras -de linha do Unix. No modo Mac, apenas quebras de linha do Mac são alterados -para duas quebras de linha do Unix. -.Sp -\&\fBunix2dos\fR: Apenas quebras de linha do Unix são alteradas para duas quebras -de linha do \s-1DOS.\s0 No modo Mac, quebras de linha do Unix são alteradas para -duas quebras de linha do Mac. -.IP "\fB\-m, \-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -Escreve uma marca de ordem de byte (\s-1BOM\s0) no arquivo de saída. Por padrão, um -\&\s-1BOM UTF\-8\s0 é escrito. -.Sp -Quando o arquivo de entrada é \s-1UTF\-16,\s0 e a opção \f(CW\*(C`\-u\*(C'\fR é usada, um \s-1BOM UTF\-16\s0 -será escrito. -.Sp -Nunca use essa opção quando a codificação de saída é outra além de \s-1UTF\-8\s0 ou -\&\s-1UTF\-16.\s0 Veja também a seção \s-1UNICODE.\s0 -.IP "\fB\-n, \-\-newfile \s-1ARQENT\s0 ARQSAÍDA ...\fR" 4 -.IX Item "-n, --newfile ARQENT ARQSAÍDA ..." -Modo de novo arquivo. Converte o arquivo \s-1ARQENT\s0 e escreve a saída para o -arquivo ARQSAÍDA. Os nomes de arquivos devem ser fornecidos em pares e nome -coringa \fInão\fR deveriam ser usados ou você \fIvai\fR perder seus arquivos. -.Sp -A pessoa que começa a conversão em modo novo arquivo (pareado) será o dono -do arquivo convertido. As permissões de leitura/escrita do novo arquivo -serão as permissões do arquivo original menos a \fIumask\fR\|(1) da pessoa que -executa a conversão. -.IP "\fB\-o, \-\-oldfile \s-1ARQUIVO ...\s0\fR" 4 -.IX Item "-o, --oldfile ARQUIVO ..." -Modo arquivo antigo. Converte o arquivo \s-1ARQUIVO\s0 e o sobrescreve com a -saída. O programa, por padrão, executa neste modo. Nomes coringas podem ser -usados. -.Sp -No modo de arquivo antigo (no-lugar) o arquivo convertido recebe no mesmo -dono, grupo e permissões de leitura/escrita que o arquivo original. Também, -quando o arquivo é convertido por outro usuário que tenha permissões de -escrita no arquivo (ex.: usuário root). A conversão será abortada quando não -for possível preservar os valores originais. Alteração do dono pode -significar que o dono original não é mais capaz de ler o arquivo. Alteração -do grupo pode ser um risco para a segurança, pois o arquivo pode ficar -legível para pessoas cujo acesso não é desejado. Preservação do dono, grupo -e permissões de leitura/escrita tem suporte apenas no Unix. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Modo quieto. Suprime todos os avios e mensagens. O valor retornado é -zero. Exceto quando opções de linha de comando erradas forem usadas. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -remove marca de ordem de bytes (\s-1BOM\s0). Não escreve um \s-1BOM\s0 no arquivo de -saída. Esse é o comportamento padrão ao converter para quebras de linha -Unix. Veja também a opção \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s, \-\-safe\fR" 4 -.IX Item "-s, --safe" -Ignora arquivo binários (padrão). -.IP "\fB\-u, \-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -Mantém a codificação \s-1UTF\-16\s0 original do arquivo de entrada. O arquivo de -saída será escrito na mesma codificação \s-1UTF\-16,\s0 em little ou big endian, -como o arquivo de entrada. Isso evita transformação para \s-1UTF\-8.\s0 Como -consequência, um \s-1BOM UTF\-16\s0 será escrito. Essa opção pode ser desabilitada -com a opção \f(CW\*(C`\-ascii\*(C'\fR. -.IP "\fB\-ul, \-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -Presume que o formato de arquivo de entrada é \s-1UTF\-16LE.\s0 -.Sp -Quando há uma marca de ordem de byte no arquivo de entrada, esta tem -prioridade sobre essa opção. -.Sp -Quando você fizer uma presunção equivocada (o arquivo de entrada não estava -no formato \s-1UTF\-16LE\s0) e a conversão funcionar, você terá um arquivo de saída -\&\s-1UTF\-8\s0 com texto errado. Você pode desfazer a conversão errada com \fIiconv\fR\|(1) -pela conversão do arquivo de saída \s-1UTF\-8\s0 de volta para \s-1UTF\-16LE.\s0 Isso vai -trazer de volta o arquivo para o original. -.Sp -A presunção de \s-1UTF\-16LE\s0 funciona como um \fImodo de conversão\fR. Ao alternara -o modo \fIascii\fR padrão, a presunção de \s-1UTF\-16LE\s0 é desativada. -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -Presume que o formato de arquivo de entrada é \s-1UTF\-16BE.\s0 -.Sp -Essa opção funciona o mesmo que a opção \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v, \-\-verbose\fR" 4 -.IX Item "-v, --verbose" -Exibe mensagens detalhadas. Informação extra é exibida sobre marcas de ordem -de byte e a quantidade de quebras de linha convertidas. -.IP "\fB\-F, \-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -Segue ligações simbólicas e converte os alvos. -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Substitui ligações simbólicas com arquivos convertidos (arquivos alvo -originais permanecem inalterados). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -Mentém ligações simbólicas e alvos inalterados (padrão). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -Exibe informação da versão e sai. -.SH "MODO MAC" -.IX Header "MODO MAC" -No modo normal, as quebras de linhas são convertidas de \s-1DOS\s0 para Unix e -vice-versa. Quebras de linha do Mac não são convertidas. -.PP -No modo Mac, quebras de linha são convertidas de Mac para Unix e -vice-versa. Quebras de linha do \s-1DOS\s0 não são alteradas. -.PP -Para executar no modo Mac, use a opção de linha de comando \f(CW\*(C`\-c mac\*(C'\fR ou use -os comandos \f(CW\*(C`mac2unix\*(C'\fR ou \f(CW\*(C`unix2mac\*(C'\fR. -.SH "MODOS DE CONVERSÃO" -.IX Header "MODOS DE CONVERSÃO" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -No modo \f(CW\*(C`ascii\*(C'\fR, apenas as quebras de linha são convertidas. Esse é o modo -de conversão padrão. -.Sp -Apesar do nome deste modo ser \s-1ASCII,\s0 o qual é um padrão de 7 bit, o modo é -em verdade 8 bit. Sempre use este modo quando quiser converter arquivos -Unicode \s-1UTF\-8.\s0 -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -Neste modo todos os caracteres não\-ASCII de 8 bit (com valores entre 128 e -255) são convertidos para um espaço de 7 bit. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Caracteres são convertidos entre um conjunto de caracteres do \s-1DOS \s0(página de -código) e conjunto de caracteres \s-1ISO\-8859\-1 \s0(Latin\-1) no Unix. Caracteres de -\&\s-1DOS\s0 sem um equivalente \s-1ISO\-8859\-1,\s0 para os quais a conversão não é possível, -são convertidos para um ponto. O mesmo vale para caracteres \s-1ISO\-8859\-1\s0 sem a -contraparte \s-1DOS.\s0 -.Sp -Quando apenas a opção \f(CW\*(C`\-iso\*(C'\fR for usada, dos2unix vai tentar determinar a -página de código ativa. Quando isso não for possível, dos2unix vai usar a -página de código padrão \s-1CP437,\s0 a qual é usada principalmente nos \s-1EUA.\s0 Para -forçar uma página de código específica, use as opções \f(CW\*(C`\-437\*(C'\fR (\s-1EUA\s0), \f(CW\*(C`\-850\*(C'\fR -(Europeu oriental), \f(CW\*(C`\-860\*(C'\fR (Português), \f(CW\*(C`\-863\*(C'\fR (Franco-canadense) ou -\&\f(CW\*(C`\-865\*(C'\fR (Nórdico). Também há suporte à página de código do Windows \s-1CP1252 -\&\s0(Europeu ocidental) com a opção \f(CW\*(C`\-1252\*(C'\fR. Para outras páginas de código, use -dos2unix em combinação cm \fIiconv\fR\|(1). Iconv pode converter entre uma lista -grande de codificações de caracteres. -.Sp -Nunca use conversão \s-1ISO\s0 em arquivos textos Unicode. Isso vai corromper os -arquivos codificados em \s-1UTF\-8.\s0 -.Sp -Alguns exemplos: -.Sp -Conversão da página de código padrão do \s-1DOS\s0 para Latin\-1 do Unix: -.Sp -.Vb 1 -\& dos2unix \-iso \-n entrada.txt saída.txt -.Ve -.Sp -Conversão da \s-1CP850\s0 do \s-1DOS\s0 para Latin\-1 do Unix: -.Sp -.Vb 1 -\& dos2unix \-850 \-n entrada.txt saída.txt -.Ve -.Sp -Conversão da \s-1CP1252\s0 do Windows para Latin\-1 do Unix: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n entrada.txt saída.txt -.Ve -.Sp -Conversão da \s-1CP1252\s0 do Windows para \s-1UTF\-8 \s0(Unicode) do Unix: -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 entrada.txt | dos2unix > saída.txt -.Ve -.Sp -Conversão de Latin\-1 do Unix para página de código padrão do \s-1DOS:\s0 -.Sp -.Vb 1 -\& unix2dos \-iso \-n entrada.txt saída.txt -.Ve -.Sp -Conversão do Latin\-1 do Unix para \s-1CP850\s0 do \s-1DOS:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n entrada.txt saída.txt -.Ve -.Sp -Conversão do Latin\-1 do unix para \s-1CP1252\s0 do Windows: -.Sp -.Vb 1 -\& unix2dos \-1252 \-n entrada.txt saída.txt -.Ve -.Sp -Conversão do \s-1UTF\-8 \s0(Unicode) do Unix para \s-1CP1252\s0 do Windows: -.Sp -.Vb 1 -\& unix2dos < entrada.txt | iconv \-f UTF\-8 \-t CP1252 > saída.txt -.Ve -.Sp -Veja também e -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Codificações" -.IX Subsection "Codificações" -Exitem codificações Unicode diferentes. No Unix e no Linux, arquivos Unicode -são geralmente codificados em \s-1UTF\-8.\s0 No Windows, arquivos texto Unicode -podem ser codificados em \s-1UTF\-8, UTF\-16\s0 ou \s-1UTF\-16\s0 big endian, mas na maioria -das vezes são codificados no formato \s-1UTF\-16.\s0 -.SS "Conversão" -.IX Subsection "Conversão" -Arquivos texto em Unicode pode ter quebras de linha \s-1DOS,\s0 Unix ou Mac, como -arquivos texto comuns. -.PP -Todas as versões do dos2unix e unix2dos podem converter arquivos codificados -em \s-1UTF\-8\s0 porque \s-1UTF\-8\s0 foi projetado para ter compatibilidade reversa com -\&\s-1ASCII.\s0 -.PP -Dos2unix e unix2dos com suporte a Unicode \s-1UTF\-16\s0 podem ler arquivos texto -codificados em little e big endian \s-1UTF\-16.\s0 Para ver se dos2unix foi -compilado com suporte a \s-1UTF\-16,\s0 digite \f(CW\*(C`dos2unix \-V\*(C'\fR. -.PP -No Unix/Linux, arquivos codificados em \s-1UTF\-16\s0 são convertidos para a -codificação de caracteres do localização. Use o comando \fIlocale\fR\|(1) para -descobrir qual é a codificação de caracteres da localização. Quando a -conversão não for possível, ocorrerá um erro e o arquivo será ignorado. -.PP -No Windows, arquivos \s-1UTF\-16\s0 são convertidos, por padrão, para -\&\s-1UTF\-8.\s0 Arquivos texto formatados em \s-1UTF\-8\s0 possuem ótimo suporte em ambos -Windows e Unix/Linux. -.PP -Codificações \s-1UTF\-16\s0 e \s-1UTF\-8\s0 são completamente compatíveis, não havendo -qualquer perda de texto na conversão. Quando um erro de conversão \s-1UTF\-16\s0 -para \s-1UTF\-8\s0 ocorre, por exemplo quando o arquivo de entrada \s-1UTF\-16 \s0 contém um -erro, o arquivo será ignorado. -.PP -Quando a opção \f(CW\*(C`\-u\*(C'\fR é usada, o arquivo de saída será escrito na mesma -codificação \s-1UTF\-16\s0 que o arquivo de saída. A opção \f(CW\*(C`\-u\*(C'\fR evita conversão -para \s-1UTF\-8.\s0 -.PP -Dos2unix e unix2dos não possuem opção para converter arquivos \s-1UTF\-8\s0 ára -\&\s-1UTF\-16.\s0 -.PP -Modo de conversão \s-1ISO\s0 e 7\-bit não funciona em arquivos \s-1UTF\-16.\s0 -.SS "Marca de ordem de byte" -.IX Subsection "Marca de ordem de byte" -No Windows, arquivos Unicode normalmente têm uma Marca de Ordem de Byte -(\s-1BOM\s0), porque muitos programas (incluindo o Bloco de Notas) adiciona BOMs -por padrão. Veja também . -.PP -No Unix, arquivos Unicode normalmente não têm \s-1BOM.\s0 Presume-se que arquivos -texto são codificados na codificação de caracteres da localização. -.PP -Dos2unix pode detectar apenas se um arquivo está no formato \s-1UTF\-16\s0 se o -arquivo tiver \s-1BOM.\s0 Quando um arquivo \s-1UTF\-16\s0 não tiver \s-1BOM,\s0 dos2unix vai ver -se o arquivo é um arquivo binário. -.PP -Use a opção \f(CW\*(C`\-ul\*(C'\fR ou \f(CW\*(C`\-ub\*(C'\fR para converter um arquivo \s-1UTF\-16\s0 sem \s-1BOM.\s0 -.PP -Dos2unix escreve por padrão nenhum \s-1BOM\s0 no arquivo de saída. Com a opção -\&\f(CW\*(C`\-b\*(C'\fR, o Dos2unix escreve um \s-1BOM\s0 quando o arquivo de entrada possuir \s-1BOM.\s0 -.PP -Unix2dos escreve por padrão um \s-1BOM\s0 no arquivo de saída quando o arquivo de -entrada tem \s-1BOM.\s0 Use a opção \f(CW\*(C`\-m\*(C'\fR para remover \s-1BOM.\s0 -.PP -Dos2unix e unix2dos sempre escrevem \s-1BOM\s0 quando a opção \f(CW\*(C`\-m\*(C'\fR é usada. -.SS "Exemplos de Unicode" -.IX Subsection "Exemplos de Unicode" -Conversão de \s-1UTF\-16\s0 do Windows (com \s-1BOM\s0) para \s-1UTF\-8\s0 do Unix: -.PP -.Vb 1 -\& dos2unix \-n entrada.txt saída.txt -.Ve -.PP -Conversão de \s-1UTF\-16LE\s0 do Windows (sem \s-1BOM\s0) para \s-1UTF\-8\s0 do Unix: -.PP -.Vb 1 -\& dos2unix \-ul \-n entrada.txt saída.txt -.Ve -.PP -Conversão de \s-1UTF\-8\s0 Unix para \s-1UTF\-8\s0 do Windows com \s-1BOM:\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n entrada.txt saída.txt -.Ve -.PP -Conversão de \s-1UTF\-8\s0 do Unix para \s-1UTF\-16\s0 do Windows: -.PP -.Vb 1 -\& unix2dos < entrada.txt | iconv \-f UTF\-8 \-t UTF\-16 > saída.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 é um padrão governamental chinês. Um subconjunto obrigatório do -padrão \s-1GB18030\s0 é exigido oficialmente para todos os produtos de software -vendidos na China. Veja também . -.PP -\&\s-1GB18030\s0 é completamente compatível com Unicode e pode ser considerado um -formato de transformação de unicode. Assim como \s-1UTF\-8, GB18030\s0 é compatível -com \s-1ASCII. GB18030\s0 também é compatível com a página de código 936 do -Windows, também conhecida como \s-1GBK.\s0 -.PP -No Unix/Linux, arquivos \s-1UTF\-16\s0 são convertidos para \s-1GB18030\s0 quando a -codificação da localização é definida para \s-1GB18030.\s0 Note que isso vai -funcionar apenas se a localização estiver definida para China. Por exemplo, -em uma configuração de localização inglesa (Britânia) a conversão -\&\f(CW\*(C`en_GB.GB18030\*(C'\fR de \s-1UTF\-16\s0 para \s-1GB18030\s0 não vai funcionar, mas em uma -configuração de localização \f(CW\*(C`zh_CN.GB18030\*(C'\fR chinesa vai funcionar. -.PP -No Windows, você precisa usar a opção \f(CW\*(C`\-gb\*(C'\fR para converter arquivos \s-1UTF\-16\s0 -para \s-1GB18030.\s0 -.PP -Arquivos codificados em \s-1GB18030\s0 possuem uma marca de ordem de bytes, como -arquivos Unicode. -.SH "EXEMPLOS" -.IX Header "EXEMPLOS" -Lê a entrada da \*(L"stdin\*(R" e escreve a saída para \*(L"stdout\*(R": -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Converte e substitui a.txt. Converte e substitui b.txt: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Converte e substitui a.txt no modo de conversão ascii: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Converte e substitui a.txt no modo de conversão ascii. Converte e substitui -b.txt no modo de conversão 7bit: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Converte a.txt do formato do Mac para Unix: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Converte a.txt do formato do Unix para Mac: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Converte e substitui a.txt enquanto mantém a marca de data original: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Converte a.txt e escreve para e.txt: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Converte a.txt e escreve para e.txt, mantém a marca de data de e.txt igual a -a.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Converte e substitui a.txt. Converte b.txt e escreve para e.txt: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Converte c.txt e escreve para e.txt. Converte e substitui a.txt. Converte e -substitui b.txt. Converte d.txt e escreve para f.txt: -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "Conversão recursiva" -.IX Header "Conversão recursiva" -Use dos2unix em combinação com os comandos \fIfind\fR\|(1) e \fIxargs\fR\|(1) para converter -recursivamente arquivos texto em uma estrutura de árvore de diretórios. Por -exemplo, para converter todos os arquivos .txt na árvore de diretórios sob o -diretório atual, digite: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "LOCALIZAÇÃO" -.IX Header "LOCALIZAÇÃO" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -O idioma primário é selecionado com a variável de ambiente \s-1LANG. A\s0 variável -\&\s-1LANG\s0 consiste em várias partes. A primeira parte está em letras pequenas no -código do idioma. A segunda parte é opcional e é o código do país em letras -maiúsculo, precedido de um ponto. Alguns exemplos para shells do tipo padrão -\&\s-1POSIX:\s0 -.Sp -.Vb 7 -\& export LANG=nl Holandês -\& export LANG=nl_NL Holandês, Holanda -\& export LANG=nl_BE Holandês, Bélgica -\& export LANG=es_ES Espanhol, Espanha -\& export LANG=es_MX Espanhol, México -\& export LANG=en_US.iso88591 Inglês, EUA, codificação Latin\-1 -\& export LANG=en_GB.UTF\-8 Inglês, Reino Unido, codificação UTF\-8 -.Ve -.Sp -Para a lista completa de códigos de idioma e país, veja o manual do gettext: - -.Sp -Nos sistemas Unix, você pode usar o comando \fIlocale\fR\|(1) para obter informação -específica da localização. -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -Com a variável de ambiente \s-1LANGUAGE,\s0 você pode especificar uma lista de -prioridades de idiomas, separada por vírgulas. Dos2unix fornece preferência -à \s-1LANGUAGE\s0 sobre \s-1LANG.\s0 Por exemplo, primeiro holandês e, então, alemão: -\&\f(CW\*(C`LANGUAGE=nl:de\*(C'\fR. Você primeiro tem que habilitar localização, definindo -\&\s-1LANG \s0(ou \s-1LC_ALL\s0) para um valor diferente de \*(L"C\*(R", antes que você possa usar -uma lista de prioridade de idioma por meio da variável \s-1LANGUAGE.\s0 Veja também -o manual do gettext: - -.Sp -Se você selecionou um idioma que não está disponível, você vai terá as -mensagens em inglês (padrão). -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Com a variável de ambiente \s-1DOS2UNIX_LOCALEDIR,\s0 o \s-1LOCALEDIR\s0 definido durante -a compilação pode ser sobrescrito. \s-1LOCALEDIR\s0 é usada para localizar os -arquivos de idioma. O valor padrão do \s-1GNU\s0 é \f(CW\*(C`/usr/local/share/locale\*(C'\fR. A -opção \fB\-\-version\fR vai exibir o \s-1LOCALEDIR\s0 que é usado. -.Sp -Exemplo (shell \s-1POSIX\s0): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "VALOR RETORNADO" -.IX Header "VALOR RETORNADO" -No sucesso, zero é retornado. Quando um erro de sistema ocorre, o último -erro de sistema será retornado. Para outros erros, 1 é retornado. -.PP -O valor retornado é sempre zero no modo quieto, exceto quando opções de -linha de comando erradas são usadas. -.SH "PADRÕES" -.IX Header "PADRÕES" - -.PP - -.PP - -.PP - -.SH "AUTORES" -.IX Header "AUTORES" -Benjamin Lin \- Bernd Johannes Wuebben (modo mac2unix) -\&\- , Christian Wurll (adiciona nova linha extra) \- -, Erwin Waterlander \- (mantenedor) -.PP -Página do projeto: -.PP -Página do SourceForge: -.SH "Veja também" -.IX Header "Veja também" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/pt_BR/man1/unix2mac.1 b/Tools/dos2unix/share/man/pt_BR/man1/unix2mac.1 deleted file mode 100644 index e603db8..0000000 --- a/Tools/dos2unix/share/man/pt_BR/man1/unix2mac.1 +++ /dev/null @@ -1,754 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NOME" -.IX Header "NOME" -dos2unix \- Conversor de formato de arquivo texto de DOS/Mac para Unix e -vice-versa -.SH "SINOPSE" -.IX Header "SINOPSE" -.Vb 2 -\& dos2unix [opções] [ARQUIVO ...] [\-n ARQENT ARQSAÍDA ...] -\& unix2dos [opções] [ARQUIVO ...] [\-n ARQENT ARQSAÍDA ...] -.Ve -.SH "DESCRIÇÃO" -.IX Header "DESCRIÇÃO" -O pacote Dos2unix inclui utilitários de \f(CW\*(C`dos2unix\*(C'\fR e \f(CW\*(C`unix2dos\*(C'\fR para -converter arquivos texto nos formatos \s-1DOS\s0 ou Mac para formato Unix e -vice-versa. -.PP -Em arquivos texto DOS/Windows uma quebra de linha, também conhecida como -nova linha, é uma combinação de dois caracteres: um Carriage Return (\s-1CR\s0) -seguido por um Line Feed (\s-1LF\s0). Em arquivos texto do Unix uma quebra de linha -é um único caractere: o Line Feed (\s-1LF\s0). Em arquivos texto do Mac, anteriores -ao Mac \s-1OS X,\s0 uma quebra de linha era um único caractere Carriage Return -(\s-1CR\s0). Hoje em dia, Mac \s-1OS\s0 usa quebras de linha no estilo do Unix (\s-1LF\s0). -.PP -Além das quebras de linhas, Dos2unix também pode converter as codificações -de arquivos. Algumas poucas páginas podem ser convertidos para Latin\-1 para -Unix. E arquivos Unicode do Windows (\s-1UTF\-16\s0) podem ser convertidos para -arquivos Unicode do Unix (\s-1UTF\-8\s0). -.PP -Arquivos binários são ignorados automaticamente, a menos que a conversão -seja forçada. -.PP -Arquivos não regulares, tais como diretórios e FIFOs, são ignorados -automaticamente. -.PP -Ligações simbólicas e seus alvos são por padrão mantidas -intocáveis. Ligações simbólicas podem opcionalmente ser substituídas, ou a -saída pode ser escrita para o alvo das ligações simbólicas. Não há suporte -às ligações simbólicas do Windows. -.PP -Dos2unix foi modelado seguindo dos2unix do SunOS/Solaris. Há uma diferença -importante em relação à versão original do SunOS/Solaris. Essa versão faz -conversão no-lugar (modo arquivo antigo) por padrão, enquanto a versão -original do SunOS/Solaris fornecia suporte apenas a conversão pareada (modo -de novo arquivo). Veja também as opções \f(CW\*(C`\-o\*(C'\fR e \f(CW\*(C`\-n\*(C'\fR. -.SH "OPÇÕES" -.IX Header "OPÇÕES" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Trata as opções seguintes como nomes de arquivos. Use essa opção se você -quiser converter arquivos cujos nomes iniciam com um traço. Por exemplo, -para converter um arquivo chamado \*(L"foo\*(R", você pode usar este comando: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -Ou em modo de novo arquivo: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo saída.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Converte apenas as quebras de linhas. Esse é o modo de conversão padrão. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Conversão entre conjunto de caractere do \s-1DOS\s0 e \s-1ISO\-8859\-1.\s0 Veja também a -seção \s-1MODOS DE\s0 CONVERSÃO. -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Usa a página de código 1252 do Windows (Europa ocidental). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -Usa a página de código 437 do \s-1DOS \s0(\s-1EUA\s0). Essa é a página de código padrão -usada para conversão \s-1ISO.\s0 -.IP "\fB\-850\fR" 4 -.IX Item "-850" -Usa a página de código 850 do \s-1DOS \s0(Europa ocidental). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -Usa a página de código 860 do \s-1DOS \s0(Português). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -Usa a página de código 863 do \s-1DOS \s0(Francês do Canadá). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -Usa a página de código 865 do \s-1DOS \s0(Nórdico). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Converte caracteres de 8 bit para espaço de 7 bit. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Mantém marca de ordem de bytes (\s-1BOM\s0). Quando o arquivo de entrada possuir um -\&\s-1BOM,\s0 escreve um \s-1BOM\s0 no arquivo de saída. Esse é o comportamento padrão ao -converter para quebras de linha do \s-1DOS.\s0 Veja também a opção \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode \s-1MODOCONV\s0\fR" 4 -.IX Item "-c, --convmode MODOCONV" -Define o modo de conversão, sendo \s-1MODOCONV\s0 um dentre: \fIascii\fR, \fI7bit\fR, -\&\fIiso\fR, \fImac\fR com ascii sendo o padrão. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -Força a conversão de arquivos binários. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -No Windows, arquivos \s-1UTF\-16\s0 são convertidos, por padrão, para \s-1UTF\-8,\s0 -independentemente da localização definida. Use esta opção para converter -arquivos \s-1UTF\-16\s0 para \s-1GB18030.\s0 Essa opção está disponível apenas no -Windows. Veja também a seção \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -Exibe ajuda e sai. -.IP "\fB\-i[OPÇÕES], \-\-info[=OPÇÕES] \s-1ARQUIVO ...\s0\fR" 4 -.IX Item "-i[OPÇÕES], --info[=OPÇÕES] ARQUIVO ..." -Exibe informação do arquivo. Nenhuma conversão é feita. -.Sp -A seguinte informação é exibida, nesta ordem: número de quebras de linha do -\&\s-1DOS,\s0 número de quebras de linha do Unix, número de quebras de linha do Mac, -marca de ordem de byte, \*(L"text\*(R" ou \*(L"binário\*(R", nome de arquivo. -.Sp -Saída de exemplo: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Opcionalmente, opções extra podem ser definidas para alterar a saída. Uma ou -mais opções podem ser adicionadas. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Exibe o número de quebras de linhas do \s-1DOS.\s0 -.IP "\fBu\fR" 4 -.IX Item "u" -Exibe o número de quebras de linhas do Unix. -.IP "\fBm\fR" 4 -.IX Item "m" -Exibe o número de quebras de linhas do Mac. -.IP "\fBb\fR" 4 -.IX Item "b" -Exibe a marca de ordem de byte. -.IP "\fBt\fR" 4 -.IX Item "t" -Exibe se arquivo é texto ou binário. -.IP "\fBc\fR" 4 -.IX Item "c" -Exib apenas os arquivos que seriam convertidos. -.Sp -Com a opção \f(CW\*(C`c\*(C'\fR, dos2unix vai exibir apenas os arquivos que contêm quebras -de linha do \s-1DOS,\s0 unix2dos vai exibir apenas os nomes de arquivos que contêm -quebras de linha do Unix. -.RE -.RS 4 -.Sp -Exemplos: -.Sp -Mostra informação sobre todos os arquivos *.txt: -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Mostra apenas o número de quebras de linha \s-1DOS\s0 e Unix: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Mostra apenas a marca de ordem de byte: -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -Lista os arquivos que possuem quebras de linha do \s-1DOS:\s0 -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -Lista os arquivos que possuem quebras de linha do Unix: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -Mantém a marca da data do arquivo de saída igual ao do arquivo de entrada. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -Exibe a licença do programa. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -Adiciona nova linha adicional. -.Sp -\&\fBdos2unix\fR: Apenas quebras de linha do \s-1DOS\s0 são alteradas para duas quebras -de linha do Unix. No modo Mac, apenas quebras de linha do Mac são alterados -para duas quebras de linha do Unix. -.Sp -\&\fBunix2dos\fR: Apenas quebras de linha do Unix são alteradas para duas quebras -de linha do \s-1DOS.\s0 No modo Mac, quebras de linha do Unix são alteradas para -duas quebras de linha do Mac. -.IP "\fB\-m, \-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -Escreve uma marca de ordem de byte (\s-1BOM\s0) no arquivo de saída. Por padrão, um -\&\s-1BOM UTF\-8\s0 é escrito. -.Sp -Quando o arquivo de entrada é \s-1UTF\-16,\s0 e a opção \f(CW\*(C`\-u\*(C'\fR é usada, um \s-1BOM UTF\-16\s0 -será escrito. -.Sp -Nunca use essa opção quando a codificação de saída é outra além de \s-1UTF\-8\s0 ou -\&\s-1UTF\-16.\s0 Veja também a seção \s-1UNICODE.\s0 -.IP "\fB\-n, \-\-newfile \s-1ARQENT\s0 ARQSAÍDA ...\fR" 4 -.IX Item "-n, --newfile ARQENT ARQSAÍDA ..." -Modo de novo arquivo. Converte o arquivo \s-1ARQENT\s0 e escreve a saída para o -arquivo ARQSAÍDA. Os nomes de arquivos devem ser fornecidos em pares e nome -coringa \fInão\fR deveriam ser usados ou você \fIvai\fR perder seus arquivos. -.Sp -A pessoa que começa a conversão em modo novo arquivo (pareado) será o dono -do arquivo convertido. As permissões de leitura/escrita do novo arquivo -serão as permissões do arquivo original menos a \fIumask\fR\|(1) da pessoa que -executa a conversão. -.IP "\fB\-o, \-\-oldfile \s-1ARQUIVO ...\s0\fR" 4 -.IX Item "-o, --oldfile ARQUIVO ..." -Modo arquivo antigo. Converte o arquivo \s-1ARQUIVO\s0 e o sobrescreve com a -saída. O programa, por padrão, executa neste modo. Nomes coringas podem ser -usados. -.Sp -No modo de arquivo antigo (no-lugar) o arquivo convertido recebe no mesmo -dono, grupo e permissões de leitura/escrita que o arquivo original. Também, -quando o arquivo é convertido por outro usuário que tenha permissões de -escrita no arquivo (ex.: usuário root). A conversão será abortada quando não -for possível preservar os valores originais. Alteração do dono pode -significar que o dono original não é mais capaz de ler o arquivo. Alteração -do grupo pode ser um risco para a segurança, pois o arquivo pode ficar -legível para pessoas cujo acesso não é desejado. Preservação do dono, grupo -e permissões de leitura/escrita tem suporte apenas no Unix. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Modo quieto. Suprime todos os avios e mensagens. O valor retornado é -zero. Exceto quando opções de linha de comando erradas forem usadas. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -remove marca de ordem de bytes (\s-1BOM\s0). Não escreve um \s-1BOM\s0 no arquivo de -saída. Esse é o comportamento padrão ao converter para quebras de linha -Unix. Veja também a opção \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s, \-\-safe\fR" 4 -.IX Item "-s, --safe" -Ignora arquivo binários (padrão). -.IP "\fB\-u, \-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -Mantém a codificação \s-1UTF\-16\s0 original do arquivo de entrada. O arquivo de -saída será escrito na mesma codificação \s-1UTF\-16,\s0 em little ou big endian, -como o arquivo de entrada. Isso evita transformação para \s-1UTF\-8.\s0 Como -consequência, um \s-1BOM UTF\-16\s0 será escrito. Essa opção pode ser desabilitada -com a opção \f(CW\*(C`\-ascii\*(C'\fR. -.IP "\fB\-ul, \-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -Presume que o formato de arquivo de entrada é \s-1UTF\-16LE.\s0 -.Sp -Quando há uma marca de ordem de byte no arquivo de entrada, esta tem -prioridade sobre essa opção. -.Sp -Quando você fizer uma presunção equivocada (o arquivo de entrada não estava -no formato \s-1UTF\-16LE\s0) e a conversão funcionar, você terá um arquivo de saída -\&\s-1UTF\-8\s0 com texto errado. Você pode desfazer a conversão errada com \fIiconv\fR\|(1) -pela conversão do arquivo de saída \s-1UTF\-8\s0 de volta para \s-1UTF\-16LE.\s0 Isso vai -trazer de volta o arquivo para o original. -.Sp -A presunção de \s-1UTF\-16LE\s0 funciona como um \fImodo de conversão\fR. Ao alternara -o modo \fIascii\fR padrão, a presunção de \s-1UTF\-16LE\s0 é desativada. -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -Presume que o formato de arquivo de entrada é \s-1UTF\-16BE.\s0 -.Sp -Essa opção funciona o mesmo que a opção \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v, \-\-verbose\fR" 4 -.IX Item "-v, --verbose" -Exibe mensagens detalhadas. Informação extra é exibida sobre marcas de ordem -de byte e a quantidade de quebras de linha convertidas. -.IP "\fB\-F, \-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -Segue ligações simbólicas e converte os alvos. -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Substitui ligações simbólicas com arquivos convertidos (arquivos alvo -originais permanecem inalterados). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -Mentém ligações simbólicas e alvos inalterados (padrão). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -Exibe informação da versão e sai. -.SH "MODO MAC" -.IX Header "MODO MAC" -No modo normal, as quebras de linhas são convertidas de \s-1DOS\s0 para Unix e -vice-versa. Quebras de linha do Mac não são convertidas. -.PP -No modo Mac, quebras de linha são convertidas de Mac para Unix e -vice-versa. Quebras de linha do \s-1DOS\s0 não são alteradas. -.PP -Para executar no modo Mac, use a opção de linha de comando \f(CW\*(C`\-c mac\*(C'\fR ou use -os comandos \f(CW\*(C`mac2unix\*(C'\fR ou \f(CW\*(C`unix2mac\*(C'\fR. -.SH "MODOS DE CONVERSÃO" -.IX Header "MODOS DE CONVERSÃO" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -No modo \f(CW\*(C`ascii\*(C'\fR, apenas as quebras de linha são convertidas. Esse é o modo -de conversão padrão. -.Sp -Apesar do nome deste modo ser \s-1ASCII,\s0 o qual é um padrão de 7 bit, o modo é -em verdade 8 bit. Sempre use este modo quando quiser converter arquivos -Unicode \s-1UTF\-8.\s0 -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -Neste modo todos os caracteres não\-ASCII de 8 bit (com valores entre 128 e -255) são convertidos para um espaço de 7 bit. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Caracteres são convertidos entre um conjunto de caracteres do \s-1DOS \s0(página de -código) e conjunto de caracteres \s-1ISO\-8859\-1 \s0(Latin\-1) no Unix. Caracteres de -\&\s-1DOS\s0 sem um equivalente \s-1ISO\-8859\-1,\s0 para os quais a conversão não é possível, -são convertidos para um ponto. O mesmo vale para caracteres \s-1ISO\-8859\-1\s0 sem a -contraparte \s-1DOS.\s0 -.Sp -Quando apenas a opção \f(CW\*(C`\-iso\*(C'\fR for usada, dos2unix vai tentar determinar a -página de código ativa. Quando isso não for possível, dos2unix vai usar a -página de código padrão \s-1CP437,\s0 a qual é usada principalmente nos \s-1EUA.\s0 Para -forçar uma página de código específica, use as opções \f(CW\*(C`\-437\*(C'\fR (\s-1EUA\s0), \f(CW\*(C`\-850\*(C'\fR -(Europeu oriental), \f(CW\*(C`\-860\*(C'\fR (Português), \f(CW\*(C`\-863\*(C'\fR (Franco-canadense) ou -\&\f(CW\*(C`\-865\*(C'\fR (Nórdico). Também há suporte à página de código do Windows \s-1CP1252 -\&\s0(Europeu ocidental) com a opção \f(CW\*(C`\-1252\*(C'\fR. Para outras páginas de código, use -dos2unix em combinação cm \fIiconv\fR\|(1). Iconv pode converter entre uma lista -grande de codificações de caracteres. -.Sp -Nunca use conversão \s-1ISO\s0 em arquivos textos Unicode. Isso vai corromper os -arquivos codificados em \s-1UTF\-8.\s0 -.Sp -Alguns exemplos: -.Sp -Conversão da página de código padrão do \s-1DOS\s0 para Latin\-1 do Unix: -.Sp -.Vb 1 -\& dos2unix \-iso \-n entrada.txt saída.txt -.Ve -.Sp -Conversão da \s-1CP850\s0 do \s-1DOS\s0 para Latin\-1 do Unix: -.Sp -.Vb 1 -\& dos2unix \-850 \-n entrada.txt saída.txt -.Ve -.Sp -Conversão da \s-1CP1252\s0 do Windows para Latin\-1 do Unix: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n entrada.txt saída.txt -.Ve -.Sp -Conversão da \s-1CP1252\s0 do Windows para \s-1UTF\-8 \s0(Unicode) do Unix: -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 entrada.txt | dos2unix > saída.txt -.Ve -.Sp -Conversão de Latin\-1 do Unix para página de código padrão do \s-1DOS:\s0 -.Sp -.Vb 1 -\& unix2dos \-iso \-n entrada.txt saída.txt -.Ve -.Sp -Conversão do Latin\-1 do Unix para \s-1CP850\s0 do \s-1DOS:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n entrada.txt saída.txt -.Ve -.Sp -Conversão do Latin\-1 do unix para \s-1CP1252\s0 do Windows: -.Sp -.Vb 1 -\& unix2dos \-1252 \-n entrada.txt saída.txt -.Ve -.Sp -Conversão do \s-1UTF\-8 \s0(Unicode) do Unix para \s-1CP1252\s0 do Windows: -.Sp -.Vb 1 -\& unix2dos < entrada.txt | iconv \-f UTF\-8 \-t CP1252 > saída.txt -.Ve -.Sp -Veja também e -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Codificações" -.IX Subsection "Codificações" -Exitem codificações Unicode diferentes. No Unix e no Linux, arquivos Unicode -são geralmente codificados em \s-1UTF\-8.\s0 No Windows, arquivos texto Unicode -podem ser codificados em \s-1UTF\-8, UTF\-16\s0 ou \s-1UTF\-16\s0 big endian, mas na maioria -das vezes são codificados no formato \s-1UTF\-16.\s0 -.SS "Conversão" -.IX Subsection "Conversão" -Arquivos texto em Unicode pode ter quebras de linha \s-1DOS,\s0 Unix ou Mac, como -arquivos texto comuns. -.PP -Todas as versões do dos2unix e unix2dos podem converter arquivos codificados -em \s-1UTF\-8\s0 porque \s-1UTF\-8\s0 foi projetado para ter compatibilidade reversa com -\&\s-1ASCII.\s0 -.PP -Dos2unix e unix2dos com suporte a Unicode \s-1UTF\-16\s0 podem ler arquivos texto -codificados em little e big endian \s-1UTF\-16.\s0 Para ver se dos2unix foi -compilado com suporte a \s-1UTF\-16,\s0 digite \f(CW\*(C`dos2unix \-V\*(C'\fR. -.PP -No Unix/Linux, arquivos codificados em \s-1UTF\-16\s0 são convertidos para a -codificação de caracteres do localização. Use o comando \fIlocale\fR\|(1) para -descobrir qual é a codificação de caracteres da localização. Quando a -conversão não for possível, ocorrerá um erro e o arquivo será ignorado. -.PP -No Windows, arquivos \s-1UTF\-16\s0 são convertidos, por padrão, para -\&\s-1UTF\-8.\s0 Arquivos texto formatados em \s-1UTF\-8\s0 possuem ótimo suporte em ambos -Windows e Unix/Linux. -.PP -Codificações \s-1UTF\-16\s0 e \s-1UTF\-8\s0 são completamente compatíveis, não havendo -qualquer perda de texto na conversão. Quando um erro de conversão \s-1UTF\-16\s0 -para \s-1UTF\-8\s0 ocorre, por exemplo quando o arquivo de entrada \s-1UTF\-16 \s0 contém um -erro, o arquivo será ignorado. -.PP -Quando a opção \f(CW\*(C`\-u\*(C'\fR é usada, o arquivo de saída será escrito na mesma -codificação \s-1UTF\-16\s0 que o arquivo de saída. A opção \f(CW\*(C`\-u\*(C'\fR evita conversão -para \s-1UTF\-8.\s0 -.PP -Dos2unix e unix2dos não possuem opção para converter arquivos \s-1UTF\-8\s0 ára -\&\s-1UTF\-16.\s0 -.PP -Modo de conversão \s-1ISO\s0 e 7\-bit não funciona em arquivos \s-1UTF\-16.\s0 -.SS "Marca de ordem de byte" -.IX Subsection "Marca de ordem de byte" -No Windows, arquivos Unicode normalmente têm uma Marca de Ordem de Byte -(\s-1BOM\s0), porque muitos programas (incluindo o Bloco de Notas) adiciona BOMs -por padrão. Veja também . -.PP -No Unix, arquivos Unicode normalmente não têm \s-1BOM.\s0 Presume-se que arquivos -texto são codificados na codificação de caracteres da localização. -.PP -Dos2unix pode detectar apenas se um arquivo está no formato \s-1UTF\-16\s0 se o -arquivo tiver \s-1BOM.\s0 Quando um arquivo \s-1UTF\-16\s0 não tiver \s-1BOM,\s0 dos2unix vai ver -se o arquivo é um arquivo binário. -.PP -Use a opção \f(CW\*(C`\-ul\*(C'\fR ou \f(CW\*(C`\-ub\*(C'\fR para converter um arquivo \s-1UTF\-16\s0 sem \s-1BOM.\s0 -.PP -Dos2unix escreve por padrão nenhum \s-1BOM\s0 no arquivo de saída. Com a opção -\&\f(CW\*(C`\-b\*(C'\fR, o Dos2unix escreve um \s-1BOM\s0 quando o arquivo de entrada possuir \s-1BOM.\s0 -.PP -Unix2dos escreve por padrão um \s-1BOM\s0 no arquivo de saída quando o arquivo de -entrada tem \s-1BOM.\s0 Use a opção \f(CW\*(C`\-m\*(C'\fR para remover \s-1BOM.\s0 -.PP -Dos2unix e unix2dos sempre escrevem \s-1BOM\s0 quando a opção \f(CW\*(C`\-m\*(C'\fR é usada. -.SS "Exemplos de Unicode" -.IX Subsection "Exemplos de Unicode" -Conversão de \s-1UTF\-16\s0 do Windows (com \s-1BOM\s0) para \s-1UTF\-8\s0 do Unix: -.PP -.Vb 1 -\& dos2unix \-n entrada.txt saída.txt -.Ve -.PP -Conversão de \s-1UTF\-16LE\s0 do Windows (sem \s-1BOM\s0) para \s-1UTF\-8\s0 do Unix: -.PP -.Vb 1 -\& dos2unix \-ul \-n entrada.txt saída.txt -.Ve -.PP -Conversão de \s-1UTF\-8\s0 Unix para \s-1UTF\-8\s0 do Windows com \s-1BOM:\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n entrada.txt saída.txt -.Ve -.PP -Conversão de \s-1UTF\-8\s0 do Unix para \s-1UTF\-16\s0 do Windows: -.PP -.Vb 1 -\& unix2dos < entrada.txt | iconv \-f UTF\-8 \-t UTF\-16 > saída.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 é um padrão governamental chinês. Um subconjunto obrigatório do -padrão \s-1GB18030\s0 é exigido oficialmente para todos os produtos de software -vendidos na China. Veja também . -.PP -\&\s-1GB18030\s0 é completamente compatível com Unicode e pode ser considerado um -formato de transformação de unicode. Assim como \s-1UTF\-8, GB18030\s0 é compatível -com \s-1ASCII. GB18030\s0 também é compatível com a página de código 936 do -Windows, também conhecida como \s-1GBK.\s0 -.PP -No Unix/Linux, arquivos \s-1UTF\-16\s0 são convertidos para \s-1GB18030\s0 quando a -codificação da localização é definida para \s-1GB18030.\s0 Note que isso vai -funcionar apenas se a localização estiver definida para China. Por exemplo, -em uma configuração de localização inglesa (Britânia) a conversão -\&\f(CW\*(C`en_GB.GB18030\*(C'\fR de \s-1UTF\-16\s0 para \s-1GB18030\s0 não vai funcionar, mas em uma -configuração de localização \f(CW\*(C`zh_CN.GB18030\*(C'\fR chinesa vai funcionar. -.PP -No Windows, você precisa usar a opção \f(CW\*(C`\-gb\*(C'\fR para converter arquivos \s-1UTF\-16\s0 -para \s-1GB18030.\s0 -.PP -Arquivos codificados em \s-1GB18030\s0 possuem uma marca de ordem de bytes, como -arquivos Unicode. -.SH "EXEMPLOS" -.IX Header "EXEMPLOS" -Lê a entrada da \*(L"stdin\*(R" e escreve a saída para \*(L"stdout\*(R": -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Converte e substitui a.txt. Converte e substitui b.txt: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Converte e substitui a.txt no modo de conversão ascii: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Converte e substitui a.txt no modo de conversão ascii. Converte e substitui -b.txt no modo de conversão 7bit: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Converte a.txt do formato do Mac para Unix: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Converte a.txt do formato do Unix para Mac: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Converte e substitui a.txt enquanto mantém a marca de data original: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Converte a.txt e escreve para e.txt: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Converte a.txt e escreve para e.txt, mantém a marca de data de e.txt igual a -a.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Converte e substitui a.txt. Converte b.txt e escreve para e.txt: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Converte c.txt e escreve para e.txt. Converte e substitui a.txt. Converte e -substitui b.txt. Converte d.txt e escreve para f.txt: -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "Conversão recursiva" -.IX Header "Conversão recursiva" -Use dos2unix em combinação com os comandos \fIfind\fR\|(1) e \fIxargs\fR\|(1) para converter -recursivamente arquivos texto em uma estrutura de árvore de diretórios. Por -exemplo, para converter todos os arquivos .txt na árvore de diretórios sob o -diretório atual, digite: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "LOCALIZAÇÃO" -.IX Header "LOCALIZAÇÃO" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -O idioma primário é selecionado com a variável de ambiente \s-1LANG. A\s0 variável -\&\s-1LANG\s0 consiste em várias partes. A primeira parte está em letras pequenas no -código do idioma. A segunda parte é opcional e é o código do país em letras -maiúsculo, precedido de um ponto. Alguns exemplos para shells do tipo padrão -\&\s-1POSIX:\s0 -.Sp -.Vb 7 -\& export LANG=nl Holandês -\& export LANG=nl_NL Holandês, Holanda -\& export LANG=nl_BE Holandês, Bélgica -\& export LANG=es_ES Espanhol, Espanha -\& export LANG=es_MX Espanhol, México -\& export LANG=en_US.iso88591 Inglês, EUA, codificação Latin\-1 -\& export LANG=en_GB.UTF\-8 Inglês, Reino Unido, codificação UTF\-8 -.Ve -.Sp -Para a lista completa de códigos de idioma e país, veja o manual do gettext: - -.Sp -Nos sistemas Unix, você pode usar o comando \fIlocale\fR\|(1) para obter informação -específica da localização. -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -Com a variável de ambiente \s-1LANGUAGE,\s0 você pode especificar uma lista de -prioridades de idiomas, separada por vírgulas. Dos2unix fornece preferência -à \s-1LANGUAGE\s0 sobre \s-1LANG.\s0 Por exemplo, primeiro holandês e, então, alemão: -\&\f(CW\*(C`LANGUAGE=nl:de\*(C'\fR. Você primeiro tem que habilitar localização, definindo -\&\s-1LANG \s0(ou \s-1LC_ALL\s0) para um valor diferente de \*(L"C\*(R", antes que você possa usar -uma lista de prioridade de idioma por meio da variável \s-1LANGUAGE.\s0 Veja também -o manual do gettext: - -.Sp -Se você selecionou um idioma que não está disponível, você vai terá as -mensagens em inglês (padrão). -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Com a variável de ambiente \s-1DOS2UNIX_LOCALEDIR,\s0 o \s-1LOCALEDIR\s0 definido durante -a compilação pode ser sobrescrito. \s-1LOCALEDIR\s0 é usada para localizar os -arquivos de idioma. O valor padrão do \s-1GNU\s0 é \f(CW\*(C`/usr/local/share/locale\*(C'\fR. A -opção \fB\-\-version\fR vai exibir o \s-1LOCALEDIR\s0 que é usado. -.Sp -Exemplo (shell \s-1POSIX\s0): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "VALOR RETORNADO" -.IX Header "VALOR RETORNADO" -No sucesso, zero é retornado. Quando um erro de sistema ocorre, o último -erro de sistema será retornado. Para outros erros, 1 é retornado. -.PP -O valor retornado é sempre zero no modo quieto, exceto quando opções de -linha de comando erradas são usadas. -.SH "PADRÕES" -.IX Header "PADRÕES" - -.PP - -.PP - -.PP - -.SH "AUTORES" -.IX Header "AUTORES" -Benjamin Lin \- Bernd Johannes Wuebben (modo mac2unix) -\&\- , Christian Wurll (adiciona nova linha extra) \- -, Erwin Waterlander \- (mantenedor) -.PP -Página do projeto: -.PP -Página do SourceForge: -.SH "Veja também" -.IX Header "Veja também" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/uk/man1/dos2unix.1 b/Tools/dos2unix/share/man/uk/man1/dos2unix.1 deleted file mode 100644 index 461b855..0000000 --- a/Tools/dos2unix/share/man/uk/man1/dos2unix.1 +++ /dev/null @@ -1,796 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "НАЗВА" -.IX Header "НАЗВА" -dos2unix \- програма для перетворення даних у текстовому форматі DOS/Mac у -формат Unix, і навпаки -.SH "КОРОТКИЙ ОПИС" -.IX Header "КОРОТКИЙ ОПИС" -.Vb 2 -\& dos2unix [параметри] [ФАЙЛ ...] [\-n ВХІДНИЙ_ФАЙЛ ВИХІДНИЙ_ФАЙЛ ...] -\& unix2dos [параметри] [ФАЙЛ ...] [\-n ВХІДНИЙ_ФАЙЛ ВИХІДНИЙ_ФАЙЛ ...] -.Ve -.SH "ОПИС" -.IX Header "ОПИС" -До складу пакунка Dos2unix включено програми \f(CW\*(C`dos2unix\*(C'\fR та \f(CW\*(C`unix2dos\*(C'\fR, -призначені для перетворення звичайних текстових даних у форматі \s-1DOS\s0 або Mac -на дані у форматі Unix, і навпаки. -.PP -У текстових файлах DOS/Windows розрив рядка або перехід на новий рядок -здійснюється за допомогою комбінації двох символів: повернення каретки (\s-1CR\s0) -і переведення рядка (\s-1LF\s0). У текстових файлах Unix за перехід на новий рядок -відповідає один символ: переведення рядка (\s-1LF\s0). У текстових файлах Mac, до -Mac \s-1OS X,\s0 за розрив рядка відповідав один символ: повернення каретки (\s-1CR\s0). У -сучасних версіях Mac \s-1OS\s0 використовується типовий для Unix розрив рядка (\s-1LF\s0). -.PP -Окрім символів розриву рядка, програма Dos2unix здатна виконувати -перетворення кодування файлів. Можна перетворити дані у декількох кодуваннях -\&\s-1DOS\s0 на файли у кодуванні Latin\-1 Unix. Також можна перетворити дані у файлах -Windows Unicode (\s-1UTF\-16\s0) на дані у кодуванні Unix Unicode (\s-1UTF\-8\s0). -.PP -Під час перетворення програма пропускатиме двійкові файли, якщо ви не -накажете їй виконати перетворення таких файлів безпосередньо. -.PP -Програма автоматично пропускатиме файли, які не є звичайними файлами, -зокрема каталоги та канали \s-1FIFO.\s0 -.PP -Типово, програма не вноситиме змін до символічних посилань та об’єктів -посилань. Якщо потрібно, програма може замінити символічні посилання або -записати перетворені дані до файла\-призначення символічного посилання. У -Windows запису до об’єкта символічного посилання не передбачено. -.PP -Програму dos2unix було створено за зразком програми dos2unix для -SunOS/Solaris. Втім, існує одна важлива відмінність від оригінальної версії -для SunOS/Solaris. Ця версія типово виконує заміну файлів під час -перетворення (старий режим обробки файлів), а у оригінальній версії для -SunOS/Solaris передбачено підтримку лише парного перетворення (новий режим -обробки файлів). Див. також параметри \f(CW\*(C`\-o\*(C'\fR та \f(CW\*(C`\-n\*(C'\fR. -.SH "ПАРАМЕТРИ" -.IX Header "ПАРАМЕТРИ" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Вважати усі наступні параметри назвами файлів. Цим параметром слід -користуватися, якщо вам потрібно виконати перетворення файлів, чиї назви -містять дефіси. Наприклад, щоб виконати перетворення файла «\-foo», -скористайтеся такою командою: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -Або у новому режимі файлів: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo out.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Виконати лише перетворення символів розриву рядків. Типовий режим -перетворення. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Виконати перетворення з кодування \s-1DOS\s0 на кодування \s-1ISO\-8859\-1.\s0 Див. розділ -щодо режимів перетворення. -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Використати кодову таблицю 1252 Windows (західноєвропейські мови). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -Використовувати кодову сторінку \s-1DOS 437 \s0(США). Це типова кодова сторінка для -перетворення \s-1ISO.\s0 -.IP "\fB\-850\fR" 4 -.IX Item "-850" -Використовувати кодову сторінку \s-1DOS 850 \s0(західноєвропейські мови). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -Використовувати сторінку \s-1DOS 860 \s0(португальська). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -Використовувати сторінку \s-1DOS 863 \s0(канадська французька). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -Використовувати сторінку \s-1DOS 865 \s0(скандинавські мови). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Перетворювати 8\-бітові символи на 7\-бітові. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Зберегти позначку порядку байтів (\s-1BOM\s0). Якщо у файлі вхідних даних є \s-1BOM,\s0 -записати \s-1BOM\s0 до файла результатів. Це типова поведінка під час перетворення -у формат із символами розриву рядків \s-1DOS.\s0 Див. також параметр \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode РЕЖИМ\fR" 4 -.IX Item "-c, --convmode РЕЖИМ" -Встановити режим перетворення. Значенням аргументу РЕЖИМ може бути один з -таких рядків: \fIascii\fR, \fI7bit\fR, \fIiso\fR, \fImac\fR. Типовим є режим ascii. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -Примусове перетворення двійкових файлів. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -У Windows файли в \s-1UTF\-16\s0 типово перетворюються на файли в \s-1UTF\-8,\s0 незалежно -від встановленої локалі. За допомогою цього параметра ви можете наказати -програмі перетворювати файли в \s-1UTF\-16\s0 на файли у \s-1GB18030.\s0 Цим параметром -можна скористатися лише у Windows. Див. також розділ, присвячений \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -Показати довідкові дані і завершити роботу. -.IP "\fB\-i[ПРАПОРЦІ], \-\-info[=ПРАПОРЦІ] ФАЙЛ ...\fR" 4 -.IX Item "-i[ПРАПОРЦІ], --info[=ПРАПОРЦІ] ФАЙЛ ..." -Вивести дані щодо файла. Не виконувати перетворення. -.Sp -Буде виведено такі дані, у вказаному порядку: кількість розривів рядків у -форматі \s-1DOS,\s0 кількість розривів рядків у форматі Unix, кількість розривів -рядків у форматі Mac, позначка порядку байтів, текстовим чи бінарним є файл -та назву файла. -.Sp -Приклад результатів: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Крім того, можна вказати додаткові прапорці для внесення змін у виведені -дані. Можна використовувати один або декілька таких прапорців. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Вивести кількість символів розривів рядка \s-1DOS.\s0 -.IP "\fBu\fR" 4 -.IX Item "u" -Вивести кількість символів розривів рядка Unix. -.IP "\fBm\fR" 4 -.IX Item "m" -Вивести кількість символів розривів рядка Mac. -.IP "\fBb\fR" 4 -.IX Item "b" -Вивести позначку порядку байтів. -.IP "\fBt\fR" 4 -.IX Item "t" -Вивести дані щодо того, є файл текстовим чи бінарним. -.IP "\fBc\fR" 4 -.IX Item "c" -Вивести дані лише тих файлів, які було б перетворено. -.Sp -Із прапорцем \f(CW\*(C`c\*(C'\fR dos2unix виведе лише назви файлів, у яких містяться -розриви рядків \s-1DOS.\s0 unix2dos виведе лише назви файлів, у яких містяться -розриви рядків Unix. -.RE -.RS 4 -.Sp -Приклади: -.Sp -Вивести дані щодо усіх файлів *.txt: -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Вивести кількість розривів рядків у форматі \s-1DOS\s0 і розривів рядків у форматі -Unix: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Вивести лише позначку порядку байтів: -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -Вивести список файлів, у яких є символи розриву рядків \s-1DOS:\s0 -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -Вивести список файлів, у яких використано символи розриву рядків Unix: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -Зберегти часову позначку файла вхідних даних у файлі результатів -перетворення. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -Вивести умови ліцензування програми. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -Вставити додатковий символ розриву рядка. -.Sp -\&\fBdos2unix\fR: перетворення на два символи розриву рядків Unix відбуватиметься -лише для комбінацій розриву рядків \s-1DOS.\s0 У режимі Mac виконуватиметься -перетворення на два розриви рядків Unix лише символів розриву рядків Mac. -.Sp -\&\fBunix2dos\fR: перетворення на дві комбінації розриву рядків \s-1DOS\s0 -відбуватиметься лише для символів розриву рядків \s-1DOS.\s0 У режимі Mac -виконуватиметься перетворення на два розриви рядків Mac лише символів -розриву рядків Unix. -.IP "\fB\-m, \-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -Записати до файла результатів позначку порядку байтів (\s-1BOM\s0). Типово буде -записано позначку порядку байтів \s-1UTF\-8.\s0 -.Sp -Якщо дані початкового файла закодовано у \s-1UTF\-16\s0 і використано параметр -\&\f(CW\*(C`\-u\*(C'\fR, буде дописано позначку порядку байтів \s-1UTF\-16.\s0 -.Sp -Не використовуйте цей параметр для кодувань результатів, відмінних від \s-1UTF\-8\s0 -або \s-1UTF\-16.\s0 Див. також розділ щодо \s-1UNICODE.\s0 -.IP "\fB\-n, \-\-newfile ВХІДНИЙ_ФАЙЛ ВИХІДНИЙ_ФАЙЛ ...\fR" 4 -.IX Item "-n, --newfile ВХІДНИЙ_ФАЙЛ ВИХІДНИЙ_ФАЙЛ ..." -Новий режим обробки файлів. Перетворити дані з файла ВХІДНИЙ_ФАЙЛ і записати -результати до файла ВИХІДНИЙ_ФАЙЛ. Назви файлів слід вказувати парами, \fIне -слід\fR використовувати шаблони заміни, інакше вміст файлів \fIбуде втрачено\fR. -.Sp -Власником перетвореного файла буде призначено користувача, яким було -розпочато перетворення у режимі нового файла (парному режимі). Права доступу -на читання або запис нового файла буде визначено на основі прав доступу до -початкового файла мінус \fIumask\fR\|(1) для користувача, яким було розпочато -перетворення. -.IP "\fB\-o, \-\-oldfile ФАЙЛ ...\fR" 4 -.IX Item "-o, --oldfile ФАЙЛ ..." -Застарілий режим обробки. Виконати перетворення файла ФАЙЛ і перезаписати -його вміст. Типово, програма працює у цьому режимі. Можна використовувати -шаблони заміни. -.Sp -У застарілому режимі (режимі заміщення) перетворений файл належатиме тому -самому власнику і групі і матиме ті самі права доступу на читання або запис, -що і початковий файл. Крім того, якщо перетворення файла виконується іншим -користувачем, який має права доступу на запис до файла (наприклад -користувачем root), перетворення буде перервано, якщо зберегти початкові -значення не вдасться. Зміна власника може означати неможливість читання -файла для його початкового власника. Зміна групи може призвести до проблем -із безпекою, оскільки файл може стати доступним для читання користувачам, -які не повинні мати такі права доступу. Можливість збереження прав власності -та прав доступу до файла передбачено лише у Unix. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Режим без виведення повідомлень. Програма не виводитиме жодних попереджень -або повідомлень про помилки. Повернутим значенням завжди буде нуль, якщо -вказано правильні параметри командного рядка. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -Вилучити позначку порядку байтів (\s-1BOM\s0). Не записувати \s-1BOM\s0 до файла -результатів. Це типова поведінка під час перетворення файлів з форматом -розриву рядків Unix. Див. також параметр \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s, \-\-safe\fR" 4 -.IX Item "-s, --safe" -Пропускати двійкові файли (типово). -.IP "\fB\-u, \-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -Зберегти початкове кодування \s-1UTF\-16.\s0 Файл результатів буде записано у тому -самому кодуванні \s-1UTF\-16,\s0 із прямим або зворотним порядком байтів, що і -початковий файл. Таким чином можна запобігти перетворенню даних у кодування -\&\s-1UTF\-8.\s0 До файла буде записано відповідну позначку порядку байтів -\&\s-1UTF\-16.\s0 Вимкнути цей параметр можна за допомогою параметра \f(CW\*(C`\-ascii\*(C'\fR. -.IP "\fB\-ul, \-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -Припускати, що кодуванням вхідних файлів є \s-1UTF\-16LE.\s0 -.Sp -Якщо у початковому файлі є позначка порядку байтів (\s-1BOM\s0), її буде -використано у файлі\-результаті, незалежно від використання цього параметра. -.Sp -Якщо вами було зроблено помилкове припущення щодо формату файла (файл -вхідних даних насправді не є файлом у форматі \s-1UTF\-16LE\s0), і дані вдасться -успішно перетворити, ви отримаєте файл у кодуванні \s-1UTF\-8\s0 з помилковим -вмістом. Скасувати таке помилкове перетворення можна за допомогою зворотного -перетворення \fIiconv\fR\|(1) з даних у форматі \s-1UTF\-8\s0 на дані у форматі -\&\s-1UTF\-16LE.\s0 Таким чином ви повернетеся до початкового кодування даних у файлі. -.Sp -Припущення щодо форматування \s-1UTF\-16LE\s0 працює як визначення \fIрежиму -перетворення\fR. Перемиканням на типовий режим \fIascii\fR можна вимкнути -припущення щодо форматування \s-1UTF\-16LE.\s0 -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -Припускати, що вхідним форматом є \s-1UTF\-16BE.\s0 -.Sp -Цей параметр працює у спосіб, тотожний до параметра \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v, \-\-verbose\fR" 4 -.IX Item "-v, --verbose" -Виводити докладні повідомлення. Буде показано додаткові дані щодо позначок -порядку байтів та кількості перетворених символів розриву рядків. -.IP "\fB\-F, \-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -Переходити за символічними посиланням і перетворювати файли, на які вони -вказують. -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Замінити символічні посилання перетвореними файлами (початкові файли, на які -вони вказують, змінено не буде). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -Не змінювати символічні посилання та файли, на які вони посилаються -(типово). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -Вивести дані щодо версії і завершити роботу. -.SH "РЕЖИМ MAC" -.IX Header "РЕЖИМ MAC" -У звичайному режимі розриви рядків \s-1DOS\s0 перетворюються на розриви рядків -Unix, і навпаки. Розриви рядків Mac перетворенню не підлягають. -.PP -У режимі Mac розриви рядків Mac перетворюються на розриви рядків Unix, і -навпаки. Розриви рядків \s-1DOS\s0 перетворенню не підлягають. -.PP -Щоб запустити програму у режимі перетворення Mac, скористайтеся параметром -командного рядка \f(CW\*(C`\-c mac\*(C'\fR або програмами \f(CW\*(C`mac2unix\*(C'\fR та \f(CW\*(C`unix2mac\*(C'\fR. -.SH "РЕЖИМИ ПЕРЕТВОРЕННЯ" -.IX Header "РЕЖИМИ ПЕРЕТВОРЕННЯ" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -У режимі \f(CW\*(C`ascii\*(C'\fR виконуватиметься лише перетворення символів розриву -рядків. Цей режим є типовим режимом перетворення. -.Sp -Хоча цей режим і називається режимом \s-1ASCII \s0(стандарту 7\-бітового кодування), -насправді кодування символів у ньому є 8\-бітовим. Завжди користуйтеся цим -режимом для перетворення файлів у кодуванні \s-1UTF\-8 \s0(Unicode). -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -У цьому режимі усі 8\-бітові символи, які не є частиною \s-1ASCII, \s0(з номерами -від 128 до 255) буде перетворено на відповідні 7\-бітові символи. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Перетворення символів буде виконано з кодування (кодової сторінки) \s-1DOS\s0 до -кодування \s-1ISO\-8859\-1 \s0(Latin\-1) у Unix. Символи \s-1DOS,\s0 які не мають -еквівалентів у \s-1ISO\-8859\-1\s0 і перетворення яких неможливе, буде перетворено на -символ крапки. Те саме стосується символів \s-1ISO\-8859\-1,\s0 які не мають -еквівалентів у \s-1DOS.\s0 -.Sp -Якщо буде використано лише параметр \f(CW\*(C`\-iso\*(C'\fR, програма dos2unix спробує -визначити активне кодування. Якщо це виявиться неможливим, dos2unix -використає типове кодування \s-1CP437,\s0 яке здебільшого використовується у -США. Щоб примусово визначити кодування, скористайтеся параметром \f(CW\*(C`\-437\*(C'\fR -(США), \f(CW\*(C`\-850\*(C'\fR (західноєвропейські мови), \f(CW\*(C`\-860\*(C'\fR (португальська), \f(CW\*(C`\-863\*(C'\fR -(канадська французька) або \f(CW\*(C`\-865\*(C'\fR (скандинавські мови). Використати -кодування Windows \s-1CP1252 \s0(західноєвропейські мови) можна за допомогою -параметра \f(CW\*(C`\-1252\*(C'\fR. Для інших кодувань використовуйте поєднання dos2unix з -\&\fIiconv\fR\|(1). Програма iconv здатна виконувати перетворення даних у доволі -широкому спектрі кодувань символів. -.Sp -Ніколи не користуйтеся перетворенням \s-1ISO\s0 для текстових файлів у форматі -Unicode. Використання подібного перетворення призведе до ушкодження вмісту -файлів у кодуванні \s-1UTF\-8.\s0 -.Sp -Декілька прикладів: -.Sp -Перетворити дані у типовому кодуванні \s-1DOS\s0 на дані у кодуванні Latin\-1 Unix: -.Sp -.Vb 1 -\& dos2unix \-iso \-n in.txt out.txt -.Ve -.Sp -Перетворити дані у кодуванні \s-1DOS CP850\s0 на дані у кодуванні Latin\-1 Unix: -.Sp -.Vb 1 -\& dos2unix \-850 \-n in.txt out.txt -.Ve -.Sp -Перетворити дані у кодуванні \s-1CP1252\s0 Windows на дані у кодуванні Latin\-1 -Unix: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n in.txt out.txt -.Ve -.Sp -Перетворити дані у кодуванні \s-1CP252\s0 Windows на дані у кодуванні \s-1UTF\-8\s0 Unix -(Unicode): -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 in.txt | dos2unix > out.txt -.Ve -.Sp -Перетворити дані у кодуванні Latin\-1 Unix на дані у типовому кодуванні \s-1DOS:\s0 -.Sp -.Vb 1 -\& unix2dos \-iso \-n in.txt out.txt -.Ve -.Sp -Перетворити дані у кодуванні Latin\-1 Unix на дані у кодуванні \s-1DOS CP850:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n in.txt out.txt -.Ve -.Sp -Перетворити дані у кодуванні Latin\-1 Unix на дані у кодуванні Windows -\&\s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos \-1252 \-n in.txt out.txt -.Ve -.Sp -Перетворити дані у кодуванні \s-1UTF\-8\s0 Unix (Unicode) на дані у кодуванні -Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t CP1252 > out.txt -.Ve -.Sp -Див. також та -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Кодування" -.IX Subsection "Кодування" -Існує декілька різних кодувань Unicode. У Unix та Linux у файлах Unicode -здебільшого використовується кодування \s-1UTF\-8.\s0 У Windows для текстових файлів -Unicode може бути використано кодування \s-1UTF\-8, UTF\-16\s0 або \s-1UTF\-16\s0 зі -зворотним порядком байтів. Втім, здебільшого, використовується формат -\&\s-1UTF\-16.\s0 -.SS "Перетворення" -.IX Subsection "Перетворення" -У текстових файлах Unicode, як і у звичайних текстових файлах, може бути -використано розриви рядків \s-1DOS,\s0 Unix або Mac. -.PP -Усі версії dos2unix та unix2dos здатні виконувати перетворення у кодуванні -\&\s-1UTF\-8,\s0 оскільки \s-1UTF\-8\s0 було розроблено так, що зворотну сумісність з \s-1ASCII\s0 -збережено. -.PP -Програми dos2unix та unix2dos, зібрані з підтримкою Unicode \s-1UTF\-16,\s0 можуть -читати текстові файли у кодуванні \s-1UTF\-16\s0 з прямим та зворотним порядком -байтів. Щоб дізнатися про те, чи було dos2unix зібрано з підтримкою \s-1UTF\-16,\s0 -віддайте команду \f(CW\*(C`dos2unix \-V\*(C'\fR. -.PP -У Unix/Linux файли у кодуванні \s-1UTF\-16\s0 перетворюються на файли у кодуванні -локалі. Для визначення поточного кодування символів локалі скористайтеся -командою \fIlocale\fR\|(1). Якщо перетворення виявиться неможливим, програма -повідомить про помилку перетворення і пропустить відповідний файл. -.PP -У Windows файли \s-1UTF\-16\s0 типово буде перетворено на файли \s-1UTF\-8.\s0 Обидва типи -систем, Windows та Unix/Linux, мають непогані можливості з підтримки файлів -у форматуванні \s-1UTF\-8.\s0 -.PP -Кодування \s-1UTF\-16\s0 та \s-1UTF\-8\s0 є повністю сумісними. Під час перетворення не буде -втрачено жодної інформації. Якщо під час перетворення даних у кодуванні -\&\s-1UTF\-16\s0 на дані у кодуванні \s-1UTF\-8\s0 трапиться помилка, наприклад, якщо у -вхідному файлі \s-1UTF\-16\s0 міститиметься якась помилка, файл буде пропущено. -.PP -Якщо використано параметр \f(CW\*(C`\-u\*(C'\fR, файл результатів буде записано у тому -самому кодуванні \s-1UTF\-16,\s0 що і початковий файл. Використання параметра Option -\&\f(CW\*(C`\-u\*(C'\fR запобігає перетворенню даних у кодування \s-1UTF\-8.\s0 -.PP -У dos2unix та unix2dos не передбачено параметра для перетворення даних у -кодуванні \s-1UTF\-8\s0 на дані у кодуванні \s-1UTF\-16.\s0 -.PP -Режим перетворення \s-1ISO\s0 та 7\-бітовий режим не працюють для файлів \s-1UTF\-16.\s0 -.SS "Позначка порядку байтів" -.IX Subsection "Позначка порядку байтів" -У Windows до текстових файлів у кодуванні Unicode типово дописується -позначка порядку байтів (\s-1BOM\s0), оскільки багато програм Windows (зокрема -Notepad) додають таку позначку автоматично. Див. також -. -.PP -У Unix файли у кодуванні Unicode типово не містять позначки порядку -байтів. Вважається, що кодуванням текстових файлів є те кодування, яке -визначається поточною локаллю. -.PP -Програма dos2unix може визначити, чи є кодуванням файла \s-1UTF\-16,\s0 лише якщо у -файлі міститься позначка порядку байтів. Якщо у файлі, де використано -кодування \s-1UTF\-16,\s0 немає такої позначки, dos2unix вважатиме такий файл -двійковим (бінарним). -.PP -Для перетворення файлів \s-1UTF\-16\s0 без позначки порядку байтів скористайтеся -параметром \f(CW\*(C`\-ul\*(C'\fR або \f(CW\*(C`\-ub\*(C'\fR. -.PP -Типово dos2unix не записує до файлів результатів перетворення позначки -порядку байтів (\s-1BOM\s0). Якщо використано параметр \f(CW\*(C`\-b\*(C'\fR, dos2unix запише до -файла результатів \s-1BOM,\s0 якщо \s-1BOM\s0 була у файлі початкових даних. -.PP -Типово unix2dos записує позначку порядку байтів (\s-1BOM\s0) до файла результатів, -якщо \s-1BOM\s0 є у початковому файлі. Скористайтеся параметром \f(CW\*(C`\-r\*(C'\fR, щоб вилучити -\&\s-1BOM.\s0 -.PP -Dos2unix та unix2dos завжди записують до файла результатів позначку порядку -байтів (\s-1BOM\s0), якщо використано параметр \f(CW\*(C`\-m\*(C'\fR. -.SS "Приклади для Unicode" -.IX Subsection "Приклади для Unicode" -Перетворити дані з Windows \s-1UTF\-16 \s0(з позначкою порядку байтів (\s-1BOM\s0)) у -формат Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-n in.txt out.txt -.Ve -.PP -Перетворити дані у форматі Windows \s-1UTF\-16LE \s0(без \s-1BOM\s0) на дані у форматі -\&\s-1UTF\-8\s0 Unix: -.PP -.Vb 1 -\& dos2unix \-ul \-n in.txt out.txt -.Ve -.PP -Перетворити дані у кодуванні \s-1UTF\-8\s0 Unix на дані у кодуванні Windows \s-1UTF\-8\s0 -без \s-1BOM:\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n in.txt out.txt -.Ve -.PP -Перетворити дані у кодуванні \s-1UTF\-8\s0 Unix на дані у кодуванні Windows \s-1UTF\-16:\s0 -.PP -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t UTF\-16 > out.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 є китайським урядовим стандартом. Підтримка обов’язкової підмножини -стандарту \s-1GB18030\s0 є неодмінною вимогою до будь\-яких програмних продуктів, -які продаються у Китаї. Див. також . -.PP -Кодування \s-1GB18030\s0 є повністю сумісним із Unicode. Його можна розглядати як -формат перетворення unicode. Подібно до \s-1UTF\-8, GB18030\s0 є сумісним із -\&\s-1ASCII. GB18030\s0 також є сумісним із кодовою сторінкою Windows 936, яку ще -називають \s-1GBK.\s0 -.PP -У Unix/Linux файли \s-1UTF\-16\s0 буде перетворено до кодування \s-1GB18030,\s0 якщо -кодуванням локалі є \s-1GB18030.\s0 Зауважте, що це спрацює, лише якщо встановлено -значення країни КНР. Наприклад, у англійській локалі для Великоританії із -встановленою локаллю \f(CW\*(C`en_GB.GB18030\*(C'\fR перетворення \s-1UTF\-16\s0 на \s-1GB18030\s0 не -працюватиме, а у китайській локалі \f(CW\*(C`zh_CN.GB18030\*(C'\fR все працюватиме як слід. -.PP -У Windows для перетворення файлів \s-1UTF\-16\s0 на файли \s-1GB18030\s0 слід вказати -параметр \f(CW\*(C`\-gb\*(C'\fR. -.PP -У файлах у кодуванні \s-1GB18030\s0 може міститися позначка порядку байтів, так -само, як у файлах у кодуванні Unicode. -.SH "ПРИКЛАДИ" -.IX Header "ПРИКЛАДИ" -Прочитати вхідні дані зі стандартного джерела (stdin) і записати результат -до стандартного виведення (stdout): -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Перетворити дані у a.txt і замістити цей файл. Перетворити дані у b.txt і -замістити цей файл: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Перетворити дані у a.txt і замістити файл у режимі перетворення ascii: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Перетворити дані у a.txt і замістити файл у режимі перетворення -ascii. Перетворити дані у b.txt і замістити цей файл у режимі 7\-бітового -перетворення: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Перетворити файл a.txt з формату Mac на формат Unix: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Перетворити файл a.txt з формату Unix на формат Mac: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Перетворити дані у a.txt, замістити цей файл і зберегти часову позначку -початкового файла: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Перетворити дані у файлі a.txt і записати результати до файла e.txt: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Перетворити дані у файлі a.txt і записати результати до файла -e.txt. Скопіювати часову позначку файла a.txt для файла e.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Перетворити дані у a.txt і замістити цей файл. Перетворити дані у b.txt і -записати результат до e.txt: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Перетворити дані у c.txt і записати результати до e.txt. Перетворити дані у -a.txt і замістити ними цей файл. Перетворити дані у b.txt і замістити ними -цей файл. Перетворити дані у d.txt і записати результати до f.txt: -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "РЕКУРСИВНЕ ПЕРЕТВОРЕННЯ" -.IX Header "РЕКУРСИВНЕ ПЕРЕТВОРЕННЯ" -Для рекурсивного перетворення текстових файлів у ієрархії каталогів слід -використовувати dos2unix у поєднанні з програмами \fIfind\fR\|(1) та -\&\fIxargs\fR\|(1). Наприклад, щоб виконати перетворення усіх файлів .txt у структурі -підкаталогів поточного каталогу, віддайте таку команду: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "ЛОКАЛІЗАЦІЯ" -.IX Header "ЛОКАЛІЗАЦІЯ" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -Основна мова визначається за допомогою змінної середовища \s-1LANG.\s0 Значення -змінної \s-1LANG\s0 складається з декількох частин. Перша частина записується -малими літерами і визначає код мови. Друга частина є необов’язковою, -визначає код країни і записується прописними літерами, відокремлюється від -першої частини символом підкреслювання. Передбачено також необов’язкову -третю частину: кодування. Ця частина відокремлюється від другої частини -крапкою. Ось декілька прикладів для командних оболонок стандартного типу -\&\s-1POSIX:\s0 -.Sp -.Vb 7 -\& export LANG=uk українська -\& export LANG=uk_UA українська, Україна -\& export LANG=ru_UA російська, Україна -\& export LANG=es_ES іспанська, Іспанія -\& export LANG=es_MX іспанська, Мексика -\& export LANG=en_US.iso88591 англійська, США, кодування Latin\-1 -\& export LANG=en_GB.UTF\-8 англійська, Великобританія, кодування UTF\-8 -.Ve -.Sp -Повний список мов та кодів країн наведено у підручнику з gettext: - -.Sp -У системах Unix для отримання даних щодо локалі можна скористатися командою -\&\fIlocale\fR\|(1). -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -За допомогою змінної середовища \s-1LANGUAGE\s0 ви можете вказати список -пріоритеності мов. Записи у списку слід відокремлювати двокрапками. Програма -dos2unix надає перевагу \s-1LANGUAGE\s0 над \s-1LANG.\s0 Наприклад, перша голландська, -далі німецька: \f(CW\*(C`LANGUAGE=nl:de\*(C'\fR. Спочатку вам слід увімкнути локалізацію, -встановивши для змінної \s-1LANG \s0(або \s-1LC_ALL\s0) значення, відмінне від «C». Далі -ви зможете використовувати список пріоритетності мов за допомогою змінної -\&\s-1LANGUAGE.\s0 Додаткові відомості можна знайти у підручнику з gettext: - -.Sp -Якщо вами буде вибрано мову, перекладу якою немає, буде показано стандартні -повідомлення англійською мовою. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Змінну \s-1LOCALEDIR,\s0 встановлену під час збирання програми, можна змінити за -допомогою змінної середовища \s-1DOS2UNIX_LOCALEDIR. LOCALEDIR\s0 використовується -для пошуку файлів перекладів. Типовим значенням у системах \s-1GNU\s0 є -\&\f(CW\*(C`/usr/local/share/locale\*(C'\fR. Переглянути поточне значення змінної \s-1LOCALEDIR\s0 -можна переглянути за допомогою параметра \fB\-\-version\fR. -.Sp -Приклад (командна оболонка \s-1POSIX\s0): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "ПОВЕРНУТЕ ЗНАЧЕННЯ" -.IX Header "ПОВЕРНУТЕ ЗНАЧЕННЯ" -Якщо завдання вдасться успішно виконати, програма поверне нульовий код -виходу. Якщо станеться системна помилка, буде повернуто код цієї -помилки. Якщо станеться якась інша помилка, буде повернуто код 1. -.PP -У режимі без повідомлень повернутим значенням завжди буде нуль, якщо вказано -правильні параметри командного рядка. -.SH "СТАНДАРТИ" -.IX Header "СТАНДАРТИ" - -.PP - -.PP - -.PP - -.SH "АВТОРИ" -.IX Header "АВТОРИ" -Benjamin Lin \- , Bernd Johannes Wuebben (режим -mac2unix) \- , Christian Wurll (додатковий новий рядок) \- -, Erwin Waterlander \- (супровідник) -.PP -Сторінка проекту: -.PP -Сторінка на SourceForge: -.SH "ТАКОЖ ПЕРЕГЛЯНЬТЕ" -.IX Header "ТАКОЖ ПЕРЕГЛЯНЬТЕ" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/uk/man1/mac2unix.1 b/Tools/dos2unix/share/man/uk/man1/mac2unix.1 deleted file mode 100644 index 461b855..0000000 --- a/Tools/dos2unix/share/man/uk/man1/mac2unix.1 +++ /dev/null @@ -1,796 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "НАЗВА" -.IX Header "НАЗВА" -dos2unix \- програма для перетворення даних у текстовому форматі DOS/Mac у -формат Unix, і навпаки -.SH "КОРОТКИЙ ОПИС" -.IX Header "КОРОТКИЙ ОПИС" -.Vb 2 -\& dos2unix [параметри] [ФАЙЛ ...] [\-n ВХІДНИЙ_ФАЙЛ ВИХІДНИЙ_ФАЙЛ ...] -\& unix2dos [параметри] [ФАЙЛ ...] [\-n ВХІДНИЙ_ФАЙЛ ВИХІДНИЙ_ФАЙЛ ...] -.Ve -.SH "ОПИС" -.IX Header "ОПИС" -До складу пакунка Dos2unix включено програми \f(CW\*(C`dos2unix\*(C'\fR та \f(CW\*(C`unix2dos\*(C'\fR, -призначені для перетворення звичайних текстових даних у форматі \s-1DOS\s0 або Mac -на дані у форматі Unix, і навпаки. -.PP -У текстових файлах DOS/Windows розрив рядка або перехід на новий рядок -здійснюється за допомогою комбінації двох символів: повернення каретки (\s-1CR\s0) -і переведення рядка (\s-1LF\s0). У текстових файлах Unix за перехід на новий рядок -відповідає один символ: переведення рядка (\s-1LF\s0). У текстових файлах Mac, до -Mac \s-1OS X,\s0 за розрив рядка відповідав один символ: повернення каретки (\s-1CR\s0). У -сучасних версіях Mac \s-1OS\s0 використовується типовий для Unix розрив рядка (\s-1LF\s0). -.PP -Окрім символів розриву рядка, програма Dos2unix здатна виконувати -перетворення кодування файлів. Можна перетворити дані у декількох кодуваннях -\&\s-1DOS\s0 на файли у кодуванні Latin\-1 Unix. Також можна перетворити дані у файлах -Windows Unicode (\s-1UTF\-16\s0) на дані у кодуванні Unix Unicode (\s-1UTF\-8\s0). -.PP -Під час перетворення програма пропускатиме двійкові файли, якщо ви не -накажете їй виконати перетворення таких файлів безпосередньо. -.PP -Програма автоматично пропускатиме файли, які не є звичайними файлами, -зокрема каталоги та канали \s-1FIFO.\s0 -.PP -Типово, програма не вноситиме змін до символічних посилань та об’єктів -посилань. Якщо потрібно, програма може замінити символічні посилання або -записати перетворені дані до файла\-призначення символічного посилання. У -Windows запису до об’єкта символічного посилання не передбачено. -.PP -Програму dos2unix було створено за зразком програми dos2unix для -SunOS/Solaris. Втім, існує одна важлива відмінність від оригінальної версії -для SunOS/Solaris. Ця версія типово виконує заміну файлів під час -перетворення (старий режим обробки файлів), а у оригінальній версії для -SunOS/Solaris передбачено підтримку лише парного перетворення (новий режим -обробки файлів). Див. також параметри \f(CW\*(C`\-o\*(C'\fR та \f(CW\*(C`\-n\*(C'\fR. -.SH "ПАРАМЕТРИ" -.IX Header "ПАРАМЕТРИ" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Вважати усі наступні параметри назвами файлів. Цим параметром слід -користуватися, якщо вам потрібно виконати перетворення файлів, чиї назви -містять дефіси. Наприклад, щоб виконати перетворення файла «\-foo», -скористайтеся такою командою: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -Або у новому режимі файлів: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo out.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Виконати лише перетворення символів розриву рядків. Типовий режим -перетворення. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Виконати перетворення з кодування \s-1DOS\s0 на кодування \s-1ISO\-8859\-1.\s0 Див. розділ -щодо режимів перетворення. -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Використати кодову таблицю 1252 Windows (західноєвропейські мови). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -Використовувати кодову сторінку \s-1DOS 437 \s0(США). Це типова кодова сторінка для -перетворення \s-1ISO.\s0 -.IP "\fB\-850\fR" 4 -.IX Item "-850" -Використовувати кодову сторінку \s-1DOS 850 \s0(західноєвропейські мови). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -Використовувати сторінку \s-1DOS 860 \s0(португальська). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -Використовувати сторінку \s-1DOS 863 \s0(канадська французька). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -Використовувати сторінку \s-1DOS 865 \s0(скандинавські мови). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Перетворювати 8\-бітові символи на 7\-бітові. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Зберегти позначку порядку байтів (\s-1BOM\s0). Якщо у файлі вхідних даних є \s-1BOM,\s0 -записати \s-1BOM\s0 до файла результатів. Це типова поведінка під час перетворення -у формат із символами розриву рядків \s-1DOS.\s0 Див. також параметр \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode РЕЖИМ\fR" 4 -.IX Item "-c, --convmode РЕЖИМ" -Встановити режим перетворення. Значенням аргументу РЕЖИМ може бути один з -таких рядків: \fIascii\fR, \fI7bit\fR, \fIiso\fR, \fImac\fR. Типовим є режим ascii. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -Примусове перетворення двійкових файлів. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -У Windows файли в \s-1UTF\-16\s0 типово перетворюються на файли в \s-1UTF\-8,\s0 незалежно -від встановленої локалі. За допомогою цього параметра ви можете наказати -програмі перетворювати файли в \s-1UTF\-16\s0 на файли у \s-1GB18030.\s0 Цим параметром -можна скористатися лише у Windows. Див. також розділ, присвячений \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -Показати довідкові дані і завершити роботу. -.IP "\fB\-i[ПРАПОРЦІ], \-\-info[=ПРАПОРЦІ] ФАЙЛ ...\fR" 4 -.IX Item "-i[ПРАПОРЦІ], --info[=ПРАПОРЦІ] ФАЙЛ ..." -Вивести дані щодо файла. Не виконувати перетворення. -.Sp -Буде виведено такі дані, у вказаному порядку: кількість розривів рядків у -форматі \s-1DOS,\s0 кількість розривів рядків у форматі Unix, кількість розривів -рядків у форматі Mac, позначка порядку байтів, текстовим чи бінарним є файл -та назву файла. -.Sp -Приклад результатів: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Крім того, можна вказати додаткові прапорці для внесення змін у виведені -дані. Можна використовувати один або декілька таких прапорців. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Вивести кількість символів розривів рядка \s-1DOS.\s0 -.IP "\fBu\fR" 4 -.IX Item "u" -Вивести кількість символів розривів рядка Unix. -.IP "\fBm\fR" 4 -.IX Item "m" -Вивести кількість символів розривів рядка Mac. -.IP "\fBb\fR" 4 -.IX Item "b" -Вивести позначку порядку байтів. -.IP "\fBt\fR" 4 -.IX Item "t" -Вивести дані щодо того, є файл текстовим чи бінарним. -.IP "\fBc\fR" 4 -.IX Item "c" -Вивести дані лише тих файлів, які було б перетворено. -.Sp -Із прапорцем \f(CW\*(C`c\*(C'\fR dos2unix виведе лише назви файлів, у яких містяться -розриви рядків \s-1DOS.\s0 unix2dos виведе лише назви файлів, у яких містяться -розриви рядків Unix. -.RE -.RS 4 -.Sp -Приклади: -.Sp -Вивести дані щодо усіх файлів *.txt: -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Вивести кількість розривів рядків у форматі \s-1DOS\s0 і розривів рядків у форматі -Unix: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Вивести лише позначку порядку байтів: -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -Вивести список файлів, у яких є символи розриву рядків \s-1DOS:\s0 -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -Вивести список файлів, у яких використано символи розриву рядків Unix: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -Зберегти часову позначку файла вхідних даних у файлі результатів -перетворення. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -Вивести умови ліцензування програми. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -Вставити додатковий символ розриву рядка. -.Sp -\&\fBdos2unix\fR: перетворення на два символи розриву рядків Unix відбуватиметься -лише для комбінацій розриву рядків \s-1DOS.\s0 У режимі Mac виконуватиметься -перетворення на два розриви рядків Unix лише символів розриву рядків Mac. -.Sp -\&\fBunix2dos\fR: перетворення на дві комбінації розриву рядків \s-1DOS\s0 -відбуватиметься лише для символів розриву рядків \s-1DOS.\s0 У режимі Mac -виконуватиметься перетворення на два розриви рядків Mac лише символів -розриву рядків Unix. -.IP "\fB\-m, \-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -Записати до файла результатів позначку порядку байтів (\s-1BOM\s0). Типово буде -записано позначку порядку байтів \s-1UTF\-8.\s0 -.Sp -Якщо дані початкового файла закодовано у \s-1UTF\-16\s0 і використано параметр -\&\f(CW\*(C`\-u\*(C'\fR, буде дописано позначку порядку байтів \s-1UTF\-16.\s0 -.Sp -Не використовуйте цей параметр для кодувань результатів, відмінних від \s-1UTF\-8\s0 -або \s-1UTF\-16.\s0 Див. також розділ щодо \s-1UNICODE.\s0 -.IP "\fB\-n, \-\-newfile ВХІДНИЙ_ФАЙЛ ВИХІДНИЙ_ФАЙЛ ...\fR" 4 -.IX Item "-n, --newfile ВХІДНИЙ_ФАЙЛ ВИХІДНИЙ_ФАЙЛ ..." -Новий режим обробки файлів. Перетворити дані з файла ВХІДНИЙ_ФАЙЛ і записати -результати до файла ВИХІДНИЙ_ФАЙЛ. Назви файлів слід вказувати парами, \fIне -слід\fR використовувати шаблони заміни, інакше вміст файлів \fIбуде втрачено\fR. -.Sp -Власником перетвореного файла буде призначено користувача, яким було -розпочато перетворення у режимі нового файла (парному режимі). Права доступу -на читання або запис нового файла буде визначено на основі прав доступу до -початкового файла мінус \fIumask\fR\|(1) для користувача, яким було розпочато -перетворення. -.IP "\fB\-o, \-\-oldfile ФАЙЛ ...\fR" 4 -.IX Item "-o, --oldfile ФАЙЛ ..." -Застарілий режим обробки. Виконати перетворення файла ФАЙЛ і перезаписати -його вміст. Типово, програма працює у цьому режимі. Можна використовувати -шаблони заміни. -.Sp -У застарілому режимі (режимі заміщення) перетворений файл належатиме тому -самому власнику і групі і матиме ті самі права доступу на читання або запис, -що і початковий файл. Крім того, якщо перетворення файла виконується іншим -користувачем, який має права доступу на запис до файла (наприклад -користувачем root), перетворення буде перервано, якщо зберегти початкові -значення не вдасться. Зміна власника може означати неможливість читання -файла для його початкового власника. Зміна групи може призвести до проблем -із безпекою, оскільки файл може стати доступним для читання користувачам, -які не повинні мати такі права доступу. Можливість збереження прав власності -та прав доступу до файла передбачено лише у Unix. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Режим без виведення повідомлень. Програма не виводитиме жодних попереджень -або повідомлень про помилки. Повернутим значенням завжди буде нуль, якщо -вказано правильні параметри командного рядка. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -Вилучити позначку порядку байтів (\s-1BOM\s0). Не записувати \s-1BOM\s0 до файла -результатів. Це типова поведінка під час перетворення файлів з форматом -розриву рядків Unix. Див. також параметр \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s, \-\-safe\fR" 4 -.IX Item "-s, --safe" -Пропускати двійкові файли (типово). -.IP "\fB\-u, \-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -Зберегти початкове кодування \s-1UTF\-16.\s0 Файл результатів буде записано у тому -самому кодуванні \s-1UTF\-16,\s0 із прямим або зворотним порядком байтів, що і -початковий файл. Таким чином можна запобігти перетворенню даних у кодування -\&\s-1UTF\-8.\s0 До файла буде записано відповідну позначку порядку байтів -\&\s-1UTF\-16.\s0 Вимкнути цей параметр можна за допомогою параметра \f(CW\*(C`\-ascii\*(C'\fR. -.IP "\fB\-ul, \-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -Припускати, що кодуванням вхідних файлів є \s-1UTF\-16LE.\s0 -.Sp -Якщо у початковому файлі є позначка порядку байтів (\s-1BOM\s0), її буде -використано у файлі\-результаті, незалежно від використання цього параметра. -.Sp -Якщо вами було зроблено помилкове припущення щодо формату файла (файл -вхідних даних насправді не є файлом у форматі \s-1UTF\-16LE\s0), і дані вдасться -успішно перетворити, ви отримаєте файл у кодуванні \s-1UTF\-8\s0 з помилковим -вмістом. Скасувати таке помилкове перетворення можна за допомогою зворотного -перетворення \fIiconv\fR\|(1) з даних у форматі \s-1UTF\-8\s0 на дані у форматі -\&\s-1UTF\-16LE.\s0 Таким чином ви повернетеся до початкового кодування даних у файлі. -.Sp -Припущення щодо форматування \s-1UTF\-16LE\s0 працює як визначення \fIрежиму -перетворення\fR. Перемиканням на типовий режим \fIascii\fR можна вимкнути -припущення щодо форматування \s-1UTF\-16LE.\s0 -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -Припускати, що вхідним форматом є \s-1UTF\-16BE.\s0 -.Sp -Цей параметр працює у спосіб, тотожний до параметра \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v, \-\-verbose\fR" 4 -.IX Item "-v, --verbose" -Виводити докладні повідомлення. Буде показано додаткові дані щодо позначок -порядку байтів та кількості перетворених символів розриву рядків. -.IP "\fB\-F, \-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -Переходити за символічними посиланням і перетворювати файли, на які вони -вказують. -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Замінити символічні посилання перетвореними файлами (початкові файли, на які -вони вказують, змінено не буде). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -Не змінювати символічні посилання та файли, на які вони посилаються -(типово). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -Вивести дані щодо версії і завершити роботу. -.SH "РЕЖИМ MAC" -.IX Header "РЕЖИМ MAC" -У звичайному режимі розриви рядків \s-1DOS\s0 перетворюються на розриви рядків -Unix, і навпаки. Розриви рядків Mac перетворенню не підлягають. -.PP -У режимі Mac розриви рядків Mac перетворюються на розриви рядків Unix, і -навпаки. Розриви рядків \s-1DOS\s0 перетворенню не підлягають. -.PP -Щоб запустити програму у режимі перетворення Mac, скористайтеся параметром -командного рядка \f(CW\*(C`\-c mac\*(C'\fR або програмами \f(CW\*(C`mac2unix\*(C'\fR та \f(CW\*(C`unix2mac\*(C'\fR. -.SH "РЕЖИМИ ПЕРЕТВОРЕННЯ" -.IX Header "РЕЖИМИ ПЕРЕТВОРЕННЯ" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -У режимі \f(CW\*(C`ascii\*(C'\fR виконуватиметься лише перетворення символів розриву -рядків. Цей режим є типовим режимом перетворення. -.Sp -Хоча цей режим і називається режимом \s-1ASCII \s0(стандарту 7\-бітового кодування), -насправді кодування символів у ньому є 8\-бітовим. Завжди користуйтеся цим -режимом для перетворення файлів у кодуванні \s-1UTF\-8 \s0(Unicode). -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -У цьому режимі усі 8\-бітові символи, які не є частиною \s-1ASCII, \s0(з номерами -від 128 до 255) буде перетворено на відповідні 7\-бітові символи. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Перетворення символів буде виконано з кодування (кодової сторінки) \s-1DOS\s0 до -кодування \s-1ISO\-8859\-1 \s0(Latin\-1) у Unix. Символи \s-1DOS,\s0 які не мають -еквівалентів у \s-1ISO\-8859\-1\s0 і перетворення яких неможливе, буде перетворено на -символ крапки. Те саме стосується символів \s-1ISO\-8859\-1,\s0 які не мають -еквівалентів у \s-1DOS.\s0 -.Sp -Якщо буде використано лише параметр \f(CW\*(C`\-iso\*(C'\fR, програма dos2unix спробує -визначити активне кодування. Якщо це виявиться неможливим, dos2unix -використає типове кодування \s-1CP437,\s0 яке здебільшого використовується у -США. Щоб примусово визначити кодування, скористайтеся параметром \f(CW\*(C`\-437\*(C'\fR -(США), \f(CW\*(C`\-850\*(C'\fR (західноєвропейські мови), \f(CW\*(C`\-860\*(C'\fR (португальська), \f(CW\*(C`\-863\*(C'\fR -(канадська французька) або \f(CW\*(C`\-865\*(C'\fR (скандинавські мови). Використати -кодування Windows \s-1CP1252 \s0(західноєвропейські мови) можна за допомогою -параметра \f(CW\*(C`\-1252\*(C'\fR. Для інших кодувань використовуйте поєднання dos2unix з -\&\fIiconv\fR\|(1). Програма iconv здатна виконувати перетворення даних у доволі -широкому спектрі кодувань символів. -.Sp -Ніколи не користуйтеся перетворенням \s-1ISO\s0 для текстових файлів у форматі -Unicode. Використання подібного перетворення призведе до ушкодження вмісту -файлів у кодуванні \s-1UTF\-8.\s0 -.Sp -Декілька прикладів: -.Sp -Перетворити дані у типовому кодуванні \s-1DOS\s0 на дані у кодуванні Latin\-1 Unix: -.Sp -.Vb 1 -\& dos2unix \-iso \-n in.txt out.txt -.Ve -.Sp -Перетворити дані у кодуванні \s-1DOS CP850\s0 на дані у кодуванні Latin\-1 Unix: -.Sp -.Vb 1 -\& dos2unix \-850 \-n in.txt out.txt -.Ve -.Sp -Перетворити дані у кодуванні \s-1CP1252\s0 Windows на дані у кодуванні Latin\-1 -Unix: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n in.txt out.txt -.Ve -.Sp -Перетворити дані у кодуванні \s-1CP252\s0 Windows на дані у кодуванні \s-1UTF\-8\s0 Unix -(Unicode): -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 in.txt | dos2unix > out.txt -.Ve -.Sp -Перетворити дані у кодуванні Latin\-1 Unix на дані у типовому кодуванні \s-1DOS:\s0 -.Sp -.Vb 1 -\& unix2dos \-iso \-n in.txt out.txt -.Ve -.Sp -Перетворити дані у кодуванні Latin\-1 Unix на дані у кодуванні \s-1DOS CP850:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n in.txt out.txt -.Ve -.Sp -Перетворити дані у кодуванні Latin\-1 Unix на дані у кодуванні Windows -\&\s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos \-1252 \-n in.txt out.txt -.Ve -.Sp -Перетворити дані у кодуванні \s-1UTF\-8\s0 Unix (Unicode) на дані у кодуванні -Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t CP1252 > out.txt -.Ve -.Sp -Див. також та -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Кодування" -.IX Subsection "Кодування" -Існує декілька різних кодувань Unicode. У Unix та Linux у файлах Unicode -здебільшого використовується кодування \s-1UTF\-8.\s0 У Windows для текстових файлів -Unicode може бути використано кодування \s-1UTF\-8, UTF\-16\s0 або \s-1UTF\-16\s0 зі -зворотним порядком байтів. Втім, здебільшого, використовується формат -\&\s-1UTF\-16.\s0 -.SS "Перетворення" -.IX Subsection "Перетворення" -У текстових файлах Unicode, як і у звичайних текстових файлах, може бути -використано розриви рядків \s-1DOS,\s0 Unix або Mac. -.PP -Усі версії dos2unix та unix2dos здатні виконувати перетворення у кодуванні -\&\s-1UTF\-8,\s0 оскільки \s-1UTF\-8\s0 було розроблено так, що зворотну сумісність з \s-1ASCII\s0 -збережено. -.PP -Програми dos2unix та unix2dos, зібрані з підтримкою Unicode \s-1UTF\-16,\s0 можуть -читати текстові файли у кодуванні \s-1UTF\-16\s0 з прямим та зворотним порядком -байтів. Щоб дізнатися про те, чи було dos2unix зібрано з підтримкою \s-1UTF\-16,\s0 -віддайте команду \f(CW\*(C`dos2unix \-V\*(C'\fR. -.PP -У Unix/Linux файли у кодуванні \s-1UTF\-16\s0 перетворюються на файли у кодуванні -локалі. Для визначення поточного кодування символів локалі скористайтеся -командою \fIlocale\fR\|(1). Якщо перетворення виявиться неможливим, програма -повідомить про помилку перетворення і пропустить відповідний файл. -.PP -У Windows файли \s-1UTF\-16\s0 типово буде перетворено на файли \s-1UTF\-8.\s0 Обидва типи -систем, Windows та Unix/Linux, мають непогані можливості з підтримки файлів -у форматуванні \s-1UTF\-8.\s0 -.PP -Кодування \s-1UTF\-16\s0 та \s-1UTF\-8\s0 є повністю сумісними. Під час перетворення не буде -втрачено жодної інформації. Якщо під час перетворення даних у кодуванні -\&\s-1UTF\-16\s0 на дані у кодуванні \s-1UTF\-8\s0 трапиться помилка, наприклад, якщо у -вхідному файлі \s-1UTF\-16\s0 міститиметься якась помилка, файл буде пропущено. -.PP -Якщо використано параметр \f(CW\*(C`\-u\*(C'\fR, файл результатів буде записано у тому -самому кодуванні \s-1UTF\-16,\s0 що і початковий файл. Використання параметра Option -\&\f(CW\*(C`\-u\*(C'\fR запобігає перетворенню даних у кодування \s-1UTF\-8.\s0 -.PP -У dos2unix та unix2dos не передбачено параметра для перетворення даних у -кодуванні \s-1UTF\-8\s0 на дані у кодуванні \s-1UTF\-16.\s0 -.PP -Режим перетворення \s-1ISO\s0 та 7\-бітовий режим не працюють для файлів \s-1UTF\-16.\s0 -.SS "Позначка порядку байтів" -.IX Subsection "Позначка порядку байтів" -У Windows до текстових файлів у кодуванні Unicode типово дописується -позначка порядку байтів (\s-1BOM\s0), оскільки багато програм Windows (зокрема -Notepad) додають таку позначку автоматично. Див. також -. -.PP -У Unix файли у кодуванні Unicode типово не містять позначки порядку -байтів. Вважається, що кодуванням текстових файлів є те кодування, яке -визначається поточною локаллю. -.PP -Програма dos2unix може визначити, чи є кодуванням файла \s-1UTF\-16,\s0 лише якщо у -файлі міститься позначка порядку байтів. Якщо у файлі, де використано -кодування \s-1UTF\-16,\s0 немає такої позначки, dos2unix вважатиме такий файл -двійковим (бінарним). -.PP -Для перетворення файлів \s-1UTF\-16\s0 без позначки порядку байтів скористайтеся -параметром \f(CW\*(C`\-ul\*(C'\fR або \f(CW\*(C`\-ub\*(C'\fR. -.PP -Типово dos2unix не записує до файлів результатів перетворення позначки -порядку байтів (\s-1BOM\s0). Якщо використано параметр \f(CW\*(C`\-b\*(C'\fR, dos2unix запише до -файла результатів \s-1BOM,\s0 якщо \s-1BOM\s0 була у файлі початкових даних. -.PP -Типово unix2dos записує позначку порядку байтів (\s-1BOM\s0) до файла результатів, -якщо \s-1BOM\s0 є у початковому файлі. Скористайтеся параметром \f(CW\*(C`\-r\*(C'\fR, щоб вилучити -\&\s-1BOM.\s0 -.PP -Dos2unix та unix2dos завжди записують до файла результатів позначку порядку -байтів (\s-1BOM\s0), якщо використано параметр \f(CW\*(C`\-m\*(C'\fR. -.SS "Приклади для Unicode" -.IX Subsection "Приклади для Unicode" -Перетворити дані з Windows \s-1UTF\-16 \s0(з позначкою порядку байтів (\s-1BOM\s0)) у -формат Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-n in.txt out.txt -.Ve -.PP -Перетворити дані у форматі Windows \s-1UTF\-16LE \s0(без \s-1BOM\s0) на дані у форматі -\&\s-1UTF\-8\s0 Unix: -.PP -.Vb 1 -\& dos2unix \-ul \-n in.txt out.txt -.Ve -.PP -Перетворити дані у кодуванні \s-1UTF\-8\s0 Unix на дані у кодуванні Windows \s-1UTF\-8\s0 -без \s-1BOM:\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n in.txt out.txt -.Ve -.PP -Перетворити дані у кодуванні \s-1UTF\-8\s0 Unix на дані у кодуванні Windows \s-1UTF\-16:\s0 -.PP -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t UTF\-16 > out.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 є китайським урядовим стандартом. Підтримка обов’язкової підмножини -стандарту \s-1GB18030\s0 є неодмінною вимогою до будь\-яких програмних продуктів, -які продаються у Китаї. Див. також . -.PP -Кодування \s-1GB18030\s0 є повністю сумісним із Unicode. Його можна розглядати як -формат перетворення unicode. Подібно до \s-1UTF\-8, GB18030\s0 є сумісним із -\&\s-1ASCII. GB18030\s0 також є сумісним із кодовою сторінкою Windows 936, яку ще -називають \s-1GBK.\s0 -.PP -У Unix/Linux файли \s-1UTF\-16\s0 буде перетворено до кодування \s-1GB18030,\s0 якщо -кодуванням локалі є \s-1GB18030.\s0 Зауважте, що це спрацює, лише якщо встановлено -значення країни КНР. Наприклад, у англійській локалі для Великоританії із -встановленою локаллю \f(CW\*(C`en_GB.GB18030\*(C'\fR перетворення \s-1UTF\-16\s0 на \s-1GB18030\s0 не -працюватиме, а у китайській локалі \f(CW\*(C`zh_CN.GB18030\*(C'\fR все працюватиме як слід. -.PP -У Windows для перетворення файлів \s-1UTF\-16\s0 на файли \s-1GB18030\s0 слід вказати -параметр \f(CW\*(C`\-gb\*(C'\fR. -.PP -У файлах у кодуванні \s-1GB18030\s0 може міститися позначка порядку байтів, так -само, як у файлах у кодуванні Unicode. -.SH "ПРИКЛАДИ" -.IX Header "ПРИКЛАДИ" -Прочитати вхідні дані зі стандартного джерела (stdin) і записати результат -до стандартного виведення (stdout): -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Перетворити дані у a.txt і замістити цей файл. Перетворити дані у b.txt і -замістити цей файл: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Перетворити дані у a.txt і замістити файл у режимі перетворення ascii: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Перетворити дані у a.txt і замістити файл у режимі перетворення -ascii. Перетворити дані у b.txt і замістити цей файл у режимі 7\-бітового -перетворення: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Перетворити файл a.txt з формату Mac на формат Unix: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Перетворити файл a.txt з формату Unix на формат Mac: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Перетворити дані у a.txt, замістити цей файл і зберегти часову позначку -початкового файла: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Перетворити дані у файлі a.txt і записати результати до файла e.txt: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Перетворити дані у файлі a.txt і записати результати до файла -e.txt. Скопіювати часову позначку файла a.txt для файла e.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Перетворити дані у a.txt і замістити цей файл. Перетворити дані у b.txt і -записати результат до e.txt: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Перетворити дані у c.txt і записати результати до e.txt. Перетворити дані у -a.txt і замістити ними цей файл. Перетворити дані у b.txt і замістити ними -цей файл. Перетворити дані у d.txt і записати результати до f.txt: -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "РЕКУРСИВНЕ ПЕРЕТВОРЕННЯ" -.IX Header "РЕКУРСИВНЕ ПЕРЕТВОРЕННЯ" -Для рекурсивного перетворення текстових файлів у ієрархії каталогів слід -використовувати dos2unix у поєднанні з програмами \fIfind\fR\|(1) та -\&\fIxargs\fR\|(1). Наприклад, щоб виконати перетворення усіх файлів .txt у структурі -підкаталогів поточного каталогу, віддайте таку команду: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "ЛОКАЛІЗАЦІЯ" -.IX Header "ЛОКАЛІЗАЦІЯ" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -Основна мова визначається за допомогою змінної середовища \s-1LANG.\s0 Значення -змінної \s-1LANG\s0 складається з декількох частин. Перша частина записується -малими літерами і визначає код мови. Друга частина є необов’язковою, -визначає код країни і записується прописними літерами, відокремлюється від -першої частини символом підкреслювання. Передбачено також необов’язкову -третю частину: кодування. Ця частина відокремлюється від другої частини -крапкою. Ось декілька прикладів для командних оболонок стандартного типу -\&\s-1POSIX:\s0 -.Sp -.Vb 7 -\& export LANG=uk українська -\& export LANG=uk_UA українська, Україна -\& export LANG=ru_UA російська, Україна -\& export LANG=es_ES іспанська, Іспанія -\& export LANG=es_MX іспанська, Мексика -\& export LANG=en_US.iso88591 англійська, США, кодування Latin\-1 -\& export LANG=en_GB.UTF\-8 англійська, Великобританія, кодування UTF\-8 -.Ve -.Sp -Повний список мов та кодів країн наведено у підручнику з gettext: - -.Sp -У системах Unix для отримання даних щодо локалі можна скористатися командою -\&\fIlocale\fR\|(1). -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -За допомогою змінної середовища \s-1LANGUAGE\s0 ви можете вказати список -пріоритеності мов. Записи у списку слід відокремлювати двокрапками. Програма -dos2unix надає перевагу \s-1LANGUAGE\s0 над \s-1LANG.\s0 Наприклад, перша голландська, -далі німецька: \f(CW\*(C`LANGUAGE=nl:de\*(C'\fR. Спочатку вам слід увімкнути локалізацію, -встановивши для змінної \s-1LANG \s0(або \s-1LC_ALL\s0) значення, відмінне від «C». Далі -ви зможете використовувати список пріоритетності мов за допомогою змінної -\&\s-1LANGUAGE.\s0 Додаткові відомості можна знайти у підручнику з gettext: - -.Sp -Якщо вами буде вибрано мову, перекладу якою немає, буде показано стандартні -повідомлення англійською мовою. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Змінну \s-1LOCALEDIR,\s0 встановлену під час збирання програми, можна змінити за -допомогою змінної середовища \s-1DOS2UNIX_LOCALEDIR. LOCALEDIR\s0 використовується -для пошуку файлів перекладів. Типовим значенням у системах \s-1GNU\s0 є -\&\f(CW\*(C`/usr/local/share/locale\*(C'\fR. Переглянути поточне значення змінної \s-1LOCALEDIR\s0 -можна переглянути за допомогою параметра \fB\-\-version\fR. -.Sp -Приклад (командна оболонка \s-1POSIX\s0): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "ПОВЕРНУТЕ ЗНАЧЕННЯ" -.IX Header "ПОВЕРНУТЕ ЗНАЧЕННЯ" -Якщо завдання вдасться успішно виконати, програма поверне нульовий код -виходу. Якщо станеться системна помилка, буде повернуто код цієї -помилки. Якщо станеться якась інша помилка, буде повернуто код 1. -.PP -У режимі без повідомлень повернутим значенням завжди буде нуль, якщо вказано -правильні параметри командного рядка. -.SH "СТАНДАРТИ" -.IX Header "СТАНДАРТИ" - -.PP - -.PP - -.PP - -.SH "АВТОРИ" -.IX Header "АВТОРИ" -Benjamin Lin \- , Bernd Johannes Wuebben (режим -mac2unix) \- , Christian Wurll (додатковий новий рядок) \- -, Erwin Waterlander \- (супровідник) -.PP -Сторінка проекту: -.PP -Сторінка на SourceForge: -.SH "ТАКОЖ ПЕРЕГЛЯНЬТЕ" -.IX Header "ТАКОЖ ПЕРЕГЛЯНЬТЕ" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/uk/man1/unix2dos.1 b/Tools/dos2unix/share/man/uk/man1/unix2dos.1 deleted file mode 100644 index 461b855..0000000 --- a/Tools/dos2unix/share/man/uk/man1/unix2dos.1 +++ /dev/null @@ -1,796 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "НАЗВА" -.IX Header "НАЗВА" -dos2unix \- програма для перетворення даних у текстовому форматі DOS/Mac у -формат Unix, і навпаки -.SH "КОРОТКИЙ ОПИС" -.IX Header "КОРОТКИЙ ОПИС" -.Vb 2 -\& dos2unix [параметри] [ФАЙЛ ...] [\-n ВХІДНИЙ_ФАЙЛ ВИХІДНИЙ_ФАЙЛ ...] -\& unix2dos [параметри] [ФАЙЛ ...] [\-n ВХІДНИЙ_ФАЙЛ ВИХІДНИЙ_ФАЙЛ ...] -.Ve -.SH "ОПИС" -.IX Header "ОПИС" -До складу пакунка Dos2unix включено програми \f(CW\*(C`dos2unix\*(C'\fR та \f(CW\*(C`unix2dos\*(C'\fR, -призначені для перетворення звичайних текстових даних у форматі \s-1DOS\s0 або Mac -на дані у форматі Unix, і навпаки. -.PP -У текстових файлах DOS/Windows розрив рядка або перехід на новий рядок -здійснюється за допомогою комбінації двох символів: повернення каретки (\s-1CR\s0) -і переведення рядка (\s-1LF\s0). У текстових файлах Unix за перехід на новий рядок -відповідає один символ: переведення рядка (\s-1LF\s0). У текстових файлах Mac, до -Mac \s-1OS X,\s0 за розрив рядка відповідав один символ: повернення каретки (\s-1CR\s0). У -сучасних версіях Mac \s-1OS\s0 використовується типовий для Unix розрив рядка (\s-1LF\s0). -.PP -Окрім символів розриву рядка, програма Dos2unix здатна виконувати -перетворення кодування файлів. Можна перетворити дані у декількох кодуваннях -\&\s-1DOS\s0 на файли у кодуванні Latin\-1 Unix. Також можна перетворити дані у файлах -Windows Unicode (\s-1UTF\-16\s0) на дані у кодуванні Unix Unicode (\s-1UTF\-8\s0). -.PP -Під час перетворення програма пропускатиме двійкові файли, якщо ви не -накажете їй виконати перетворення таких файлів безпосередньо. -.PP -Програма автоматично пропускатиме файли, які не є звичайними файлами, -зокрема каталоги та канали \s-1FIFO.\s0 -.PP -Типово, програма не вноситиме змін до символічних посилань та об’єктів -посилань. Якщо потрібно, програма може замінити символічні посилання або -записати перетворені дані до файла\-призначення символічного посилання. У -Windows запису до об’єкта символічного посилання не передбачено. -.PP -Програму dos2unix було створено за зразком програми dos2unix для -SunOS/Solaris. Втім, існує одна важлива відмінність від оригінальної версії -для SunOS/Solaris. Ця версія типово виконує заміну файлів під час -перетворення (старий режим обробки файлів), а у оригінальній версії для -SunOS/Solaris передбачено підтримку лише парного перетворення (новий режим -обробки файлів). Див. також параметри \f(CW\*(C`\-o\*(C'\fR та \f(CW\*(C`\-n\*(C'\fR. -.SH "ПАРАМЕТРИ" -.IX Header "ПАРАМЕТРИ" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Вважати усі наступні параметри назвами файлів. Цим параметром слід -користуватися, якщо вам потрібно виконати перетворення файлів, чиї назви -містять дефіси. Наприклад, щоб виконати перетворення файла «\-foo», -скористайтеся такою командою: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -Або у новому режимі файлів: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo out.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Виконати лише перетворення символів розриву рядків. Типовий режим -перетворення. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Виконати перетворення з кодування \s-1DOS\s0 на кодування \s-1ISO\-8859\-1.\s0 Див. розділ -щодо режимів перетворення. -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Використати кодову таблицю 1252 Windows (західноєвропейські мови). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -Використовувати кодову сторінку \s-1DOS 437 \s0(США). Це типова кодова сторінка для -перетворення \s-1ISO.\s0 -.IP "\fB\-850\fR" 4 -.IX Item "-850" -Використовувати кодову сторінку \s-1DOS 850 \s0(західноєвропейські мови). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -Використовувати сторінку \s-1DOS 860 \s0(португальська). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -Використовувати сторінку \s-1DOS 863 \s0(канадська французька). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -Використовувати сторінку \s-1DOS 865 \s0(скандинавські мови). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Перетворювати 8\-бітові символи на 7\-бітові. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Зберегти позначку порядку байтів (\s-1BOM\s0). Якщо у файлі вхідних даних є \s-1BOM,\s0 -записати \s-1BOM\s0 до файла результатів. Це типова поведінка під час перетворення -у формат із символами розриву рядків \s-1DOS.\s0 Див. також параметр \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode РЕЖИМ\fR" 4 -.IX Item "-c, --convmode РЕЖИМ" -Встановити режим перетворення. Значенням аргументу РЕЖИМ може бути один з -таких рядків: \fIascii\fR, \fI7bit\fR, \fIiso\fR, \fImac\fR. Типовим є режим ascii. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -Примусове перетворення двійкових файлів. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -У Windows файли в \s-1UTF\-16\s0 типово перетворюються на файли в \s-1UTF\-8,\s0 незалежно -від встановленої локалі. За допомогою цього параметра ви можете наказати -програмі перетворювати файли в \s-1UTF\-16\s0 на файли у \s-1GB18030.\s0 Цим параметром -можна скористатися лише у Windows. Див. також розділ, присвячений \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -Показати довідкові дані і завершити роботу. -.IP "\fB\-i[ПРАПОРЦІ], \-\-info[=ПРАПОРЦІ] ФАЙЛ ...\fR" 4 -.IX Item "-i[ПРАПОРЦІ], --info[=ПРАПОРЦІ] ФАЙЛ ..." -Вивести дані щодо файла. Не виконувати перетворення. -.Sp -Буде виведено такі дані, у вказаному порядку: кількість розривів рядків у -форматі \s-1DOS,\s0 кількість розривів рядків у форматі Unix, кількість розривів -рядків у форматі Mac, позначка порядку байтів, текстовим чи бінарним є файл -та назву файла. -.Sp -Приклад результатів: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Крім того, можна вказати додаткові прапорці для внесення змін у виведені -дані. Можна використовувати один або декілька таких прапорців. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Вивести кількість символів розривів рядка \s-1DOS.\s0 -.IP "\fBu\fR" 4 -.IX Item "u" -Вивести кількість символів розривів рядка Unix. -.IP "\fBm\fR" 4 -.IX Item "m" -Вивести кількість символів розривів рядка Mac. -.IP "\fBb\fR" 4 -.IX Item "b" -Вивести позначку порядку байтів. -.IP "\fBt\fR" 4 -.IX Item "t" -Вивести дані щодо того, є файл текстовим чи бінарним. -.IP "\fBc\fR" 4 -.IX Item "c" -Вивести дані лише тих файлів, які було б перетворено. -.Sp -Із прапорцем \f(CW\*(C`c\*(C'\fR dos2unix виведе лише назви файлів, у яких містяться -розриви рядків \s-1DOS.\s0 unix2dos виведе лише назви файлів, у яких містяться -розриви рядків Unix. -.RE -.RS 4 -.Sp -Приклади: -.Sp -Вивести дані щодо усіх файлів *.txt: -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Вивести кількість розривів рядків у форматі \s-1DOS\s0 і розривів рядків у форматі -Unix: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Вивести лише позначку порядку байтів: -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -Вивести список файлів, у яких є символи розриву рядків \s-1DOS:\s0 -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -Вивести список файлів, у яких використано символи розриву рядків Unix: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -Зберегти часову позначку файла вхідних даних у файлі результатів -перетворення. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -Вивести умови ліцензування програми. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -Вставити додатковий символ розриву рядка. -.Sp -\&\fBdos2unix\fR: перетворення на два символи розриву рядків Unix відбуватиметься -лише для комбінацій розриву рядків \s-1DOS.\s0 У режимі Mac виконуватиметься -перетворення на два розриви рядків Unix лише символів розриву рядків Mac. -.Sp -\&\fBunix2dos\fR: перетворення на дві комбінації розриву рядків \s-1DOS\s0 -відбуватиметься лише для символів розриву рядків \s-1DOS.\s0 У режимі Mac -виконуватиметься перетворення на два розриви рядків Mac лише символів -розриву рядків Unix. -.IP "\fB\-m, \-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -Записати до файла результатів позначку порядку байтів (\s-1BOM\s0). Типово буде -записано позначку порядку байтів \s-1UTF\-8.\s0 -.Sp -Якщо дані початкового файла закодовано у \s-1UTF\-16\s0 і використано параметр -\&\f(CW\*(C`\-u\*(C'\fR, буде дописано позначку порядку байтів \s-1UTF\-16.\s0 -.Sp -Не використовуйте цей параметр для кодувань результатів, відмінних від \s-1UTF\-8\s0 -або \s-1UTF\-16.\s0 Див. також розділ щодо \s-1UNICODE.\s0 -.IP "\fB\-n, \-\-newfile ВХІДНИЙ_ФАЙЛ ВИХІДНИЙ_ФАЙЛ ...\fR" 4 -.IX Item "-n, --newfile ВХІДНИЙ_ФАЙЛ ВИХІДНИЙ_ФАЙЛ ..." -Новий режим обробки файлів. Перетворити дані з файла ВХІДНИЙ_ФАЙЛ і записати -результати до файла ВИХІДНИЙ_ФАЙЛ. Назви файлів слід вказувати парами, \fIне -слід\fR використовувати шаблони заміни, інакше вміст файлів \fIбуде втрачено\fR. -.Sp -Власником перетвореного файла буде призначено користувача, яким було -розпочато перетворення у режимі нового файла (парному режимі). Права доступу -на читання або запис нового файла буде визначено на основі прав доступу до -початкового файла мінус \fIumask\fR\|(1) для користувача, яким було розпочато -перетворення. -.IP "\fB\-o, \-\-oldfile ФАЙЛ ...\fR" 4 -.IX Item "-o, --oldfile ФАЙЛ ..." -Застарілий режим обробки. Виконати перетворення файла ФАЙЛ і перезаписати -його вміст. Типово, програма працює у цьому режимі. Можна використовувати -шаблони заміни. -.Sp -У застарілому режимі (режимі заміщення) перетворений файл належатиме тому -самому власнику і групі і матиме ті самі права доступу на читання або запис, -що і початковий файл. Крім того, якщо перетворення файла виконується іншим -користувачем, який має права доступу на запис до файла (наприклад -користувачем root), перетворення буде перервано, якщо зберегти початкові -значення не вдасться. Зміна власника може означати неможливість читання -файла для його початкового власника. Зміна групи може призвести до проблем -із безпекою, оскільки файл може стати доступним для читання користувачам, -які не повинні мати такі права доступу. Можливість збереження прав власності -та прав доступу до файла передбачено лише у Unix. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Режим без виведення повідомлень. Програма не виводитиме жодних попереджень -або повідомлень про помилки. Повернутим значенням завжди буде нуль, якщо -вказано правильні параметри командного рядка. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -Вилучити позначку порядку байтів (\s-1BOM\s0). Не записувати \s-1BOM\s0 до файла -результатів. Це типова поведінка під час перетворення файлів з форматом -розриву рядків Unix. Див. також параметр \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s, \-\-safe\fR" 4 -.IX Item "-s, --safe" -Пропускати двійкові файли (типово). -.IP "\fB\-u, \-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -Зберегти початкове кодування \s-1UTF\-16.\s0 Файл результатів буде записано у тому -самому кодуванні \s-1UTF\-16,\s0 із прямим або зворотним порядком байтів, що і -початковий файл. Таким чином можна запобігти перетворенню даних у кодування -\&\s-1UTF\-8.\s0 До файла буде записано відповідну позначку порядку байтів -\&\s-1UTF\-16.\s0 Вимкнути цей параметр можна за допомогою параметра \f(CW\*(C`\-ascii\*(C'\fR. -.IP "\fB\-ul, \-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -Припускати, що кодуванням вхідних файлів є \s-1UTF\-16LE.\s0 -.Sp -Якщо у початковому файлі є позначка порядку байтів (\s-1BOM\s0), її буде -використано у файлі\-результаті, незалежно від використання цього параметра. -.Sp -Якщо вами було зроблено помилкове припущення щодо формату файла (файл -вхідних даних насправді не є файлом у форматі \s-1UTF\-16LE\s0), і дані вдасться -успішно перетворити, ви отримаєте файл у кодуванні \s-1UTF\-8\s0 з помилковим -вмістом. Скасувати таке помилкове перетворення можна за допомогою зворотного -перетворення \fIiconv\fR\|(1) з даних у форматі \s-1UTF\-8\s0 на дані у форматі -\&\s-1UTF\-16LE.\s0 Таким чином ви повернетеся до початкового кодування даних у файлі. -.Sp -Припущення щодо форматування \s-1UTF\-16LE\s0 працює як визначення \fIрежиму -перетворення\fR. Перемиканням на типовий режим \fIascii\fR можна вимкнути -припущення щодо форматування \s-1UTF\-16LE.\s0 -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -Припускати, що вхідним форматом є \s-1UTF\-16BE.\s0 -.Sp -Цей параметр працює у спосіб, тотожний до параметра \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v, \-\-verbose\fR" 4 -.IX Item "-v, --verbose" -Виводити докладні повідомлення. Буде показано додаткові дані щодо позначок -порядку байтів та кількості перетворених символів розриву рядків. -.IP "\fB\-F, \-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -Переходити за символічними посиланням і перетворювати файли, на які вони -вказують. -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Замінити символічні посилання перетвореними файлами (початкові файли, на які -вони вказують, змінено не буде). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -Не змінювати символічні посилання та файли, на які вони посилаються -(типово). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -Вивести дані щодо версії і завершити роботу. -.SH "РЕЖИМ MAC" -.IX Header "РЕЖИМ MAC" -У звичайному режимі розриви рядків \s-1DOS\s0 перетворюються на розриви рядків -Unix, і навпаки. Розриви рядків Mac перетворенню не підлягають. -.PP -У режимі Mac розриви рядків Mac перетворюються на розриви рядків Unix, і -навпаки. Розриви рядків \s-1DOS\s0 перетворенню не підлягають. -.PP -Щоб запустити програму у режимі перетворення Mac, скористайтеся параметром -командного рядка \f(CW\*(C`\-c mac\*(C'\fR або програмами \f(CW\*(C`mac2unix\*(C'\fR та \f(CW\*(C`unix2mac\*(C'\fR. -.SH "РЕЖИМИ ПЕРЕТВОРЕННЯ" -.IX Header "РЕЖИМИ ПЕРЕТВОРЕННЯ" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -У режимі \f(CW\*(C`ascii\*(C'\fR виконуватиметься лише перетворення символів розриву -рядків. Цей режим є типовим режимом перетворення. -.Sp -Хоча цей режим і називається режимом \s-1ASCII \s0(стандарту 7\-бітового кодування), -насправді кодування символів у ньому є 8\-бітовим. Завжди користуйтеся цим -режимом для перетворення файлів у кодуванні \s-1UTF\-8 \s0(Unicode). -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -У цьому режимі усі 8\-бітові символи, які не є частиною \s-1ASCII, \s0(з номерами -від 128 до 255) буде перетворено на відповідні 7\-бітові символи. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Перетворення символів буде виконано з кодування (кодової сторінки) \s-1DOS\s0 до -кодування \s-1ISO\-8859\-1 \s0(Latin\-1) у Unix. Символи \s-1DOS,\s0 які не мають -еквівалентів у \s-1ISO\-8859\-1\s0 і перетворення яких неможливе, буде перетворено на -символ крапки. Те саме стосується символів \s-1ISO\-8859\-1,\s0 які не мають -еквівалентів у \s-1DOS.\s0 -.Sp -Якщо буде використано лише параметр \f(CW\*(C`\-iso\*(C'\fR, програма dos2unix спробує -визначити активне кодування. Якщо це виявиться неможливим, dos2unix -використає типове кодування \s-1CP437,\s0 яке здебільшого використовується у -США. Щоб примусово визначити кодування, скористайтеся параметром \f(CW\*(C`\-437\*(C'\fR -(США), \f(CW\*(C`\-850\*(C'\fR (західноєвропейські мови), \f(CW\*(C`\-860\*(C'\fR (португальська), \f(CW\*(C`\-863\*(C'\fR -(канадська французька) або \f(CW\*(C`\-865\*(C'\fR (скандинавські мови). Використати -кодування Windows \s-1CP1252 \s0(західноєвропейські мови) можна за допомогою -параметра \f(CW\*(C`\-1252\*(C'\fR. Для інших кодувань використовуйте поєднання dos2unix з -\&\fIiconv\fR\|(1). Програма iconv здатна виконувати перетворення даних у доволі -широкому спектрі кодувань символів. -.Sp -Ніколи не користуйтеся перетворенням \s-1ISO\s0 для текстових файлів у форматі -Unicode. Використання подібного перетворення призведе до ушкодження вмісту -файлів у кодуванні \s-1UTF\-8.\s0 -.Sp -Декілька прикладів: -.Sp -Перетворити дані у типовому кодуванні \s-1DOS\s0 на дані у кодуванні Latin\-1 Unix: -.Sp -.Vb 1 -\& dos2unix \-iso \-n in.txt out.txt -.Ve -.Sp -Перетворити дані у кодуванні \s-1DOS CP850\s0 на дані у кодуванні Latin\-1 Unix: -.Sp -.Vb 1 -\& dos2unix \-850 \-n in.txt out.txt -.Ve -.Sp -Перетворити дані у кодуванні \s-1CP1252\s0 Windows на дані у кодуванні Latin\-1 -Unix: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n in.txt out.txt -.Ve -.Sp -Перетворити дані у кодуванні \s-1CP252\s0 Windows на дані у кодуванні \s-1UTF\-8\s0 Unix -(Unicode): -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 in.txt | dos2unix > out.txt -.Ve -.Sp -Перетворити дані у кодуванні Latin\-1 Unix на дані у типовому кодуванні \s-1DOS:\s0 -.Sp -.Vb 1 -\& unix2dos \-iso \-n in.txt out.txt -.Ve -.Sp -Перетворити дані у кодуванні Latin\-1 Unix на дані у кодуванні \s-1DOS CP850:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n in.txt out.txt -.Ve -.Sp -Перетворити дані у кодуванні Latin\-1 Unix на дані у кодуванні Windows -\&\s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos \-1252 \-n in.txt out.txt -.Ve -.Sp -Перетворити дані у кодуванні \s-1UTF\-8\s0 Unix (Unicode) на дані у кодуванні -Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t CP1252 > out.txt -.Ve -.Sp -Див. також та -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Кодування" -.IX Subsection "Кодування" -Існує декілька різних кодувань Unicode. У Unix та Linux у файлах Unicode -здебільшого використовується кодування \s-1UTF\-8.\s0 У Windows для текстових файлів -Unicode може бути використано кодування \s-1UTF\-8, UTF\-16\s0 або \s-1UTF\-16\s0 зі -зворотним порядком байтів. Втім, здебільшого, використовується формат -\&\s-1UTF\-16.\s0 -.SS "Перетворення" -.IX Subsection "Перетворення" -У текстових файлах Unicode, як і у звичайних текстових файлах, може бути -використано розриви рядків \s-1DOS,\s0 Unix або Mac. -.PP -Усі версії dos2unix та unix2dos здатні виконувати перетворення у кодуванні -\&\s-1UTF\-8,\s0 оскільки \s-1UTF\-8\s0 було розроблено так, що зворотну сумісність з \s-1ASCII\s0 -збережено. -.PP -Програми dos2unix та unix2dos, зібрані з підтримкою Unicode \s-1UTF\-16,\s0 можуть -читати текстові файли у кодуванні \s-1UTF\-16\s0 з прямим та зворотним порядком -байтів. Щоб дізнатися про те, чи було dos2unix зібрано з підтримкою \s-1UTF\-16,\s0 -віддайте команду \f(CW\*(C`dos2unix \-V\*(C'\fR. -.PP -У Unix/Linux файли у кодуванні \s-1UTF\-16\s0 перетворюються на файли у кодуванні -локалі. Для визначення поточного кодування символів локалі скористайтеся -командою \fIlocale\fR\|(1). Якщо перетворення виявиться неможливим, програма -повідомить про помилку перетворення і пропустить відповідний файл. -.PP -У Windows файли \s-1UTF\-16\s0 типово буде перетворено на файли \s-1UTF\-8.\s0 Обидва типи -систем, Windows та Unix/Linux, мають непогані можливості з підтримки файлів -у форматуванні \s-1UTF\-8.\s0 -.PP -Кодування \s-1UTF\-16\s0 та \s-1UTF\-8\s0 є повністю сумісними. Під час перетворення не буде -втрачено жодної інформації. Якщо під час перетворення даних у кодуванні -\&\s-1UTF\-16\s0 на дані у кодуванні \s-1UTF\-8\s0 трапиться помилка, наприклад, якщо у -вхідному файлі \s-1UTF\-16\s0 міститиметься якась помилка, файл буде пропущено. -.PP -Якщо використано параметр \f(CW\*(C`\-u\*(C'\fR, файл результатів буде записано у тому -самому кодуванні \s-1UTF\-16,\s0 що і початковий файл. Використання параметра Option -\&\f(CW\*(C`\-u\*(C'\fR запобігає перетворенню даних у кодування \s-1UTF\-8.\s0 -.PP -У dos2unix та unix2dos не передбачено параметра для перетворення даних у -кодуванні \s-1UTF\-8\s0 на дані у кодуванні \s-1UTF\-16.\s0 -.PP -Режим перетворення \s-1ISO\s0 та 7\-бітовий режим не працюють для файлів \s-1UTF\-16.\s0 -.SS "Позначка порядку байтів" -.IX Subsection "Позначка порядку байтів" -У Windows до текстових файлів у кодуванні Unicode типово дописується -позначка порядку байтів (\s-1BOM\s0), оскільки багато програм Windows (зокрема -Notepad) додають таку позначку автоматично. Див. також -. -.PP -У Unix файли у кодуванні Unicode типово не містять позначки порядку -байтів. Вважається, що кодуванням текстових файлів є те кодування, яке -визначається поточною локаллю. -.PP -Програма dos2unix може визначити, чи є кодуванням файла \s-1UTF\-16,\s0 лише якщо у -файлі міститься позначка порядку байтів. Якщо у файлі, де використано -кодування \s-1UTF\-16,\s0 немає такої позначки, dos2unix вважатиме такий файл -двійковим (бінарним). -.PP -Для перетворення файлів \s-1UTF\-16\s0 без позначки порядку байтів скористайтеся -параметром \f(CW\*(C`\-ul\*(C'\fR або \f(CW\*(C`\-ub\*(C'\fR. -.PP -Типово dos2unix не записує до файлів результатів перетворення позначки -порядку байтів (\s-1BOM\s0). Якщо використано параметр \f(CW\*(C`\-b\*(C'\fR, dos2unix запише до -файла результатів \s-1BOM,\s0 якщо \s-1BOM\s0 була у файлі початкових даних. -.PP -Типово unix2dos записує позначку порядку байтів (\s-1BOM\s0) до файла результатів, -якщо \s-1BOM\s0 є у початковому файлі. Скористайтеся параметром \f(CW\*(C`\-r\*(C'\fR, щоб вилучити -\&\s-1BOM.\s0 -.PP -Dos2unix та unix2dos завжди записують до файла результатів позначку порядку -байтів (\s-1BOM\s0), якщо використано параметр \f(CW\*(C`\-m\*(C'\fR. -.SS "Приклади для Unicode" -.IX Subsection "Приклади для Unicode" -Перетворити дані з Windows \s-1UTF\-16 \s0(з позначкою порядку байтів (\s-1BOM\s0)) у -формат Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-n in.txt out.txt -.Ve -.PP -Перетворити дані у форматі Windows \s-1UTF\-16LE \s0(без \s-1BOM\s0) на дані у форматі -\&\s-1UTF\-8\s0 Unix: -.PP -.Vb 1 -\& dos2unix \-ul \-n in.txt out.txt -.Ve -.PP -Перетворити дані у кодуванні \s-1UTF\-8\s0 Unix на дані у кодуванні Windows \s-1UTF\-8\s0 -без \s-1BOM:\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n in.txt out.txt -.Ve -.PP -Перетворити дані у кодуванні \s-1UTF\-8\s0 Unix на дані у кодуванні Windows \s-1UTF\-16:\s0 -.PP -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t UTF\-16 > out.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 є китайським урядовим стандартом. Підтримка обов’язкової підмножини -стандарту \s-1GB18030\s0 є неодмінною вимогою до будь\-яких програмних продуктів, -які продаються у Китаї. Див. також . -.PP -Кодування \s-1GB18030\s0 є повністю сумісним із Unicode. Його можна розглядати як -формат перетворення unicode. Подібно до \s-1UTF\-8, GB18030\s0 є сумісним із -\&\s-1ASCII. GB18030\s0 також є сумісним із кодовою сторінкою Windows 936, яку ще -називають \s-1GBK.\s0 -.PP -У Unix/Linux файли \s-1UTF\-16\s0 буде перетворено до кодування \s-1GB18030,\s0 якщо -кодуванням локалі є \s-1GB18030.\s0 Зауважте, що це спрацює, лише якщо встановлено -значення країни КНР. Наприклад, у англійській локалі для Великоританії із -встановленою локаллю \f(CW\*(C`en_GB.GB18030\*(C'\fR перетворення \s-1UTF\-16\s0 на \s-1GB18030\s0 не -працюватиме, а у китайській локалі \f(CW\*(C`zh_CN.GB18030\*(C'\fR все працюватиме як слід. -.PP -У Windows для перетворення файлів \s-1UTF\-16\s0 на файли \s-1GB18030\s0 слід вказати -параметр \f(CW\*(C`\-gb\*(C'\fR. -.PP -У файлах у кодуванні \s-1GB18030\s0 може міститися позначка порядку байтів, так -само, як у файлах у кодуванні Unicode. -.SH "ПРИКЛАДИ" -.IX Header "ПРИКЛАДИ" -Прочитати вхідні дані зі стандартного джерела (stdin) і записати результат -до стандартного виведення (stdout): -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Перетворити дані у a.txt і замістити цей файл. Перетворити дані у b.txt і -замістити цей файл: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Перетворити дані у a.txt і замістити файл у режимі перетворення ascii: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Перетворити дані у a.txt і замістити файл у режимі перетворення -ascii. Перетворити дані у b.txt і замістити цей файл у режимі 7\-бітового -перетворення: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Перетворити файл a.txt з формату Mac на формат Unix: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Перетворити файл a.txt з формату Unix на формат Mac: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Перетворити дані у a.txt, замістити цей файл і зберегти часову позначку -початкового файла: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Перетворити дані у файлі a.txt і записати результати до файла e.txt: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Перетворити дані у файлі a.txt і записати результати до файла -e.txt. Скопіювати часову позначку файла a.txt для файла e.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Перетворити дані у a.txt і замістити цей файл. Перетворити дані у b.txt і -записати результат до e.txt: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Перетворити дані у c.txt і записати результати до e.txt. Перетворити дані у -a.txt і замістити ними цей файл. Перетворити дані у b.txt і замістити ними -цей файл. Перетворити дані у d.txt і записати результати до f.txt: -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "РЕКУРСИВНЕ ПЕРЕТВОРЕННЯ" -.IX Header "РЕКУРСИВНЕ ПЕРЕТВОРЕННЯ" -Для рекурсивного перетворення текстових файлів у ієрархії каталогів слід -використовувати dos2unix у поєднанні з програмами \fIfind\fR\|(1) та -\&\fIxargs\fR\|(1). Наприклад, щоб виконати перетворення усіх файлів .txt у структурі -підкаталогів поточного каталогу, віддайте таку команду: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "ЛОКАЛІЗАЦІЯ" -.IX Header "ЛОКАЛІЗАЦІЯ" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -Основна мова визначається за допомогою змінної середовища \s-1LANG.\s0 Значення -змінної \s-1LANG\s0 складається з декількох частин. Перша частина записується -малими літерами і визначає код мови. Друга частина є необов’язковою, -визначає код країни і записується прописними літерами, відокремлюється від -першої частини символом підкреслювання. Передбачено також необов’язкову -третю частину: кодування. Ця частина відокремлюється від другої частини -крапкою. Ось декілька прикладів для командних оболонок стандартного типу -\&\s-1POSIX:\s0 -.Sp -.Vb 7 -\& export LANG=uk українська -\& export LANG=uk_UA українська, Україна -\& export LANG=ru_UA російська, Україна -\& export LANG=es_ES іспанська, Іспанія -\& export LANG=es_MX іспанська, Мексика -\& export LANG=en_US.iso88591 англійська, США, кодування Latin\-1 -\& export LANG=en_GB.UTF\-8 англійська, Великобританія, кодування UTF\-8 -.Ve -.Sp -Повний список мов та кодів країн наведено у підручнику з gettext: - -.Sp -У системах Unix для отримання даних щодо локалі можна скористатися командою -\&\fIlocale\fR\|(1). -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -За допомогою змінної середовища \s-1LANGUAGE\s0 ви можете вказати список -пріоритеності мов. Записи у списку слід відокремлювати двокрапками. Програма -dos2unix надає перевагу \s-1LANGUAGE\s0 над \s-1LANG.\s0 Наприклад, перша голландська, -далі німецька: \f(CW\*(C`LANGUAGE=nl:de\*(C'\fR. Спочатку вам слід увімкнути локалізацію, -встановивши для змінної \s-1LANG \s0(або \s-1LC_ALL\s0) значення, відмінне від «C». Далі -ви зможете використовувати список пріоритетності мов за допомогою змінної -\&\s-1LANGUAGE.\s0 Додаткові відомості можна знайти у підручнику з gettext: - -.Sp -Якщо вами буде вибрано мову, перекладу якою немає, буде показано стандартні -повідомлення англійською мовою. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Змінну \s-1LOCALEDIR,\s0 встановлену під час збирання програми, можна змінити за -допомогою змінної середовища \s-1DOS2UNIX_LOCALEDIR. LOCALEDIR\s0 використовується -для пошуку файлів перекладів. Типовим значенням у системах \s-1GNU\s0 є -\&\f(CW\*(C`/usr/local/share/locale\*(C'\fR. Переглянути поточне значення змінної \s-1LOCALEDIR\s0 -можна переглянути за допомогою параметра \fB\-\-version\fR. -.Sp -Приклад (командна оболонка \s-1POSIX\s0): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "ПОВЕРНУТЕ ЗНАЧЕННЯ" -.IX Header "ПОВЕРНУТЕ ЗНАЧЕННЯ" -Якщо завдання вдасться успішно виконати, програма поверне нульовий код -виходу. Якщо станеться системна помилка, буде повернуто код цієї -помилки. Якщо станеться якась інша помилка, буде повернуто код 1. -.PP -У режимі без повідомлень повернутим значенням завжди буде нуль, якщо вказано -правильні параметри командного рядка. -.SH "СТАНДАРТИ" -.IX Header "СТАНДАРТИ" - -.PP - -.PP - -.PP - -.SH "АВТОРИ" -.IX Header "АВТОРИ" -Benjamin Lin \- , Bernd Johannes Wuebben (режим -mac2unix) \- , Christian Wurll (додатковий новий рядок) \- -, Erwin Waterlander \- (супровідник) -.PP -Сторінка проекту: -.PP -Сторінка на SourceForge: -.SH "ТАКОЖ ПЕРЕГЛЯНЬТЕ" -.IX Header "ТАКОЖ ПЕРЕГЛЯНЬТЕ" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1) diff --git a/Tools/dos2unix/share/man/uk/man1/unix2mac.1 b/Tools/dos2unix/share/man/uk/man1/unix2mac.1 deleted file mode 100644 index 461b855..0000000 --- a/Tools/dos2unix/share/man/uk/man1/unix2mac.1 +++ /dev/null @@ -1,796 +0,0 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" ======================================================================== -.\" -.IX Title "dos2unix 1" -.TH dos2unix 1 "2015-02-11" "dos2unix" "2015-02-11" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "НАЗВА" -.IX Header "НАЗВА" -dos2unix \- програма для перетворення даних у текстовому форматі DOS/Mac у -формат Unix, і навпаки -.SH "КОРОТКИЙ ОПИС" -.IX Header "КОРОТКИЙ ОПИС" -.Vb 2 -\& dos2unix [параметри] [ФАЙЛ ...] [\-n ВХІДНИЙ_ФАЙЛ ВИХІДНИЙ_ФАЙЛ ...] -\& unix2dos [параметри] [ФАЙЛ ...] [\-n ВХІДНИЙ_ФАЙЛ ВИХІДНИЙ_ФАЙЛ ...] -.Ve -.SH "ОПИС" -.IX Header "ОПИС" -До складу пакунка Dos2unix включено програми \f(CW\*(C`dos2unix\*(C'\fR та \f(CW\*(C`unix2dos\*(C'\fR, -призначені для перетворення звичайних текстових даних у форматі \s-1DOS\s0 або Mac -на дані у форматі Unix, і навпаки. -.PP -У текстових файлах DOS/Windows розрив рядка або перехід на новий рядок -здійснюється за допомогою комбінації двох символів: повернення каретки (\s-1CR\s0) -і переведення рядка (\s-1LF\s0). У текстових файлах Unix за перехід на новий рядок -відповідає один символ: переведення рядка (\s-1LF\s0). У текстових файлах Mac, до -Mac \s-1OS X,\s0 за розрив рядка відповідав один символ: повернення каретки (\s-1CR\s0). У -сучасних версіях Mac \s-1OS\s0 використовується типовий для Unix розрив рядка (\s-1LF\s0). -.PP -Окрім символів розриву рядка, програма Dos2unix здатна виконувати -перетворення кодування файлів. Можна перетворити дані у декількох кодуваннях -\&\s-1DOS\s0 на файли у кодуванні Latin\-1 Unix. Також можна перетворити дані у файлах -Windows Unicode (\s-1UTF\-16\s0) на дані у кодуванні Unix Unicode (\s-1UTF\-8\s0). -.PP -Під час перетворення програма пропускатиме двійкові файли, якщо ви не -накажете їй виконати перетворення таких файлів безпосередньо. -.PP -Програма автоматично пропускатиме файли, які не є звичайними файлами, -зокрема каталоги та канали \s-1FIFO.\s0 -.PP -Типово, програма не вноситиме змін до символічних посилань та об’єктів -посилань. Якщо потрібно, програма може замінити символічні посилання або -записати перетворені дані до файла\-призначення символічного посилання. У -Windows запису до об’єкта символічного посилання не передбачено. -.PP -Програму dos2unix було створено за зразком програми dos2unix для -SunOS/Solaris. Втім, існує одна важлива відмінність від оригінальної версії -для SunOS/Solaris. Ця версія типово виконує заміну файлів під час -перетворення (старий режим обробки файлів), а у оригінальній версії для -SunOS/Solaris передбачено підтримку лише парного перетворення (новий режим -обробки файлів). Див. також параметри \f(CW\*(C`\-o\*(C'\fR та \f(CW\*(C`\-n\*(C'\fR. -.SH "ПАРАМЕТРИ" -.IX Header "ПАРАМЕТРИ" -.IP "\fB\-\-\fR" 4 -.IX Item "--" -Вважати усі наступні параметри назвами файлів. Цим параметром слід -користуватися, якщо вам потрібно виконати перетворення файлів, чиї назви -містять дефіси. Наприклад, щоб виконати перетворення файла «\-foo», -скористайтеся такою командою: -.Sp -.Vb 1 -\& dos2unix \-\- \-foo -.Ve -.Sp -Або у новому режимі файлів: -.Sp -.Vb 1 -\& dos2unix \-n \-\- \-foo out.txt -.Ve -.IP "\fB\-ascii\fR" 4 -.IX Item "-ascii" -Виконати лише перетворення символів розриву рядків. Типовий режим -перетворення. -.IP "\fB\-iso\fR" 4 -.IX Item "-iso" -Виконати перетворення з кодування \s-1DOS\s0 на кодування \s-1ISO\-8859\-1.\s0 Див. розділ -щодо режимів перетворення. -.IP "\fB\-1252\fR" 4 -.IX Item "-1252" -Використати кодову таблицю 1252 Windows (західноєвропейські мови). -.IP "\fB\-437\fR" 4 -.IX Item "-437" -Використовувати кодову сторінку \s-1DOS 437 \s0(США). Це типова кодова сторінка для -перетворення \s-1ISO.\s0 -.IP "\fB\-850\fR" 4 -.IX Item "-850" -Використовувати кодову сторінку \s-1DOS 850 \s0(західноєвропейські мови). -.IP "\fB\-860\fR" 4 -.IX Item "-860" -Використовувати сторінку \s-1DOS 860 \s0(португальська). -.IP "\fB\-863\fR" 4 -.IX Item "-863" -Використовувати сторінку \s-1DOS 863 \s0(канадська французька). -.IP "\fB\-865\fR" 4 -.IX Item "-865" -Використовувати сторінку \s-1DOS 865 \s0(скандинавські мови). -.IP "\fB\-7\fR" 4 -.IX Item "-7" -Перетворювати 8\-бітові символи на 7\-бітові. -.IP "\fB\-b, \-\-keep\-bom\fR" 4 -.IX Item "-b, --keep-bom" -Зберегти позначку порядку байтів (\s-1BOM\s0). Якщо у файлі вхідних даних є \s-1BOM,\s0 -записати \s-1BOM\s0 до файла результатів. Це типова поведінка під час перетворення -у формат із символами розриву рядків \s-1DOS.\s0 Див. також параметр \f(CW\*(C`\-r\*(C'\fR. -.IP "\fB\-c, \-\-convmode РЕЖИМ\fR" 4 -.IX Item "-c, --convmode РЕЖИМ" -Встановити режим перетворення. Значенням аргументу РЕЖИМ може бути один з -таких рядків: \fIascii\fR, \fI7bit\fR, \fIiso\fR, \fImac\fR. Типовим є режим ascii. -.IP "\fB\-f, \-\-force\fR" 4 -.IX Item "-f, --force" -Примусове перетворення двійкових файлів. -.IP "\fB\-gb, \-\-gb18030\fR" 4 -.IX Item "-gb, --gb18030" -У Windows файли в \s-1UTF\-16\s0 типово перетворюються на файли в \s-1UTF\-8,\s0 незалежно -від встановленої локалі. За допомогою цього параметра ви можете наказати -програмі перетворювати файли в \s-1UTF\-16\s0 на файли у \s-1GB18030.\s0 Цим параметром -можна скористатися лише у Windows. Див. також розділ, присвячений \s-1GB18030.\s0 -.IP "\fB\-h, \-\-help\fR" 4 -.IX Item "-h, --help" -Показати довідкові дані і завершити роботу. -.IP "\fB\-i[ПРАПОРЦІ], \-\-info[=ПРАПОРЦІ] ФАЙЛ ...\fR" 4 -.IX Item "-i[ПРАПОРЦІ], --info[=ПРАПОРЦІ] ФАЙЛ ..." -Вивести дані щодо файла. Не виконувати перетворення. -.Sp -Буде виведено такі дані, у вказаному порядку: кількість розривів рядків у -форматі \s-1DOS,\s0 кількість розривів рядків у форматі Unix, кількість розривів -рядків у форматі Mac, позначка порядку байтів, текстовим чи бінарним є файл -та назву файла. -.Sp -Приклад результатів: -.Sp -.Vb 8 -\& 6 0 0 no_bom text dos.txt -\& 0 6 0 no_bom text unix.txt -\& 0 0 6 no_bom text mac.txt -\& 6 6 6 no_bom text mixed.txt -\& 50 0 0 UTF\-16LE text utf16le.txt -\& 0 50 0 no_bom text utf8unix.txt -\& 50 0 0 UTF\-8 text utf8dos.txt -\& 2 418 219 no_bom binary dos2unix.exe -.Ve -.Sp -Крім того, можна вказати додаткові прапорці для внесення змін у виведені -дані. Можна використовувати один або декілька таких прапорців. -.RS 4 -.IP "\fBd\fR" 4 -.IX Item "d" -Вивести кількість символів розривів рядка \s-1DOS.\s0 -.IP "\fBu\fR" 4 -.IX Item "u" -Вивести кількість символів розривів рядка Unix. -.IP "\fBm\fR" 4 -.IX Item "m" -Вивести кількість символів розривів рядка Mac. -.IP "\fBb\fR" 4 -.IX Item "b" -Вивести позначку порядку байтів. -.IP "\fBt\fR" 4 -.IX Item "t" -Вивести дані щодо того, є файл текстовим чи бінарним. -.IP "\fBc\fR" 4 -.IX Item "c" -Вивести дані лише тих файлів, які було б перетворено. -.Sp -Із прапорцем \f(CW\*(C`c\*(C'\fR dos2unix виведе лише назви файлів, у яких містяться -розриви рядків \s-1DOS.\s0 unix2dos виведе лише назви файлів, у яких містяться -розриви рядків Unix. -.RE -.RS 4 -.Sp -Приклади: -.Sp -Вивести дані щодо усіх файлів *.txt: -.Sp -.Vb 1 -\& dos2unix \-i *.txt -.Ve -.Sp -Вивести кількість розривів рядків у форматі \s-1DOS\s0 і розривів рядків у форматі -Unix: -.Sp -.Vb 1 -\& dos2unix \-idu *.txt -.Ve -.Sp -Вивести лише позначку порядку байтів: -.Sp -.Vb 1 -\& dos2unix \-\-info=b *.txt -.Ve -.Sp -Вивести список файлів, у яких є символи розриву рядків \s-1DOS:\s0 -.Sp -.Vb 1 -\& dos2unix \-ic *.txt -.Ve -.Sp -Вивести список файлів, у яких використано символи розриву рядків Unix: -.Sp -.Vb 1 -\& unix2dos \-ic *.txt -.Ve -.RE -.IP "\fB\-k, \-\-keepdate\fR" 4 -.IX Item "-k, --keepdate" -Зберегти часову позначку файла вхідних даних у файлі результатів -перетворення. -.IP "\fB\-L, \-\-license\fR" 4 -.IX Item "-L, --license" -Вивести умови ліцензування програми. -.IP "\fB\-l, \-\-newline\fR" 4 -.IX Item "-l, --newline" -Вставити додатковий символ розриву рядка. -.Sp -\&\fBdos2unix\fR: перетворення на два символи розриву рядків Unix відбуватиметься -лише для комбінацій розриву рядків \s-1DOS.\s0 У режимі Mac виконуватиметься -перетворення на два розриви рядків Unix лише символів розриву рядків Mac. -.Sp -\&\fBunix2dos\fR: перетворення на дві комбінації розриву рядків \s-1DOS\s0 -відбуватиметься лише для символів розриву рядків \s-1DOS.\s0 У режимі Mac -виконуватиметься перетворення на два розриви рядків Mac лише символів -розриву рядків Unix. -.IP "\fB\-m, \-\-add\-bom\fR" 4 -.IX Item "-m, --add-bom" -Записати до файла результатів позначку порядку байтів (\s-1BOM\s0). Типово буде -записано позначку порядку байтів \s-1UTF\-8.\s0 -.Sp -Якщо дані початкового файла закодовано у \s-1UTF\-16\s0 і використано параметр -\&\f(CW\*(C`\-u\*(C'\fR, буде дописано позначку порядку байтів \s-1UTF\-16.\s0 -.Sp -Не використовуйте цей параметр для кодувань результатів, відмінних від \s-1UTF\-8\s0 -або \s-1UTF\-16.\s0 Див. також розділ щодо \s-1UNICODE.\s0 -.IP "\fB\-n, \-\-newfile ВХІДНИЙ_ФАЙЛ ВИХІДНИЙ_ФАЙЛ ...\fR" 4 -.IX Item "-n, --newfile ВХІДНИЙ_ФАЙЛ ВИХІДНИЙ_ФАЙЛ ..." -Новий режим обробки файлів. Перетворити дані з файла ВХІДНИЙ_ФАЙЛ і записати -результати до файла ВИХІДНИЙ_ФАЙЛ. Назви файлів слід вказувати парами, \fIне -слід\fR використовувати шаблони заміни, інакше вміст файлів \fIбуде втрачено\fR. -.Sp -Власником перетвореного файла буде призначено користувача, яким було -розпочато перетворення у режимі нового файла (парному режимі). Права доступу -на читання або запис нового файла буде визначено на основі прав доступу до -початкового файла мінус \fIumask\fR\|(1) для користувача, яким було розпочато -перетворення. -.IP "\fB\-o, \-\-oldfile ФАЙЛ ...\fR" 4 -.IX Item "-o, --oldfile ФАЙЛ ..." -Застарілий режим обробки. Виконати перетворення файла ФАЙЛ і перезаписати -його вміст. Типово, програма працює у цьому режимі. Можна використовувати -шаблони заміни. -.Sp -У застарілому режимі (режимі заміщення) перетворений файл належатиме тому -самому власнику і групі і матиме ті самі права доступу на читання або запис, -що і початковий файл. Крім того, якщо перетворення файла виконується іншим -користувачем, який має права доступу на запис до файла (наприклад -користувачем root), перетворення буде перервано, якщо зберегти початкові -значення не вдасться. Зміна власника може означати неможливість читання -файла для його початкового власника. Зміна групи може призвести до проблем -із безпекою, оскільки файл може стати доступним для читання користувачам, -які не повинні мати такі права доступу. Можливість збереження прав власності -та прав доступу до файла передбачено лише у Unix. -.IP "\fB\-q, \-\-quiet\fR" 4 -.IX Item "-q, --quiet" -Режим без виведення повідомлень. Програма не виводитиме жодних попереджень -або повідомлень про помилки. Повернутим значенням завжди буде нуль, якщо -вказано правильні параметри командного рядка. -.IP "\fB\-r, \-\-remove\-bom\fR" 4 -.IX Item "-r, --remove-bom" -Вилучити позначку порядку байтів (\s-1BOM\s0). Не записувати \s-1BOM\s0 до файла -результатів. Це типова поведінка під час перетворення файлів з форматом -розриву рядків Unix. Див. також параметр \f(CW\*(C`\-b\*(C'\fR. -.IP "\fB\-s, \-\-safe\fR" 4 -.IX Item "-s, --safe" -Пропускати двійкові файли (типово). -.IP "\fB\-u, \-\-keep\-utf16\fR" 4 -.IX Item "-u, --keep-utf16" -Зберегти початкове кодування \s-1UTF\-16.\s0 Файл результатів буде записано у тому -самому кодуванні \s-1UTF\-16,\s0 із прямим або зворотним порядком байтів, що і -початковий файл. Таким чином можна запобігти перетворенню даних у кодування -\&\s-1UTF\-8.\s0 До файла буде записано відповідну позначку порядку байтів -\&\s-1UTF\-16.\s0 Вимкнути цей параметр можна за допомогою параметра \f(CW\*(C`\-ascii\*(C'\fR. -.IP "\fB\-ul, \-\-assume\-utf16le\fR" 4 -.IX Item "-ul, --assume-utf16le" -Припускати, що кодуванням вхідних файлів є \s-1UTF\-16LE.\s0 -.Sp -Якщо у початковому файлі є позначка порядку байтів (\s-1BOM\s0), її буде -використано у файлі\-результаті, незалежно від використання цього параметра. -.Sp -Якщо вами було зроблено помилкове припущення щодо формату файла (файл -вхідних даних насправді не є файлом у форматі \s-1UTF\-16LE\s0), і дані вдасться -успішно перетворити, ви отримаєте файл у кодуванні \s-1UTF\-8\s0 з помилковим -вмістом. Скасувати таке помилкове перетворення можна за допомогою зворотного -перетворення \fIiconv\fR\|(1) з даних у форматі \s-1UTF\-8\s0 на дані у форматі -\&\s-1UTF\-16LE.\s0 Таким чином ви повернетеся до початкового кодування даних у файлі. -.Sp -Припущення щодо форматування \s-1UTF\-16LE\s0 працює як визначення \fIрежиму -перетворення\fR. Перемиканням на типовий режим \fIascii\fR можна вимкнути -припущення щодо форматування \s-1UTF\-16LE.\s0 -.IP "\fB\-ub, \-\-assume\-utf16be\fR" 4 -.IX Item "-ub, --assume-utf16be" -Припускати, що вхідним форматом є \s-1UTF\-16BE.\s0 -.Sp -Цей параметр працює у спосіб, тотожний до параметра \f(CW\*(C`\-ul\*(C'\fR. -.IP "\fB\-v, \-\-verbose\fR" 4 -.IX Item "-v, --verbose" -Виводити докладні повідомлення. Буде показано додаткові дані щодо позначок -порядку байтів та кількості перетворених символів розриву рядків. -.IP "\fB\-F, \-\-follow\-symlink\fR" 4 -.IX Item "-F, --follow-symlink" -Переходити за символічними посиланням і перетворювати файли, на які вони -вказують. -.IP "\fB\-R, \-\-replace\-symlink\fR" 4 -.IX Item "-R, --replace-symlink" -Замінити символічні посилання перетвореними файлами (початкові файли, на які -вони вказують, змінено не буде). -.IP "\fB\-S, \-\-skip\-symlink\fR" 4 -.IX Item "-S, --skip-symlink" -Не змінювати символічні посилання та файли, на які вони посилаються -(типово). -.IP "\fB\-V, \-\-version\fR" 4 -.IX Item "-V, --version" -Вивести дані щодо версії і завершити роботу. -.SH "РЕЖИМ MAC" -.IX Header "РЕЖИМ MAC" -У звичайному режимі розриви рядків \s-1DOS\s0 перетворюються на розриви рядків -Unix, і навпаки. Розриви рядків Mac перетворенню не підлягають. -.PP -У режимі Mac розриви рядків Mac перетворюються на розриви рядків Unix, і -навпаки. Розриви рядків \s-1DOS\s0 перетворенню не підлягають. -.PP -Щоб запустити програму у режимі перетворення Mac, скористайтеся параметром -командного рядка \f(CW\*(C`\-c mac\*(C'\fR або програмами \f(CW\*(C`mac2unix\*(C'\fR та \f(CW\*(C`unix2mac\*(C'\fR. -.SH "РЕЖИМИ ПЕРЕТВОРЕННЯ" -.IX Header "РЕЖИМИ ПЕРЕТВОРЕННЯ" -.IP "\fBascii\fR" 4 -.IX Item "ascii" -У режимі \f(CW\*(C`ascii\*(C'\fR виконуватиметься лише перетворення символів розриву -рядків. Цей режим є типовим режимом перетворення. -.Sp -Хоча цей режим і називається режимом \s-1ASCII \s0(стандарту 7\-бітового кодування), -насправді кодування символів у ньому є 8\-бітовим. Завжди користуйтеся цим -режимом для перетворення файлів у кодуванні \s-1UTF\-8 \s0(Unicode). -.IP "\fB7bit\fR" 4 -.IX Item "7bit" -У цьому режимі усі 8\-бітові символи, які не є частиною \s-1ASCII, \s0(з номерами -від 128 до 255) буде перетворено на відповідні 7\-бітові символи. -.IP "\fBiso\fR" 4 -.IX Item "iso" -Перетворення символів буде виконано з кодування (кодової сторінки) \s-1DOS\s0 до -кодування \s-1ISO\-8859\-1 \s0(Latin\-1) у Unix. Символи \s-1DOS,\s0 які не мають -еквівалентів у \s-1ISO\-8859\-1\s0 і перетворення яких неможливе, буде перетворено на -символ крапки. Те саме стосується символів \s-1ISO\-8859\-1,\s0 які не мають -еквівалентів у \s-1DOS.\s0 -.Sp -Якщо буде використано лише параметр \f(CW\*(C`\-iso\*(C'\fR, програма dos2unix спробує -визначити активне кодування. Якщо це виявиться неможливим, dos2unix -використає типове кодування \s-1CP437,\s0 яке здебільшого використовується у -США. Щоб примусово визначити кодування, скористайтеся параметром \f(CW\*(C`\-437\*(C'\fR -(США), \f(CW\*(C`\-850\*(C'\fR (західноєвропейські мови), \f(CW\*(C`\-860\*(C'\fR (португальська), \f(CW\*(C`\-863\*(C'\fR -(канадська французька) або \f(CW\*(C`\-865\*(C'\fR (скандинавські мови). Використати -кодування Windows \s-1CP1252 \s0(західноєвропейські мови) можна за допомогою -параметра \f(CW\*(C`\-1252\*(C'\fR. Для інших кодувань використовуйте поєднання dos2unix з -\&\fIiconv\fR\|(1). Програма iconv здатна виконувати перетворення даних у доволі -широкому спектрі кодувань символів. -.Sp -Ніколи не користуйтеся перетворенням \s-1ISO\s0 для текстових файлів у форматі -Unicode. Використання подібного перетворення призведе до ушкодження вмісту -файлів у кодуванні \s-1UTF\-8.\s0 -.Sp -Декілька прикладів: -.Sp -Перетворити дані у типовому кодуванні \s-1DOS\s0 на дані у кодуванні Latin\-1 Unix: -.Sp -.Vb 1 -\& dos2unix \-iso \-n in.txt out.txt -.Ve -.Sp -Перетворити дані у кодуванні \s-1DOS CP850\s0 на дані у кодуванні Latin\-1 Unix: -.Sp -.Vb 1 -\& dos2unix \-850 \-n in.txt out.txt -.Ve -.Sp -Перетворити дані у кодуванні \s-1CP1252\s0 Windows на дані у кодуванні Latin\-1 -Unix: -.Sp -.Vb 1 -\& dos2unix \-1252 \-n in.txt out.txt -.Ve -.Sp -Перетворити дані у кодуванні \s-1CP252\s0 Windows на дані у кодуванні \s-1UTF\-8\s0 Unix -(Unicode): -.Sp -.Vb 1 -\& iconv \-f CP1252 \-t UTF\-8 in.txt | dos2unix > out.txt -.Ve -.Sp -Перетворити дані у кодуванні Latin\-1 Unix на дані у типовому кодуванні \s-1DOS:\s0 -.Sp -.Vb 1 -\& unix2dos \-iso \-n in.txt out.txt -.Ve -.Sp -Перетворити дані у кодуванні Latin\-1 Unix на дані у кодуванні \s-1DOS CP850:\s0 -.Sp -.Vb 1 -\& unix2dos \-850 \-n in.txt out.txt -.Ve -.Sp -Перетворити дані у кодуванні Latin\-1 Unix на дані у кодуванні Windows -\&\s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos \-1252 \-n in.txt out.txt -.Ve -.Sp -Перетворити дані у кодуванні \s-1UTF\-8\s0 Unix (Unicode) на дані у кодуванні -Windows \s-1CP1252:\s0 -.Sp -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t CP1252 > out.txt -.Ve -.Sp -Див. також та -. -.SH "UNICODE" -.IX Header "UNICODE" -.SS "Кодування" -.IX Subsection "Кодування" -Існує декілька різних кодувань Unicode. У Unix та Linux у файлах Unicode -здебільшого використовується кодування \s-1UTF\-8.\s0 У Windows для текстових файлів -Unicode може бути використано кодування \s-1UTF\-8, UTF\-16\s0 або \s-1UTF\-16\s0 зі -зворотним порядком байтів. Втім, здебільшого, використовується формат -\&\s-1UTF\-16.\s0 -.SS "Перетворення" -.IX Subsection "Перетворення" -У текстових файлах Unicode, як і у звичайних текстових файлах, може бути -використано розриви рядків \s-1DOS,\s0 Unix або Mac. -.PP -Усі версії dos2unix та unix2dos здатні виконувати перетворення у кодуванні -\&\s-1UTF\-8,\s0 оскільки \s-1UTF\-8\s0 було розроблено так, що зворотну сумісність з \s-1ASCII\s0 -збережено. -.PP -Програми dos2unix та unix2dos, зібрані з підтримкою Unicode \s-1UTF\-16,\s0 можуть -читати текстові файли у кодуванні \s-1UTF\-16\s0 з прямим та зворотним порядком -байтів. Щоб дізнатися про те, чи було dos2unix зібрано з підтримкою \s-1UTF\-16,\s0 -віддайте команду \f(CW\*(C`dos2unix \-V\*(C'\fR. -.PP -У Unix/Linux файли у кодуванні \s-1UTF\-16\s0 перетворюються на файли у кодуванні -локалі. Для визначення поточного кодування символів локалі скористайтеся -командою \fIlocale\fR\|(1). Якщо перетворення виявиться неможливим, програма -повідомить про помилку перетворення і пропустить відповідний файл. -.PP -У Windows файли \s-1UTF\-16\s0 типово буде перетворено на файли \s-1UTF\-8.\s0 Обидва типи -систем, Windows та Unix/Linux, мають непогані можливості з підтримки файлів -у форматуванні \s-1UTF\-8.\s0 -.PP -Кодування \s-1UTF\-16\s0 та \s-1UTF\-8\s0 є повністю сумісними. Під час перетворення не буде -втрачено жодної інформації. Якщо під час перетворення даних у кодуванні -\&\s-1UTF\-16\s0 на дані у кодуванні \s-1UTF\-8\s0 трапиться помилка, наприклад, якщо у -вхідному файлі \s-1UTF\-16\s0 міститиметься якась помилка, файл буде пропущено. -.PP -Якщо використано параметр \f(CW\*(C`\-u\*(C'\fR, файл результатів буде записано у тому -самому кодуванні \s-1UTF\-16,\s0 що і початковий файл. Використання параметра Option -\&\f(CW\*(C`\-u\*(C'\fR запобігає перетворенню даних у кодування \s-1UTF\-8.\s0 -.PP -У dos2unix та unix2dos не передбачено параметра для перетворення даних у -кодуванні \s-1UTF\-8\s0 на дані у кодуванні \s-1UTF\-16.\s0 -.PP -Режим перетворення \s-1ISO\s0 та 7\-бітовий режим не працюють для файлів \s-1UTF\-16.\s0 -.SS "Позначка порядку байтів" -.IX Subsection "Позначка порядку байтів" -У Windows до текстових файлів у кодуванні Unicode типово дописується -позначка порядку байтів (\s-1BOM\s0), оскільки багато програм Windows (зокрема -Notepad) додають таку позначку автоматично. Див. також -. -.PP -У Unix файли у кодуванні Unicode типово не містять позначки порядку -байтів. Вважається, що кодуванням текстових файлів є те кодування, яке -визначається поточною локаллю. -.PP -Програма dos2unix може визначити, чи є кодуванням файла \s-1UTF\-16,\s0 лише якщо у -файлі міститься позначка порядку байтів. Якщо у файлі, де використано -кодування \s-1UTF\-16,\s0 немає такої позначки, dos2unix вважатиме такий файл -двійковим (бінарним). -.PP -Для перетворення файлів \s-1UTF\-16\s0 без позначки порядку байтів скористайтеся -параметром \f(CW\*(C`\-ul\*(C'\fR або \f(CW\*(C`\-ub\*(C'\fR. -.PP -Типово dos2unix не записує до файлів результатів перетворення позначки -порядку байтів (\s-1BOM\s0). Якщо використано параметр \f(CW\*(C`\-b\*(C'\fR, dos2unix запише до -файла результатів \s-1BOM,\s0 якщо \s-1BOM\s0 була у файлі початкових даних. -.PP -Типово unix2dos записує позначку порядку байтів (\s-1BOM\s0) до файла результатів, -якщо \s-1BOM\s0 є у початковому файлі. Скористайтеся параметром \f(CW\*(C`\-r\*(C'\fR, щоб вилучити -\&\s-1BOM.\s0 -.PP -Dos2unix та unix2dos завжди записують до файла результатів позначку порядку -байтів (\s-1BOM\s0), якщо використано параметр \f(CW\*(C`\-m\*(C'\fR. -.SS "Приклади для Unicode" -.IX Subsection "Приклади для Unicode" -Перетворити дані з Windows \s-1UTF\-16 \s0(з позначкою порядку байтів (\s-1BOM\s0)) у -формат Unix \s-1UTF\-8:\s0 -.PP -.Vb 1 -\& dos2unix \-n in.txt out.txt -.Ve -.PP -Перетворити дані у форматі Windows \s-1UTF\-16LE \s0(без \s-1BOM\s0) на дані у форматі -\&\s-1UTF\-8\s0 Unix: -.PP -.Vb 1 -\& dos2unix \-ul \-n in.txt out.txt -.Ve -.PP -Перетворити дані у кодуванні \s-1UTF\-8\s0 Unix на дані у кодуванні Windows \s-1UTF\-8\s0 -без \s-1BOM:\s0 -.PP -.Vb 1 -\& unix2dos \-m \-n in.txt out.txt -.Ve -.PP -Перетворити дані у кодуванні \s-1UTF\-8\s0 Unix на дані у кодуванні Windows \s-1UTF\-16:\s0 -.PP -.Vb 1 -\& unix2dos < in.txt | iconv \-f UTF\-8 \-t UTF\-16 > out.txt -.Ve -.SH "GB18030" -.IX Header "GB18030" -\&\s-1GB18030\s0 є китайським урядовим стандартом. Підтримка обов’язкової підмножини -стандарту \s-1GB18030\s0 є неодмінною вимогою до будь\-яких програмних продуктів, -які продаються у Китаї. Див. також . -.PP -Кодування \s-1GB18030\s0 є повністю сумісним із Unicode. Його можна розглядати як -формат перетворення unicode. Подібно до \s-1UTF\-8, GB18030\s0 є сумісним із -\&\s-1ASCII. GB18030\s0 також є сумісним із кодовою сторінкою Windows 936, яку ще -називають \s-1GBK.\s0 -.PP -У Unix/Linux файли \s-1UTF\-16\s0 буде перетворено до кодування \s-1GB18030,\s0 якщо -кодуванням локалі є \s-1GB18030.\s0 Зауважте, що це спрацює, лише якщо встановлено -значення країни КНР. Наприклад, у англійській локалі для Великоританії із -встановленою локаллю \f(CW\*(C`en_GB.GB18030\*(C'\fR перетворення \s-1UTF\-16\s0 на \s-1GB18030\s0 не -працюватиме, а у китайській локалі \f(CW\*(C`zh_CN.GB18030\*(C'\fR все працюватиме як слід. -.PP -У Windows для перетворення файлів \s-1UTF\-16\s0 на файли \s-1GB18030\s0 слід вказати -параметр \f(CW\*(C`\-gb\*(C'\fR. -.PP -У файлах у кодуванні \s-1GB18030\s0 може міститися позначка порядку байтів, так -само, як у файлах у кодуванні Unicode. -.SH "ПРИКЛАДИ" -.IX Header "ПРИКЛАДИ" -Прочитати вхідні дані зі стандартного джерела (stdin) і записати результат -до стандартного виведення (stdout): -.PP -.Vb 2 -\& dos2unix -\& dos2unix \-l \-c mac -.Ve -.PP -Перетворити дані у a.txt і замістити цей файл. Перетворити дані у b.txt і -замістити цей файл: -.PP -.Vb 2 -\& dos2unix a.txt b.txt -\& dos2unix \-o a.txt b.txt -.Ve -.PP -Перетворити дані у a.txt і замістити файл у режимі перетворення ascii: -.PP -.Vb 1 -\& dos2unix a.txt -.Ve -.PP -Перетворити дані у a.txt і замістити файл у режимі перетворення -ascii. Перетворити дані у b.txt і замістити цей файл у режимі 7\-бітового -перетворення: -.PP -.Vb 3 -\& dos2unix a.txt \-c 7bit b.txt -\& dos2unix \-c ascii a.txt \-c 7bit b.txt -\& dos2unix \-ascii a.txt \-7 b.txt -.Ve -.PP -Перетворити файл a.txt з формату Mac на формат Unix: -.PP -.Vb 2 -\& dos2unix \-c mac a.txt -\& mac2unix a.txt -.Ve -.PP -Перетворити файл a.txt з формату Unix на формат Mac: -.PP -.Vb 2 -\& unix2dos \-c mac a.txt -\& unix2mac a.txt -.Ve -.PP -Перетворити дані у a.txt, замістити цей файл і зберегти часову позначку -початкового файла: -.PP -.Vb 2 -\& dos2unix \-k a.txt -\& dos2unix \-k \-o a.txt -.Ve -.PP -Перетворити дані у файлі a.txt і записати результати до файла e.txt: -.PP -.Vb 1 -\& dos2unix \-n a.txt e.txt -.Ve -.PP -Перетворити дані у файлі a.txt і записати результати до файла -e.txt. Скопіювати часову позначку файла a.txt для файла e.txt: -.PP -.Vb 1 -\& dos2unix \-k \-n a.txt e.txt -.Ve -.PP -Перетворити дані у a.txt і замістити цей файл. Перетворити дані у b.txt і -записати результат до e.txt: -.PP -.Vb 2 -\& dos2unix a.txt \-n b.txt e.txt -\& dos2unix \-o a.txt \-n b.txt e.txt -.Ve -.PP -Перетворити дані у c.txt і записати результати до e.txt. Перетворити дані у -a.txt і замістити ними цей файл. Перетворити дані у b.txt і замістити ними -цей файл. Перетворити дані у d.txt і записати результати до f.txt: -.PP -.Vb 1 -\& dos2unix \-n c.txt e.txt \-o a.txt b.txt \-n d.txt f.txt -.Ve -.SH "РЕКУРСИВНЕ ПЕРЕТВОРЕННЯ" -.IX Header "РЕКУРСИВНЕ ПЕРЕТВОРЕННЯ" -Для рекурсивного перетворення текстових файлів у ієрархії каталогів слід -використовувати dos2unix у поєднанні з програмами \fIfind\fR\|(1) та -\&\fIxargs\fR\|(1). Наприклад, щоб виконати перетворення усіх файлів .txt у структурі -підкаталогів поточного каталогу, віддайте таку команду: -.PP -.Vb 1 -\& find . \-name *.txt |xargs dos2unix -.Ve -.SH "ЛОКАЛІЗАЦІЯ" -.IX Header "ЛОКАЛІЗАЦІЯ" -.IP "\fB\s-1LANG\s0\fR" 4 -.IX Item "LANG" -Основна мова визначається за допомогою змінної середовища \s-1LANG.\s0 Значення -змінної \s-1LANG\s0 складається з декількох частин. Перша частина записується -малими літерами і визначає код мови. Друга частина є необов’язковою, -визначає код країни і записується прописними літерами, відокремлюється від -першої частини символом підкреслювання. Передбачено також необов’язкову -третю частину: кодування. Ця частина відокремлюється від другої частини -крапкою. Ось декілька прикладів для командних оболонок стандартного типу -\&\s-1POSIX:\s0 -.Sp -.Vb 7 -\& export LANG=uk українська -\& export LANG=uk_UA українська, Україна -\& export LANG=ru_UA російська, Україна -\& export LANG=es_ES іспанська, Іспанія -\& export LANG=es_MX іспанська, Мексика -\& export LANG=en_US.iso88591 англійська, США, кодування Latin\-1 -\& export LANG=en_GB.UTF\-8 англійська, Великобританія, кодування UTF\-8 -.Ve -.Sp -Повний список мов та кодів країн наведено у підручнику з gettext: - -.Sp -У системах Unix для отримання даних щодо локалі можна скористатися командою -\&\fIlocale\fR\|(1). -.IP "\fB\s-1LANGUAGE\s0\fR" 4 -.IX Item "LANGUAGE" -За допомогою змінної середовища \s-1LANGUAGE\s0 ви можете вказати список -пріоритеності мов. Записи у списку слід відокремлювати двокрапками. Програма -dos2unix надає перевагу \s-1LANGUAGE\s0 над \s-1LANG.\s0 Наприклад, перша голландська, -далі німецька: \f(CW\*(C`LANGUAGE=nl:de\*(C'\fR. Спочатку вам слід увімкнути локалізацію, -встановивши для змінної \s-1LANG \s0(або \s-1LC_ALL\s0) значення, відмінне від «C». Далі -ви зможете використовувати список пріоритетності мов за допомогою змінної -\&\s-1LANGUAGE.\s0 Додаткові відомості можна знайти у підручнику з gettext: - -.Sp -Якщо вами буде вибрано мову, перекладу якою немає, буде показано стандартні -повідомлення англійською мовою. -.IP "\fB\s-1DOS2UNIX_LOCALEDIR\s0\fR" 4 -.IX Item "DOS2UNIX_LOCALEDIR" -Змінну \s-1LOCALEDIR,\s0 встановлену під час збирання програми, можна змінити за -допомогою змінної середовища \s-1DOS2UNIX_LOCALEDIR. LOCALEDIR\s0 використовується -для пошуку файлів перекладів. Типовим значенням у системах \s-1GNU\s0 є -\&\f(CW\*(C`/usr/local/share/locale\*(C'\fR. Переглянути поточне значення змінної \s-1LOCALEDIR\s0 -можна переглянути за допомогою параметра \fB\-\-version\fR. -.Sp -Приклад (командна оболонка \s-1POSIX\s0): -.Sp -.Vb 1 -\& export DOS2UNIX_LOCALEDIR=$HOME/share/locale -.Ve -.SH "ПОВЕРНУТЕ ЗНАЧЕННЯ" -.IX Header "ПОВЕРНУТЕ ЗНАЧЕННЯ" -Якщо завдання вдасться успішно виконати, програма поверне нульовий код -виходу. Якщо станеться системна помилка, буде повернуто код цієї -помилки. Якщо станеться якась інша помилка, буде повернуто код 1. -.PP -У режимі без повідомлень повернутим значенням завжди буде нуль, якщо вказано -правильні параметри командного рядка. -.SH "СТАНДАРТИ" -.IX Header "СТАНДАРТИ" - -.PP - -.PP - -.PP - -.SH "АВТОРИ" -.IX Header "АВТОРИ" -Benjamin Lin \- , Bernd Johannes Wuebben (режим -mac2unix) \- , Christian Wurll (додатковий новий рядок) \- -, Erwin Waterlander \- (супровідник) -.PP -Сторінка проекту: -.PP -Сторінка на SourceForge: -.SH "ТАКОЖ ПЕРЕГЛЯНЬТЕ" -.IX Header "ТАКОЖ ПЕРЕГЛЯНЬТЕ" -\&\fIfile\fR\|(1) \fIfind\fR\|(1) \fIiconv\fR\|(1) \fIlocale\fR\|(1) \fIxargs\fR\|(1)