WINCLIP(1)							    WINCLIP(1)



NAME
       winclip - console Windows clipboard interface

SYNOPSIS
       winclip [-h|-v] [-w|-u-m] [-b] [-l lang] [-s sublang] -c|-p|-i [file]

DESCRIPTION
       Winclip	provides access to the Windows clipboard from a console or MS-
       DOS window.  Its operation depends on  its  mandatory  argument.   When
       executed  with  the -p (paste) argument it pastes the Windows clipboard
       to its standard output or to the file optionally specified in the  com-
       mand  line.   The winclip output may be redirected to a file (using the
       shell > syntax) or to another process (using the shell | pipeline  syn-
       tax).   When  winclip is executed with the -c (copy) argument it copies
       its standard input (or the file optionally  specified  in  the  command
       line) to the Windows clipboard.	Again, winclip input may be redirected
       to be read from a file (using the <  shell  syntax),  or  from  another
       process	of  a pipeline.  Finally, when winclip is executed with the -i
       (information) argument it will print on its standard  output  all  data
       formats that can be retrieved from the clipboard.

       Winclip	can  currently	paste text clipboard data, filenames that have
       been copied in the Windows explorer, and bitmaps which  are  pasted  in
       binary ppm format.  When tranfering text, it will automatically perform
       the appropriate Windows to console character code  (OEM)  set  transla-
       tions.	Winclip is an Intel architecture Win32 program that only works
       under the Intel processor versions of Windows NT, 95, 98, Me, 2000, XP.

OPTIONS
       -c     Copy the standard input to the Windows clipboard.

       -p     Copy the Windows clipboard contents to the standard output.

       -i     Print  on  the standard output the data formats available in the
	      clipboard.  Each format is displayed on a  separate  line.   The
	      standard	clipboard  formats are printed using their Windows API
	      CF_ names; all other formats are printed using their  registered
	      name.

       -w     Transfer	text in the Windows-native format (CF_TEXT) instead of
	      the (default) DOS-native format (CF_OEMTEXT).  The Windows  for-
	      mat  is  also  known  as ANSI text, but often represents another
	      Windows and locale-specific code page.  Setting this option will
	      affect  how  non-ASCII  characters will be encoded for clipboard
	      text and copied file icons.

       -u     Transfer text in Unicode format (CF_UNICODETEXT) instead of  the
	      (default)  DOS-native format (CF_OEMTEXT).  The Unicode encoding
	      is the same as the one used by the Windows clipboard: apparently
	      UCS-16  in  little-endian  byte  order (UTF-16LE).  Setting this
	      option will affect how non-ASCII characters will be encoded  for
	      clipboard text and copied file icons.

       -m     Transfer	text in Unicode format (CF_UNICODETEXT) instead of the
	      (default) DOS-native format (CF_OEMTEXT).  The Unicode  encoding
	      is UTF-8.  Setting this option will affect how non-ASCII charac-
	      ters will be encoded for clipboard text and copied file icons.

       -b     When outputing Unicode text, prepend a byte order mark (BOM)  at
	      the  beginning.  This may make it easier for other tools to rec-
	      ognize winclip's output format.  When reading data for the clip-
	      board,  automatically  detect Unicode data, and set the encoding
	      and endianess, if a byte-order-mark is detected.

       -l lang
	      Specify the language identifier for the text to be  copied  into
	      the clipboard.  The default value is Neutral.  The identifier is
	      case insensitive.  Specify the identifier Help to obtain a  list
	      of supported language settings.

       -s sublang
	      Specify  the  sub-language  identifier for the text to be copied
	      into the clipboard.  The default value is Default.  The  identi-
	      fier is case insensitive.  Specify the identifier Help to obtain
	      a list of supported sublanguage settings.  Specifying a  sublan-
	      guage  setting  without  the  corresponding  language setting is
	      probably not a good idea.  The combination of the  default  lan-
	      guage  and sublanguage identifiers in effect result in the clip-
	      board data getting marked as belonging to the user default  lan-
	      guage.

       -v     Print the program's version on the standard output and exit.

       -h     Print  a short help text on the program's operation on the stan-
	      dard output and exit.

EXAMPLE
       dir /b | winclip -c
       Copies the directory list to the Windows clipboard.

       winclip -p file.txt
       Saves the Windows clipboard to file.txt.

       winclip -p | perl -pe "tr/[A-Z]/[a-z]/" | winclip -c
       Converts the contents of the Windows clipboard to lowercase.

       winclip -c -l Portuguese -s Portuguese_Brazilian file.txt
       Copied the file file.txt to the	Windows  clipboard.   The  clipboard's
       contents are marked to contain text in the language Portuguese and sub-
       language Portuguese_Brazilian.

SEE ALSO
       D. Spinellis.  Outwit: Unix tool-based programming  meets  the  Windows
       world.  In USENIX 2000 Technical Conference Proceedings, San Diego, CA,
       USA, June 2000, USENIX Association.


AUTHOR
       (C) Copyright 1994-2005 Diomidis Spinellis.  All rights reserved.

       Permission to use, copy, and distribute this software and its  documen-
       tation for any purpose and without fee is hereby granted, provided that
       the above copyright notice appear in all  copies  and  that  both  that
       copyright  notice and this permission notice appear in supporting docu-
       mentation.

       THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR  IMPLIED
       WARRANTIES,  INCLUDING,	WITHOUT  LIMITATION, THE IMPLIED WARRANTIES OF
       MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

BUGS
       Should handle more clipboard content types.

       Winclip may not work as expected if the code page of the console window
       it  is running is different from the code page of the clipboard data or
       the code page it is specified to use.  You can check and change a  con-
       sole code page using the chcp command.

       In  operations  involving  8-bit  (non-Unicde)  data,  the input locale
       (that's right, the active keyboard translation) in effect at  the  time
       the  text is placed in the clipboard determines the character set asso-
       ciated with the clipboard data.	Therefore, if you want to associate  a
       Tamil  or Greek code page with the clipboard data, ensure that you have
       correctly set the active keyboard type at the time you copy the data.



				5 December 2005 		    WINCLIP(1)
