you could be seeing things such as tab characters that were in your original file, and just became visible when you moved them to your db...if you read the file n bytes at a time into a byte array ( of comparable size ), you can scan the byte array for such characters and then remove replace them if you want ( or replace them with space(s) or whatever ).