Fix encoding when filling forms with non UTF-8 data