extract headers now cleaning non utf-8 chars