Added the detect_file_encoding() function to address issue #4 UnicodeDecodeError.
The function detects the character encoding of a text-based file using chardet library to determine the appropriate encoding when reading csv files that may not explicitly declare their encoding. It analyzes a sample of the file's content to identify the most likely character encoding scheme used.