Emacs для начинающих

       

Manual-e


  

rusconv v.3.11 manual

  Description.

   Rusconv is intended for converting text between russian encodings: alternative (for DOS, codepage 866), KOI-8 (for UNIX), Macintosh, Windows (codepage 1251) and latinica (russian text spelled latin letters). Rusconv also can convert from DOS/windows text file format to UNIX one and back. Files can be converted to several encodings simultaneously, any number of files can be converted simultaneously. Designed for use from command line and from command scripts. Windows version supports long file names and local network files.

  Synopsys.

  • rusconv (-h|--help)
  • rusconv [options] -(alt|koi|mac|win) +(alt|koi|mac|lat|win) [--] <file_list> [output_dir]
  • rusconv [options] -(cr2crlf|crlf2cr) [--] <file_list> [output_dir]
  • rusconv [options] -(dos2unix|win2unix|unix2dos|unix2win|d2u|w2u|u2d|u2w) [--] <file_list> [output_dir]
  • 1. rusconv (-h|--help)

      Prints help.

    2. rusconv [options] -(alt|koi|mac|win) +(alt|koi|mac|lat|win) [--] <file_list> [output_dir]

      Program converts content of files in <file_list>

    from encoding -xxx to encoding +xxx. Results are placed in files with the same names but with another extensions. Files are created in directory [output_dir], or in current one if output directory is not specified.

      You should specify one and only one encoding from which to convert:

    flag encoding

    -alt - alternative (DOS) -koi - KOI-8 (UNIX) -mac - Macintosh -win - Windows

      You can specify several encodings to convert to:

    flag encoding

    +alt - alternative (DOS) +koi - KOI-8 (UNIX) +lat - latinica +mac - Macintosh +win - Windows

      Default extensions are:

    extension for encoding

    .alt - alternative (DOS) .koi - KOI-8 (UNIX) .lat - latinica .mac - Macintosh .win - Windows

      To specify you own extensions for files with convert results use commands:

    extension for files contained text in encoding


    -aext extension - alternative (DOS) -kext extension - KOI-8 (UNIX) -lext extension - latinica -mext extension - Macintosh -wext extension - Windows

       When converting to only one encoding you can use command

    -ext extension

      Depending on encoding to which you convert it is interpreted as one of command '-aext extension', '-kext extension', '-lext extension', '-mext extension' or '-wext extension'.

      Flag '-o' is used for overwriting. Instead of creating new files rusconv changes content of existing files.

      Rusconv also can convert from DOS/windows text file format to UNIX one and back. In DOS and windows end of line is coded by two chars, in UNIX - by one char. For converting from one format to another use flags

    -cr2crlf - from UNIX text file format to DOS/windows one -crlf2cr - from DOS/windows text file format to UNIX one

      DOS and windows versions are verbose by default. UNIX version prints only warnings and error messages. To redefine default mode use flags

    '-s' - silent work, no any message will be printed '-v' - verbose work, all messages will be printed

      Windows operating system runs rusconv in separate window which should be closed after program finished. To avoid this and to let user to see report rusconv after all files converted waits for key pressed. Behavior can be changed by flags

    '-close' - to finish after all files converted '-noclose' - do not close window with report, by default

      Flags '-close' and '-noclose' are used only in windows version. DOS and UNIX versions ignore them.

      Symbols '--' stands for 'end of flag'. All after this symbols is a file list.

    3. rusconv [options] -(cr2crlf|crlf2cr) [--] <file_list> [output_dir]

      In this case rusconv converts only type of lines and doesn't convert from one encoding to another. In DOS and windows end of line coded by two chars, in UNIX - by one char.

    -cr2crlf - from UNIX text file format to DOS/windows one -crlf2cr - from DOS/windows text file format to UNIX one



      Default extensions for files are:

    extension text file format

    .cr - UNIX type .crlf - DOS/windows type .crl - DOS/windows type (used in DOS version)

       To specify you own extension use command

    -ext extension

      Other flags are used as in section '2'.

    4. rusconv [options] -(dos2unix|win2unix|unix2dos|unix2win|d2u|w2u|u2d|u2w) [--] <file_list> [output_dir]

      For most often tasks - converting general russian text from DOS to UNIX, from Windows to UNIX and back - it is enough only one flag:

    -dos2unix (or -d2u) - from DOS to UNIX -win2unix (or -w2u) - from Windows to UNIX -unix2dos (or -u2d) - from UNIX to DOS -unix2win (or -u2w) - from UNIX to Windows

      This flags are abbreviations. During command line parsing they are replaced by:

    -dos2unix (or -d2u) by '-alt +koi -crlf2cr'

    -win2unix (or -w2u) by '-win +koi -crlf2cr'

    -unix2dos (or -u2d) by '-koi +alt -cr2crlf'

    -unix2win (or -u2w) by '-koi +win -cr2crlf'



      Examples.



      1. Example for windows.

      Files file1.txt and file2.txt are converted from encoding KOI-8 to all other encodings. Results are placed in files file1.alt, file1.koi, file1.lat, file1.mac, file1.win, file2.alt, file2.koi, file2.lat, file2.mac, file2.win in directory e:\txt.

    E:\EX>rusconv -koi +alt +koi +win +mac +lat file1.txt file2.txt e:\txt\ ** rusconv -- convertor of Russian codepages, v.3.11. ** (c)w_re -- Oleg A. Paraschenko http://beta.math.spbu.ru/~prof/w_re/ .\file1.txt -> e:\txt\file1.alt, e:\txt\file1.koi, e:\txt\file1.mac, e:\txt\file1.lat, e:\txt\file1.win: ok. .\file2.txt -> e:\txt\file2.alt, e:\txt\file2.koi, e:\txt\file2.mac, e:\txt\file2.lat, e:\txt\file2.win: ok. 2 file(s) converted.

      2. Example for windows.

      Type of lines of text network files \\server\d\files\*.txt is converted from UNIX format to DOS/windows format.

    E:\EX>rusconv -cr2crlf -o \\server\d\files\*.txt ** rusconv -- convertor of Russian codepages, v.3.11. ** (c)w_re -- Oleg A. Paraschenko http://beta.math.spbu.ru/~prof/w_re/ \\server\d\files\EC-1845.TXT -> \\server\d\files\rcB180.TMP -> \\server\d\files\EC-1845.TXT: ok. \\server\d\files\HUMOR_PR.TXT -> \\server\d\files\rcB181.TMP -> \\server\d\files\HUMOR_PR.TXT: ok. \\server\d\files\NON_PAS.TXT -> \\server\d\files\rcB183.TMP -> \\server\d\files\NON_PAS.TXT: ok. 3 file(s) converted.

      3. Example for UNIX.

      Content of .html-files in directory win/

    is converted from windows style of russian text to UNIX style. Results are placed in files with the same name in directory koi/.

    rusconv -v -win2unix -ext html win/*.html koi/ ** rusconv -- convertor of Russian codepages, v.3.11. ** (c)w_re -- Oleg A. Paraschenko http://beta.math.spbu.ru/~prof/w_re/ win/faq.html -> koi/faq.html: ok. win/feedback.html -> koi/feedback.html: ok. win/index.html -> koi/index.html: ok. 3 file(s) converted.



      Return code.



      Number of converted files.

    manual-e.html

    Document created by Oleg A. Paraschenko

    Last changes - 15 November 1998


    Содержание раздела