From 623dadb62a3a05e6d0f83e6b6e1f097783723182 Mon Sep 17 00:00:00 2001 From: s3lph Date: Sat, 9 Sep 2023 18:38:59 +0200 Subject: [PATCH] fix: bottle by default re-encodes UTF-8 to latin1 --- .woodpecker.yml | 10 +++++----- CHANGELOG.md | 13 +++++++++++++ matemat/__init__.py | 2 +- matemat/__main__.py | 1 + 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index b5b62a7..7dfb4d1 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -58,9 +58,9 @@ steps: - sed -re 's/file-magic/python-magic/' -i setup.py - | (for version in "$(cat CHANGELOG.md | grep '" | grep -B 1000 "<"'!'"-- END CHANGES ${version} -->" | tail -n +2 | head -n -1 | sed -re 's/^-/ */g' - echo "\n -- ${PACKAGE_AUTHOR} $(date -R)\n" + echo "matemat ($${version}-1) stable; urgency=medium\n" + cat CHANGELOG.md | grep -A 1000 "<"'!'"-- BEGIN CHANGES $${version} -->" | grep -B 1000 "<"'!'"-- END CHANGES $${version} -->" | tail -n +2 | head -n -1 | sed -re 's/^-/ */g' + echo "\n -- s3lph@kabelsalat.ch $(date -R)\n" done) > package/debian/matemat/usr/share/doc/matemat/changelog - gzip -9n package/debian/matemat/usr/share/doc/matemat/changelog - cp -r static/ package/debian/matemat/usr/lib/matemat/static/ @@ -82,8 +82,8 @@ steps: - chmod +x matemat/usr/lib/matemat/matemat matemat/DEBIAN/postinst matemat/DEBIAN/prerm matemat/DEBIAN/postrm - sed -re "s/__VERSION__/$${MATEMAT_VERSION}-1/g" -i matemat/DEBIAN/control - dpkg-deb --build matemat - - mv matemat.deb "matemat_${MATEMAT_VERSION}-1_all.deb" - - sudo -u nobody lintian "matemat_${MATEMAT_VERSION}-1_all.deb" || true + - mv matemat.deb "matemat_$${MATEMAT_VERSION}-1_all.deb" + - sudo -u nobody lintian "matemat_$${MATEMAT_VERSION}-1_all.deb" || true - >- curl --user "$${GITEA_API_USERNAME}:$${GITEA_API_PASSWORD}" diff --git a/CHANGELOG.md b/CHANGELOG.md index 0190abf..eba7c9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Matemat Changelog + +## Version 0.3.7 + +Fix bottle's default behavior of reencoding UTF-8 to latin1 + +### Changes + + +- Fix bottle's default behavior of reencoding UTF-8 to latin1 + + + + ## Version 0.3.6.1 diff --git a/matemat/__init__.py b/matemat/__init__.py index 26bec9b..645fb47 100644 --- a/matemat/__init__.py +++ b/matemat/__init__.py @@ -1,2 +1,2 @@ -__version__ = '0.3.6.1' +__version__ = '0.3.7' diff --git a/matemat/__main__.py b/matemat/__main__.py index 0839f93..c9ef2ea 100644 --- a/matemat/__main__.py +++ b/matemat/__main__.py @@ -93,6 +93,7 @@ def main(): # noinspection PyUnresolvedReferences from matemat.webserver.pagelets.receipt_smtp_cron import receipt_smtp_cron # Start the web server + bottle.FormsDict.recode_unicode = False bottle.run(host=host, port=port) # Stop cron cron.shutdown()