wants to merge 1 commit
[#7899] ticket:808 Fixed downloading repo files with spaces
This looks like it's on the right track, but unicode filenames present a problem. If I have a file with unicode chars in it, I get an exception: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 8: ordinal not in range(128). If you look up several lines in the code you can see that the filename is already encoded with utf-8.
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 8: ordinal not in range(128)
It seems like we don't have any tests around the 'raw' format code. Could you add one? See test_file in ForgeGit/forgegit/tests/functional/test_controllers.py as an example of fetching the whole page for a file. You can add format=raw in the URL there and change the assertions. Even better would be to use the "weird-chars.git" test repo which has a unicode named file in it. But that would require changing the underlying git repo for the test and I'm not sure how easy that is, so maybe just stick with the default test git repo.
Merged as part of [#7899] ib/7899 branch.
Log in to post a comment.