Unix-Windows Funky Character Stripper/Swapper

Category:
Files and Directories
Type:
Snippets
Difficulty:
Beginning
Author:
Trevor Lowing

Version Compatibility: Visual Basic 6

More information:
This is a simple routine for stripping the funky characters out of documents and exported datasets created in Unix. Importing a file via FTP does most of the conversion but this routine ensures that all the characters are removed or replaced. This seems like a simple routine but I noticed a lot of questions about this out in the newsgroups.

As a side note: this routine could be made faster and more configurable by loading Chr(character numbers) into a static array. That way you could be more selective about what characters you are removing. This is what the routine FixUnixString2 does.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: