fix encoding issues in bd import