ClipConvert - Clipboard Data Converter

.

ClipConvert is a utility to fix a problem that Windows 95 and 98, and in some cases NT, have when copying/pasting text in a codepage different from the system codepage. Something you run across often when doing localization tasks. In addition, it's also a good tool to examine the content of the Clipboard.

Environment: Windows 9x and NT 4.x

ClipConvert Purpose

Windows applications uses different formats to communicate with the Clipboard. When the text copied is not in the same codepage as the system codepage, this may cause lost of data.

For example:

If you copy let's say Russian text from Word. The Clipboard contains RTF and Unicode data as well as Plain text data. But because your system codepage is not 1251 (Cyrillic) the Plain text data are converted into question marks. An application like Notepad does not use RTF or Unicode but Plain text and will paste question marks instead of the Russian text (even if you have Russian support installed and could type Russian text in Notepad).

To fix this, ClipConvert takes the Unicode text Word places in the Clipboard and converts it to its proper code set (that you can pick). When Notepad pastes the Plain text the Cyrillic characters are correct.

Conversely:

If you copy Russian text from Notepad. The Clipboard contains only Plain text data (in Cyrillic). When you paste it in Word (96 or later), because it expects the Plain text to be in the same codepage as the system codepage, the Cyrillic characters are lost and replaced by whatever extended character the system codepage has at the same code-points.

To fix this, ClipConvert takes the Plain text data and creates RTF and Unicode entries based on the codepage you pick. When Word paste the text, it can use the RTF or Unicode data rather than the Plain text, and pastes the proper Cyrillic characters.

You should close ClipConvert or disable the "Auto-convert" options when doing "normal" Copy/Paste commands. Use it only when exchange text in a non-system codepage between two applications not using the same Clipboard data. ClipConvert can also be useful to look at what an application places in the Clipboard.

The Implementation

When starting, ClipConvert inserts itself into the Clipboard chain and monitors any Copy command. If the "Auto-convert" option is set, it immediately converts the Clipboard contents according the rules described above. The next time an application executes a Paste command, it gets the converted data

To be more generic, ClipConvert uses its own code sets tables, allowing to convert more than just the Windows codepages. The package posted here includes conversion tables for all Windows codepages, including Thai, Arabic, Hebrew, Japanese, Chinese, etc. as well as for UTF-8 and UCS-2. Contact me if you need Macintosh or ISO tables.

Downloads

Download the executable - (130 Kb)
Contains the executable, on-line help and support for all Windows languages, except Japanese, Chinese and Korean. To install: Create a folder and extract all the files in it.

Download the Asian codepage tables - (244 Kb)
Contains support for Japanese, Chinese and Korean. To install: Extract all the files in the folder where ClipConvert.exe is located.



Comments

  • How to get the source?

    Posted by Legacy on 01/17/2001 12:00am

    Originally posted by: jollyegg

    How to get the source?

    Reply
  • Saving as Bitmap

    Posted by Legacy on 03/29/2000 12:00am

    Originally posted by: Prasad


    Hi Yves ,
    I have a picture in the clipboard.How can i open MSPAINT
    and paste the picture and save the file programmatically.
    Kindly help me.


    Reply
  • No source: should be in "tools" section

    Posted by Legacy on 12/21/1999 12:00am

    Originally posted by: MrB

    No source: should be in "tools" section

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Protecting business operations means shifting the priorities around availability from disaster recovery to business continuity. Enterprises are shifting their focus from recovery from a disaster to preventing the disaster in the first place. With this change in mindset, disaster recovery is no longer the first line of defense; the organizations with a smarter business continuity practice are less impacted when disasters strike. This SmartSelect will provide insight to help guide your enterprise toward better …

  • Live Event Date: October 29, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Are you interested in building a cognitive application using the power of IBM Watson? Need a platform that provides speed and ease for rapidly deploying this application? Join Chris Madison, Watson Solution Architect, as he walks through the process of building a Watson powered application on IBM Bluemix. Chris will talk about the new Watson Services just released on IBM bluemix, but more importantly he will do a step by step cognitive …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds