diff --git a/copyparty/stolen/surrogateescape.py b/copyparty/stolen/surrogateescape.py index 18e4431b..4b06ed28 100644 --- a/copyparty/stolen/surrogateescape.py +++ b/copyparty/stolen/surrogateescape.py @@ -1,3 +1,5 @@ +# coding: utf-8 + """ This is Victor Stinner's pure-Python implementation of PEP 383: the "surrogateescape" error handler of Python 3. @@ -171,7 +173,7 @@ FS_ENCODING = sys.getfilesystemencoding() if WINDOWS and not PY3: # py2 thinks win* is mbcs, probably a bug? anyways this works - FS_ENCODING = 'utf-8' + FS_ENCODING = "utf-8" # normalize the filesystem encoding name. diff --git a/scripts/make-sfx.sh b/scripts/make-sfx.sh index 44c8cad0..cb22313d 100755 --- a/scripts/make-sfx.sh +++ b/scripts/make-sfx.sh @@ -23,7 +23,7 @@ help() { exec cat <<'EOF' # (the fancy markdown editor) # # `no-fnt` saves ~9k by removing the source-code-pro font -# (mainly used my the markdown viewer/editor) +# (browsers on MS-Windows look pretty bad without this) # # `no-dd` saves ~2k by removing the mouse cursor @@ -241,6 +241,12 @@ f=dep-j2/jinja2/constants.py awk '/^LOREM_IPSUM_WORDS/{o=1;print "LOREM_IPSUM_WORDS = u\"a\"";next} !o; /"""/{o=0}' <$f >t tmv "$f" +grep -rLE '^#[^a-z]*coding: utf-8' dep-j2 | +while IFS= read -r f; do + (echo "# coding: utf-8"; cat "$f") >t + tmv "$f" +done + # up2k goes from 28k to 22k laff awk 'BEGIN{gensub(//,"",1)}'