jdum / odfdo

python library for OpenDocument format (ODF)
Apache License 2.0
48 stars 11 forks source link

Need PEP-263 style encoding #8

Closed keestux closed 5 years ago

keestux commented 5 years ago

Since the name in the copyright contains non-ASCII characters it is better to be explicit about the encoding. See PEP 263.

For example

# -*- coding: utf-8 -*-
# Copyright 2018 Jérôme Dumonteil
jdum commented 5 years ago

Thax for the report, but no, you can not expect a python3 code from 2018 defaulting to ASCII, python3 code is supposed to be UTF-8 by default AFAIK. Note also that the "-*-" is not a python syntax, but a emacs or so syntax, which is a second reason to never use that. Using an editor defaulting to ASCII nowadays may lead you to severe problems in the real world.

keestux commented 5 years ago

Ah, sorry for the noise. The error I was seeing was with Python2, which obviously does not work at all :-)