fix encoding issues with whitespace symbols