#1037 Convert filenames with utf8 chars when outputting them in templates
Merged by pingou. Opened by ryanlerch.
ryanlerch/pagure unicode_filenames  into  master

Download 1037.patch

If a git repo has a filename in it with a utf8 encoded char,
the template would previously fail to render with an error like:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)

This adds a filter to convert the utf8 charaters in the templates.

The tests have also been updated to add a file to one of the repos
with a non-ascii char.

This won't work on py3, let's use text.encode('utf-8') instead (or text.decode(), I never know which one...)

Could we check that the file is indeed on the page as well?

rebased

Pull-Request has been merged by pingou

Metadata