Simplify character encoding checks in CsvPreview

Using a simpler form of encoding checking based on @alext's work on
the imminence project.