add func normalizeChars
add func normalizeChars and corrected BOM error