awk to extract incorrect fixed length records

I have a number of unix text files containing fixed-length records (normal unix linefeed terminator) where I need to find odd records which are an incorrect length.
The data is not validated and records can contain odd backslash characters and control characters which makes them awkward to process in shell. Files are unlikely to exceed 1000 records, so efficiency is not important. Each file has a different fixed length record size.

I am looking for an awk program which can read the length of the first record of a file, then output only those records which are of a different length to the first record. The program does not need to cater for the first record being wrong.

This post works beautifully, but you need to know the length of the record in advance.

http://www.unix.com/shell-programming-scripting/116309-check-length-record.html

Something like this:

awk 'NR==1{len=length}length != len' file

Regards

That worked perfectly. Even with the records containg garbage characters.

Thank you very much.

methyl