65.9K
CodeProject is changing. Read more.
Home

Quick code page converter

starIconstarIconstarIcon
emptyStarIcon
starIcon
emptyStarIcon

3.55/5 (14 votes)

Jun 20, 2004

2 min read

viewsIcon

85526

downloadIcon

4642

A simple tool that converts ANSI string to Unicode using a code page you select.

Introduction

I'll tell you an embarrassing history, after which I've made this utility.

My mother tongue is Russian, and I live in Israel. So that apart from English language, I have Russian and Hebrew installed. In the Windows settings, I set Russian as the default conversion code page from ANSI string. That means that if a non-Unicode program wants to display a string, it is always converted to Unicode using Russian code page.

Once, at evening, I worked on my computer, when suddenly an ICQ popup arrived. It was not displayed correctly (something similar to Chinese :)). That message was from someone I didn't know, with high ICQ#, and indeed longer than 'hello'. Of course, I decided that was some annoying spam, and typed 'f*** off'. Then I had to go out for a couple of hours. When I got back, there was another message waiting for me. It said 'sorry'.

Hm.. I checked the messages history, and discovered that this message arrived from the same user whose message was unreadable. I copied it to another file and opened it with IE, specifying the Hebrew code page. It said:

"Hello, my name is Elad Cohen, I'm a high school student. I found you via ICQ because you're interested in Physics just like me. I've got a couple of question in Mechanics. Would you help me please?"

Utility

It's a very small and simple utility, you'll puzzle out it fast. When you start it, there should appear its icon in the system tray. To convert a string, copy it to the clipboard (if it is in an edit control, then type Ctrl+C), and than double-click the tray icon. Your string should be displayed, whereas at the upper combo box you can choose any code page installed on your system. Enjoy.