Fix error when trying to preview PG files with unicode.