Hallo!
The old rule: Garbage in - garbage out.
As wp pointed out there a two different converting errors in one record.
And for the first error there are a lot of different code pages that fit.
There is an awful amount of code necessary to detect these errors.
What you can do:
* Delete the record and hope that there are no more further mistakes -
or
* Change the record manually and
* Refine your code to detect the lines with bad utf8 encoding
If you plan to work with geo databases I really recommand GeoNames:
https://www.geonames.org/export/Their master DB called allCountries.zip is a CSV file with more than 10 mio records:
cities, ,villages, mountain peaks, airports, .....
with name, name in Ascii, international name, inhabitants, sealevel, timezone and ...
and of course lat, long and nation.
And there are no utf8 errors. Or say: I did not find any.
Winni