| Purpose: | Quickly encode characters from the clipboard as unicode |
| License | GPL 3 |
| Type and system: | Shell-Script (HTA) for Windows XP/Vista |
| clip2uni.zip (4 KB) |
When you're developing applications in a non-English, non-Latin environment you will soon stumble upon certain limitations of the Windows platform. Windows supports Unicode quite well. But to display messages in Unicode in your apps or scripts you can't just type in what you want to show. Instead you need to encode your message.
For example, to display a msgbox in VBA/VBS/JS to say something basic like "שלום" you need to look up the Unicode value for every single one of these letters. Then you put each of those values in a Chr or ChrW function and combine it all together to the desired string of the message you want your code to show. And this is exactly what this small script does: It takes the text content of the clipboard, lets you encode the whole thing and writes it back to the editor, ready for copy&paste.
To execute the script, download and unzip the script file clip2uni.hta obove. The button "Show clipboard" will always update the current editor window with the contents of the clipboard. "Copy this to clipboard" puts everything from the editor back to the clipboard, overwriting it's contents. And "Convert to Unicode" is what you would probably click next. The button neatly transforms the contents of the editor view to encoded characters. On the bottom egde there a a handful of further options for this process: Choose Chr for Ansi or ChrW for Unicode and pick + or & for the concatenation of the whole unreadable mess.
This small thing here saved me a lot of time when I was working on a database project in Hebrew. Hope it will be a big time saver for you, too.