Archive for 1st February 2010

Removing Non-ASCII Characters

A couple of years ago, I was processing some IRC log files created by an Eggdrop I had running. However, I ran into some problems related to these log files having non-ASCII characters used. I need a quick way of stripping these characters out. The following is a VB6 program (source and binary available) that can process single text files and remove all non-ASCII characters from them. (Appending “.clean.txt” to the filename.)

This was only written for one-time use, so excuse the lack of comments, and the lack of general error checking etc. Someone even slightly skilled at Visual Basic 6 will be able to change the code to batch process files and embed some basic error handling. As with all programs, use this at your own risk.

Download