Visual C++

EN NL TR

The previous program

Home

The next program

Fibergeek's ANSI Text Codepage Convertor

What does the program do?

This program allows you to type in a text and convert it from one codepage to another one.  I've included an UNICODE and an ANSI build.  The UNICODE build requires Windows NT4/2000/XP or later.  The ANSI version will most probably not output correctly on Windows 95/98/ME because those Operating Systems can't work with all international characters.


Why did I make this program
?

Because I'm learning turkish I get confronted with documents that are saved as ANSI on turkish systems (their codepage is 1254).  Notepad etc can't display those documents correctly on a non-turkish system (my codepage is 1252).  With this program I can now convert those documents to the correct character set and save them with Notepad as Unicode.
 

Screenshot

 

Possible enhancements...

Should I ever want to, I will add reading from and saving to a file to the program.  I may also add support for storing the last used codepage pair into the registry.
 

The code...

The default project in the workspace is Win32 Unicode Debug.  For those people who downloaded the Microsoft's Platform SDK can build this program for the IA64 processor and people owning the Windows Server 2003 DDK can also build for the AMD64 processor.

Should you run into problems compiling this program, please let me know at <fibergeek @ codegurus.be>.

NOTE : All files are ZIP files

The project
The ANSI executable (Windows 9x/NT+)
The UNICODE executable (x86) (Windows NT+)
The UNICODE executable (AMD64)
The UNICODE executable (IA64) (untested because I don't own this processor)
 

Old code...

This is the previous downloadable source code of this program : The source code at 2004-03-06

 

C# port

For the fun I have written the exact same program from stratch in C# (.NET).  While doing so I discovered that the .NET API doesn't include a function to enumerate the supported code pages.  That's why a wrote a seperate class for doing so, this class will call the EnumSystemCodePages function in the KERNEL32.DLL.

The implementation is so basic that I suggest that you download the file below and check it out yourself.

The C# project

 

The previous program

Home

The next program