fix: bottle by default re-encodes UTF-8 to latin1
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline failed

This commit is contained in:
s3lph 2023-09-09 18:38:59 +02:00
parent 76918a0f2c
commit 623dadb62a
Signed by: s3lph
GPG key ID: 0AA29A52FB33CFB5
4 changed files with 20 additions and 6 deletions

View file

@ -58,9 +58,9 @@ steps:
- sed -re 's/file-magic/python-magic/' -i setup.py
- |
(for version in "$(cat CHANGELOG.md | grep '<!-- BEGIN CHANGES' | cut -d ' ' -f 4)"; do
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 -- ${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}"

View file

@ -1,5 +1,18 @@
# Matemat Changelog
<!-- BEGIN RELEASE v0.3.7 -->
## Version 0.3.7
Fix bottle's default behavior of reencoding UTF-8 to latin1
### Changes
<!-- BEGIN CHANGES 0.3.7 -->
- Fix bottle's default behavior of reencoding UTF-8 to latin1
<!-- END CHANGES 0.3.7 -->
<!-- END RELEASE v0.3.7 -->
<!-- BEGIN RELEASE v0.3.6.1 -->
## Version 0.3.6.1

View file

@ -1,2 +1,2 @@
__version__ = '0.3.6.1'
__version__ = '0.3.7'

View file

@ -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()