To figure out whether a FASTQ file is in Sanger, Solexa or Illumina format, run

get_fastq_format.pl <input_file>

which will output "sanger", "solexa", or "illumina", depending on the ASCII characters in the quality string.