(Sep-06-2022, 10:30 PM)Winfried Wrote: t's displayed fine in Notepad++.Sure if working there is no problem.
I can live with chardetect misdetecting the encoding.
Some tips when in Notepad++ most remember to save file not only display it.
Remember define encoding(utf-8) in Python both when take file
in
and save it out
from Python,if not so can Windows mess it up and guess on wrong encoding So in code i post #2, then file in from OS and out after Python is utf-8.
# In from OS G:\div_code\answer λ chardetect pla.kml pla.kml: utf-8 with confidence 0.99 # Out put from Python G:\div_code\answer λ chardetect pla_out.kml pla_out.kml: utf-8 with confidence 0.99