Exported stylesheet may not be loadable depending on the locale settings #10

asirinelli opened this Issue Aug 13, 2011 · 1 comment

2 participants


Export stylesheet function includes a "Date" field which may contain different encodings depending on the locales. In some case, it may not been possible to load the saved stylesheet because of missmatch encodings (see PEP 0263).

On my system, the following comments are added to the exported stylesheet:

# Veusz exported stylesheet (version 1.12.99)
# User: antoine
# Date: sam., 13 août 2011 11:10:46 +0000

It leads to the following error when I try to load the file:

SyntaxError: Non-ASCII character '\xc3' in file /home/antoine/test.vst on line 3, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details (test.vst, line 3)

The following commit correct the issue by simplifying the Date field: asirinelli@143a5ba


Thanks for the patch. I've fixed the issue slightly differently by just writing ISO format date-times to the output file. This should be pretty unambiguous. See here for the patch 00d2346

I've also dropped writing user names. Maybe this is a useful feature, but it probably is a privacy issue anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment