Ensure consistent UTF-8 encoding is applied throughout the file handling process