Eh, I'd think you'd have to read in the entire file and then check character by character to see if its above ASCII code 127 or not.
An approach I like to take is to check the first couple characters. If they're text, then its probably a text file. Otherwise, its probably something like an Excel file. Also note, if you do this YOU HAVE to validate the CSV data to make sure what you are truely reading makes sense as a CSV file.
I HIGHLY recommend getting a hex editor so you can play with the data in question (if you haven't gotten one already).