Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/read_changelog_utf8 into lp:widelands-website
Oh, and i had a look at the encoding of the database tables and columns (possibly again). It's all utf8 :-) -- https://code.launchpad.net/~widelands-dev/widelands-website/read_changelog_utf8/+merge/332990 Your team Widelands Developers is subscribed to branch lp:widelands-website. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/read_changelog_utf8 into lp:widelands-website
Testet also encyclopedia and documentation: All works fine. Merged and deployed. -- https://code.launchpad.net/~widelands-dev/widelands-website/read_changelog_utf8/+merge/332990 Your team Widelands Developers is subscribed to branch lp:widelands-website. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/read_changelog_utf8 into lp:widelands-website
The proposal to merge lp:~widelands-dev/widelands-website/read_changelog_utf8 into lp:widelands-website has been updated. Status: Needs review => Merged For more details, see: https://code.launchpad.net/~widelands-dev/widelands-website/read_changelog_utf8/+merge/332990 -- Your team Widelands Developers is subscribed to branch lp:widelands-website. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/read_changelog_utf8 into lp:widelands-website
Thanks :-) I guess encoding failures for the encyclopedia and the documentation may rise up when wlmap_map_object_info (encyclopedia) or extract_rst.py (documentation) ran. Will try to test it, before merging this :-) -- https://code.launchpad.net/~widelands-dev/widelands-website/read_changelog_utf8/+merge/332990 Your team Widelands Developers is subscribed to branch lp:widelands-website. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/read_changelog_utf8 into lp:widelands-website
Review: Approve We might get some in the documentation and the encyclopedia as well? Basically, anything that uses Widelands as a backend. Code LGTM, ship it :) -- https://code.launchpad.net/~widelands-dev/widelands-website/read_changelog_utf8/+merge/332990 Your team Widelands Developers is subscribed to branch lp:widelands-website. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/read_changelog_utf8 into lp:widelands-website
kaputtnik has proposed merging lp:~widelands-dev/widelands-website/read_changelog_utf8 into lp:widelands-website. Requested reviews: Widelands Developers (widelands-dev) Related bugs: Bug #1242354 in Widelands Website: "Changelog page is empty; use unicode for input" https://bugs.launchpad.net/widelands-website/+bug/1242354 For more details, see: https://code.launchpad.net/~widelands-dev/widelands-website/read_changelog_utf8/+merge/332990 Use utf-8 encoding when reading the ChangeLog. I have tested also other places where files are read: - Uploading maps - Developers Something else? Except the ChangeLog all are working fine without using the codecs module. For the Developers list i've added a TOC, because this list is very long. -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands-website/read_changelog_utf8 into lp:widelands-website. === modified file 'mainpage/views.py' --- mainpage/views.py 2016-12-13 18:28:51 + +++ mainpage/views.py 2017-10-30 13:51:18 + @@ -13,6 +13,7 @@ import os import os.path import locale +import codecs def mainpage(request): @@ -67,7 +68,7 @@ # Get locale and translator names from each .json file and # store them in one list. -txt = '' +txt = '[TOC]\n\n' transl_files = [] transl_list = [] path = os.path.normpath(WIDELANDS_SVN_DIR + 'data/i18n/locales/') @@ -144,7 +145,7 @@ This replaces the wiki changelog """ -data = open(WIDELANDS_SVN_DIR + 'ChangeLog', 'r').read() +data = codecs.open(WIDELANDS_SVN_DIR + 'ChangeLog', encoding='utf-8', mode='r').read() return render_to_response('mainpage/changelog.html', {'changelog': data}, context_instance=RequestContext(request) === modified file 'templates/mainpage/developers.html' --- templates/mainpage/developers.html 2012-05-04 16:52:39 + +++ templates/mainpage/developers.html 2017-10-30 13:51:18 + @@ -1,9 +1,9 @@ {% extends "base.html" %} -{% load wl_markdown %} {% block title %}Widelands Development Team - {{ block.super }}{% endblock %} {% block extra_head %} + {{ block.super}} {% endblock %} ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp