Limited encoding detector to identify only predetermined encodings and to use a default encoding in case of no match. Also improved the encoding error messages.