Nov-12-2019, 09:21 AM
From Python built-in help (
One can check (and set) default encoding in locale:
>>> help('open')
):Quote:open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opene
r=None)
/.../
encoding is the name of the encoding used to decode or encode the
file. This should only be used in text mode. The default encoding is
platform dependent, but any encoding supported by Python can be
passed.
One can check (and set) default encoding in locale:
import locale locale.getlocale()However, more robust is to specify encoding while writing into file:
with open("map.gpx", "w", encoding='UTF-8') as f:
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.